{"id":56742,"date":"2022-08-30T03:01:57","date_gmt":"2022-08-29T17:01:57","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=56742"},"modified":"2022-08-30T09:51:39","modified_gmt":"2022-08-29T23:51:39","slug":"image-and-text-pdf-timesheet-value-sequences-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/image-and-text-pdf-timesheet-value-sequences-tutorial\/","title":{"rendered":"Image and Text PDF Timesheet Value Sequences Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image and Text PDF Timesheet Value Sequences Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext_date_sequence.jpg\" title=\"Image and Text PDF Timesheet Value Sequences Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image and Text PDF Timesheet Value Sequences Tutorial<\/p><\/div>\n<p>To my mind the biggest bugbears with filling out timesheets are &#8230;<\/p>\n<ul>\n<li>totally repetitious value repeats<\/li>\n<li>date or datetime or time sequencing<\/li>\n<\/ul>\n<p> &#8230; but working off the progress up until yesterday&#8217;s <a title='Image and Text PDF More Toast Tutorial' href='#itpdfmtt'>Image and Text PDF More Toast Tutorial<\/a> we got some solace reading <a target=_blank href='https:\/\/www.w3schools.com\/php\/func_date_date_format.asp' title='PHP date_format() Function information from W3schools'>PHP date_format() Function<\/a>, particularly &#8230;<\/p>\n<blockquote cite='https:\/\/www.w3schools.com\/php\/func_date_date_format.asp'>\n<ul>\n<li>DATE_ATOM &#8211; Atom (example: 2013-04-12T15:52:01+00:00)<\/li>\n<li>DATE_COOKIE &#8211; HTTP Cookies (example: Friday, 12-Apr-13 15:52:01 UTC)<\/li>\n<li>DATE_ISO8601 &#8211; ISO-8601 (example: 2013-04-12T15:52:01+0000)<\/li>\n<li>DATE_RFC822 &#8211; RFC 822 (example: Fri, 12 Apr 13 15:52:01 +0000)<\/li>\n<li>DATE_RFC850 &#8211; RFC 850 (example: Friday, 12-Apr-13 15:52:01 UTC)<\/li>\n<li>DATE_RFC1036 &#8211; RFC 1036 (example: Fri, 12 Apr 13 15:52:01 +0000)<\/li>\n<li>DATE_RFC1123 &#8211; RFC 1123 (example: Fri, 12 Apr 2013 15:52:01 +0000)<\/li>\n<li>DATE_RFC2822 &#8211; RFC 2822 (Fri, 12 Apr 2013 15:52:01 +0000)<\/li>\n<li>DATE_RFC3339 &#8211; Same as DATE_ATOM (since PHP 5.1.3)<\/li>\n<li>DATE_RSS &#8211; RSS (Fri, 12 Aug 2013 15:52:01 +0000)<\/li>\n<li>DATE_W3C &#8211; World Wide Web Consortium (example: 2013-04-12T15:52:01+00:00)<\/li>\n<\/ul>\n<\/blockquote>\n<p> &#8230; as ideas for user entries not involving arcane timestamp formats (such as today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext_date_sequence.jpg\">tutorial picture&#8217;s<\/a> <i>DATE_AToM -=2 x 7<\/i> example) while allowing for many user date\/time timesheet requirements, teamed with our new <a href='#stage2'>stage 2<\/a> document.body &#8220;title&#8221; (ie. hover) advice &#8230;<\/p>\n<blockquote><p>\nClick where text is to be placed in your resultant PDF.   Can use a suffix such as x 5 to repeat value on the 4 clicks to follow.  As far as dates go consult https:\/\/www.w3schools.com\/php\/func_date_date_format.asp DATE_ATOM type entries where DATE_ followed by ymd lowercase character correspondence in second part means change just date via that ymd means whereas date_ followed by hms lowercase character correspondence in second part means change time via that hms means whereas uppercase second part preceeded by ymd lowercase character in first part means change datetime via that ymd means whereas datE_ followed by hms lowercase character correspondence in second part means change datetime via that hms means.  Incrementing scale can be defined via ++ or &#8212; or +=2 or -=4 types of strings before the x 5 repeat definitions.\n<\/p><\/blockquote>\n<p> &#8230;  in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php------GETME\">our changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php------GETME\">pdfimageplustext.php<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\" title=\"Click picture\">Image and Text PDF<\/a> <font size=1>(now with &#8220;fourth draft&#8221; user interaction logic)<\/font> PHP web application you can also <a href='#trpdfit'>try below, in a pared down &#8220;awkward interaction&#8221; mode of use showing you that $_GET[] arguments are catered for but not used with the real user interaction code talked about above<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/image-and-text-pdf-timesheet-value-sequences-tutorial\/'>Image and Text PDF Timesheet Value Sequences Tutorial<\/a>.<\/p-->\n<hr>\n<p id='itpdfmtt'>Previous relevant <a target=_blank title='Image and Text PDF More Toast Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/image-and-text-pdf-more-toast-tutorial\/'>Image and Text PDF More Toast Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image and Text PDF More Toast Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext_more.gif\" title=\"Image and Text PDF More Toast Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image and Text PDF More Toast Tutorial<\/p><\/div>\n<p>In our current &#8220;Image and Text Nodes PDF Creator&#8221; PHP web application project, it is <a href='#stage2'>stage 2<\/a>, primarily, that we want to make more &#8220;feature<i>ful<\/i>&#8220;, shall we say!  It was as we were constructing yesterday&#8217;s <a title='Image and Text PDF Rotation and Direction Tutorial' href='#itpdfrdt'>Image and Text PDF Rotation and Direction Tutorial<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\">animated GIF tutorial picture<\/a> we realized that it fell into that trap of &#8220;lack of reality&#8221; regarding its premise.  A background timesheet image with the hours already filled in?  This is not realistic.  And yet, regarding a &#8220;two pass&#8221; scenario, where a PDF&#8217;s JPEG could be called into play for a second pass, it is too much to ask users to put up with such complexity!   Better is to allow the user to change Text styling adequately enough, midstream, to allow this timesheet scenario &#8230;  <\/p>\n<ol>\n<li>start with no hours filled in (as the base image)<\/li>\n<li>user fills in the hours &#8230; then (courtesy of new &#8220;from then on&#8221; <i>more toast<\/i> functionality) &#8230;<\/li>\n<li>user (is able to) fill in the date strings<\/li>\n<\/ol>\n<p> &#8230; all in the one pass of execution of our &#8220;Image and Text Nodes PDF Creator&#8221; PHP web application.<\/p>\n<p>Again, the second of the <i>dual toast purposes<\/i> involves <i>position:fixed<\/i> but just in case users want to click for text nodes under it, we give 20 second periods where it is hidden, as you can see in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php-----GETME\">our changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php-----GETME\">pdfimageplustext.php<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\" title=\"Click picture\">Image and Text PDF<\/a> <font size=1>(now with &#8220;third draft&#8221; user interaction logic)<\/font> PHP web application you can also <a href='#trpdfit'>try below, in a pared down &#8220;awkward interaction&#8221; mode of use showing you that $_GET[] arguments are catered for but not used with the real user interaction code talked about above<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/new-image-and-text-pdf-rotation-and-direction-tutorial\/'>Image and Text PDF More Toast Tutorial<\/a>.<\/p-->\n<hr>\n<p id='itpdfrdt'>Previous relevant <a target=_blank title='Image and Text PDF Rotation and Direction Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/image-and-text-pdf-rotation-and-direction-tutorial\/'>Image and Text PDF Rotation and Direction Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image and Text PDF Rotation and Direction Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext_direction.gif\" title=\"Image and Text PDF Rotation and Direction Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image and Text PDF Rotation and Direction Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Image and Text PDF Glowing Toast Tutorial' href='#itpdfgtt'>Image and Text PDF Glowing Toast Tutorial<\/a> allowed for text &#8230;<\/p>\n<ul>\n<li>where the size could be changed<\/li>\n<li>where the style could be changed<\/li>\n<li>where the font family could be changed<\/li>\n<\/ul>\n<p> &#8230; but users may want, particularly if they are infilling a timesheet, text &#8230;<\/p>\n<ul>\n<li>where colour can be changed<\/li>\n<li>where direction can be changed amongst Up Down Left Right<\/li>\n<li>where rotation can be changed<\/li>\n<\/ul>\n<p>To facilitate this, we appreciate the FPDF subclass developed <a target=_blank title='FPDF subclass' href='http:\/\/www.fpdf.org\/en\/script\/script31.php'>here, thanks<\/a>, and used it to improve the user selectable possibilities in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php----GETME\">our changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php----GETME\">pdfimageplustext.php<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\" title=\"Click picture\">Image and Text PDF<\/a> <font size=1>(now with &#8220;third draft&#8221; user interaction logic)<\/font> PHP web application you can also <a href='#trpdfit'>try below, in a pared down &#8220;awkward interaction&#8221; mode of use showing you that $_GET[] arguments are catered for but not used with the real user interaction code talked about above<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/image-and-text-pdf-rotation-and-direction-tutorial\/'>Image and Text PDF Rotation and Direction Tutorial<\/a>.<\/p-->\n<hr>\n<p id='itpdfgtt'>Previous relevant <a target=_blank title='Image and Text PDF Glowing Toast Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/image-and-text-pdf-glowing-toast-tutorial\/'>Image and Text PDF Glowing Toast Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image and Text PDF Glowing Toast Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext_glowing_toast.jpg\" title=\"Image and Text PDF Glowing Toast Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image and Text PDF Glowing Toast Tutorial<\/p><\/div>\n<p><a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=tpwI7xk34bc'>Lemon curry<\/a>?  No, it&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext_glowing_toast.jpg\">Glowing Toast<\/a> today!   Huh?!<\/p>\n<ul>\n<li><a target=_blank title='Glowing box' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/multiple-choice-quiz-with-glowing-box-tutorial\/'>Glowing<\/a><\/li>\n<li><a target=_blank href='https:\/\/developer.android.com\/guide\/topics\/ui\/notifiers\/toasts' title='Android toast dialog box'>Toast<\/a><\/li>\n<\/ul>\n<p>Well, it&#8217;s a way to temporarily show a very noticeable overlaid message box &#8230;<\/p>\n<p><code><br \/>\n&lt;style&gt;<br \/>\n<br \/>\n .custom-alert {<br \/>\n  display: inline-block;<br \/>\n  \/* visibility: visible; *\/<br \/>\n  background-color: rgba(102,102,102,0.8);<br \/>\n  color: #fff;<br \/>\n  text-align: enter;<br \/>\n  margin: 5% auto;<br \/>\n  padding: 12px 28px;<br \/>\n  opacity: 0.9;<br \/>\n  z-index: 200;<br \/>\n  -webkit-animation: glow 1s linear infinite alternate;<br \/>\n  -moz-animation: glow 1s linear infinite alternate;<br \/>\n  animation: glow 1s linear infinite alternate;<br \/>\n }<br \/>\n<br \/>\n \/* Thanks to https:\/\/www.w3schools.com\/howto\/tryit.asp?filename=tryhow_css_glowing_text *\/<br \/>\n<br \/>\n @-webkit-keyframes glow {<br \/>\n  from {<br \/>\n    box-shadow: 0 0 3px #fff, 0 0 5px #fff, 0 0 37px #e60073, 0 0 9px #e60073, 0 0 11px #e60073, 0 0 13px #e60073, 0 0 15px #e60073;<br \/>\n  }<br \/>\n<br \/>\n  to {<br \/>\n    box-shadow: 0 0 24px #fff, 0 0 6px #ff4da6, 0 0 8px #ff4da6, 0 0 10px #ff4da6, 0 0 12px #ff4da6, 0 0 14px #ff4da6, 0 0 16px #ff4da6;<br \/>\n  }<br \/>\n }<br \/>\n<br \/>\n&lt;\/style&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; over our &#8220;Image and Text Nodes PDF&#8221; in exact context in <a href='#stage2'>stage 2<\/a> in yesterday&#8217;s tutorial further below, better informing the user, especially mobile ones, what is required of them to add Text Nodes onto the Image to complete PDF creation, better than yesterday&#8217;s <a title='Image and Text PDF Interaction Tutorial' href='#itpdfit'>Image and Text PDF Interaction Tutorial<\/a> &#8230;<\/p>\n<p>Also in the mix below is the third &#8220;user interaction&#8221; mode of use below &#8230;<\/p>\n<ol>\n<li>browse for local device image files &#8230;<\/li>\n<li>enter an Image Relative URL (ie. relative to https:\/\/www.rjmprogramming.com.au\/ or RJM Programming&#8217;s Apache\/PHP\/MySql web server Document Root folder) &#8230;<\/li>\n<li>turn to <a target=_blank title='find_images_via_size.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/find_images_via_size.php-------GETME'>a modified very apt<\/a> <a target=_blank title='find_images_via_size.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/find_images_via_size.php-------GETME'>find_images_via_size.php<\/a> <a target=_blank title='Helper' href='http:\/\/www.rjmprogramming.com.au\/PHP\/find_images_via_size.php'>web application<\/a> that adds a visual component to the Image Relative URL idea above<\/li>\n<\/ol>\n<p> &#8230; complimenting <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php---GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php---GETME\">pdfimageplustext.php<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\" title=\"Click picture\">Image and Text PDF<\/a> <font size=1>(now with &#8220;second draft&#8221; user interaction logic)<\/font> PHP web application you can also <a href='#trpdfit'>try below, in a pared down &#8220;awkward interaction&#8221; mode of use showing you that $_GET[] arguments are catered for but not used with the real user interaction code talked about above<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/image-and-text-pdf-glowing-toast-tutorial\/'>Image and Text PDF Glowing Toast Tutorial<\/a>.<\/p-->\n<hr>\n<p id='itpdfit'>Previous relevant <a target=_blank title='Image and Text PDF Interaction Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/image-and-text-pdf-interaction-tutorial\/'>Image and Text PDF Interaction Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image and Text PDF Interaction Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext_interaction.gif\" title=\"Image and Text PDF Interaction Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image and Text PDF Interaction Tutorial<\/p><\/div>\n<p>Many web applications benefit from user interaction to make them dynamically useful.  The idea is you, as the programmer, set up the default scenario of there being &#8220;nothing to go on yet&#8221; with a reasonably easily understood way for the user to supply the web application with the information required, a phase often referred to as &#8220;user interaction&#8221;.<\/p>\n<p>And so, with our current &#8220;Image and Text Nodes PDF Creation&#8221; project of yesterday&#8217;s <a title='Image and Text PDF Sharing Tutorial' href='#itpdfst'>Image and Text PDF Sharing Tutorial<\/a> you might say we worked from the end of the workflow to the start of the workflow, today, with us adding a &#8220;user interaction&#8221; phase when the URL entered is just &#8230;<\/p>\n<p><code><br \/>\n<a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\" title=\"Click picture\">https:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php<\/a><br \/>\n<\/code><\/p>\n<p>There is a proviso, though!  When you have a PHP web application and deal with $_POST[] arguments, as we steer you towards, today, with our sizeable data issue, you will see that same URL as above at various stages (all 1 and 2 and 3 below) of the PDF creation workflow &#8230;<\/p>\n<ol>\n<li>user enters <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\" title=\"Click picture\">https:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php<\/a> at address bar of the web browser where user defines an image URL or browses for a local image file &#8230;<\/li>\n<li id=stage2>user sees that image and clicks\/taps where they want text node(s) placed, and can proceed to the next step by answering with a blank text node &#8230;<\/li>\n<li>user sees created PDF file consisting of an Image and Text Node(s)<\/li>\n<\/ol>\n<p>In other words, the use of serverside $_POST[] argument HTML form method=POST methodologies &#8230;<\/p>\n<p><code><br \/>\n&lt;form id=myform method=POST action=.\/pdfimageplustext.php style=display:none;&gt;<br \/>\n&lt;input type=hidden id=slideshow name=justiurl value=''&gt;&lt;\/input&gt;<br \/>\n&lt;div id=coords style=display:none;&gt;&lt;\/div&gt;<br \/>\n&lt;input type=submit id=isub style=display:none; value='Ask for Text'&gt;&lt;\/input&gt;<br \/>\n&lt;\/form&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; make the web application &#8220;look&#8221; be contextual, where $_GET[] argument usage would be more self explanatory, but, alas, is impractical when the length of character data exceeds about 800, as it would with any self respecting image data URL!<\/p>\n<p>A &#8220;first time that we can remember&#8221; curiosity about that HTML form usage above, used in two of the stages talked about above, is the &#8220;navigation $_POST[] argument renaming&#8221; <font color=blue>as per<\/font> &#8230;<\/p>\n<p><code><br \/>\nfunction redraw() {<br \/>\n  document.getElementById('cbi').style.display='none';<br \/>\n  document.getElementById('myp').style.display='none';<br \/>\n  document.getElementById('iurl').style.display='none';<br \/>\n  document.getElementById('myh1').style.display='none';<br \/>\n  document.getElementById('myh3').style.display='none';<br \/>\n  document.getElementById('mybody').style.background='url(' + datauri + ')';<br \/>\n  document.getElementById('mybody').style.backgroundRepeat='no-repeat';<br \/>\n  <font color=blue>document.getElementById('slideshow').name='pdfimage';<\/font><br \/>\n  if (document.body.outerHTML.indexOf('url(') != -1) {<br \/>\n    datauri=document.body.outerHTML.split('url(')[1].split(')')[0].replace(\/\\&quot\\;\/g,'');<br \/>\n  }<br \/>\n  document.getElementById('slideshow').value=datauri;<br \/>\n  \/\/alert(datauri.substring(0,100) + ' ... ' + document.body.outerHTML.substring(0,350));<br \/>\n  document.getElementById('coords').innerHTML+='&lt;input type=hidden name=pdfimageplustext value=y&gt;&lt;\/input&gt;';<br \/>\n  startrecording=true;<br \/>\n  document.getElementById('mybody').onclick=function(e){<br \/>\n    e = e || window.event;<br \/>\n    e.preventDefault();<br \/>\n       startrecording=true;<br \/>\n       if (e.touches) {<br \/>\n       if (e.touches[0].pageX) {<br \/>\n       x = e.touches[0].pageX;<br \/>\n       y = e.touches[0].pageY;<br \/>\n       askaway();<br \/>\n       } else {<br \/>\n       x = e.touches[0].clientX;<br \/>\n       y = e.touches[0].clientY;<br \/>\n       askaway();<br \/>\n       }<br \/>\n       \/\/console.log('pos3=' + pos3 + ',pos4=' + pos4);<br \/>\n       } else if (e.clientX || e.clientY) {<br \/>\n        x = e.clientX;<br \/>\n        y = e.clientY;<br \/>\n       askaway();<br \/>\n       } else {<br \/>\n        x = e.pageX;<br \/>\n        y = e.pageY;<br \/>\n       askaway();<br \/>\n       }<br \/>\n  };<br \/>\n  document.getElementById('mybody').title='Click where text is to be placed in your resultant PDF'; \/\/setTimeout(askaway, 5000); \/\/alert('am here');<br \/>\n}<br \/>\n<\/code><\/p>\n<p>Somehow, we&#8217;ve always been shy to work things this way, but is fine to do!<\/p>\n<p>Again, see this in action with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php--GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php--GETME\">pdfimageplustext.php<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\" title=\"Click picture\">Image and Text PDF<\/a> <font size=1>(now with &#8220;first draft&#8221; user interaction logic)<\/font> PHP web application you can also <a href='#trpdfit'>try below, in a pared down &#8220;awkward interaction&#8221; mode of use showing you that $_GET[] arguments are catered for but not used with the real user interaction code talked about above<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/new-image-and-text-pdf-sharing-tutorial\/'>New Image and Text PDF Sharing Tutorial<\/a>.<\/p-->\n<hr>\n<p id='itpdfst'>Previous relevant <a target=_blank title='Image and Text PDF Sharing Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/image-and-text-pdf-sharing-tutorial\/'>Image and Text PDF Sharing Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image and Text PDF Sharing Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext_share.jpg\" title=\"Image and Text PDF Sharing Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image and Text PDF Sharing Tutorial<\/p><\/div>\n<p>Onto yesterday&#8217;s <a title='Image and Text PDF Primer Tutorial' href='#itpdfpt'>Image and Text PDF Primer Tutorial<\/a> &#8220;Image and Text PDF&#8221; creator start, today we wanted to link in with our previous <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/web-share-api-primer-tutorial\/' title='Web Share API Primer Tutorial'>Web Share API Primer Tutorial<\/a> work to offer <i>some of our users<\/i> the chance to share their work.  Yes, it&#8217;s <i>some of our users<\/i> here because the <a target=_blank title='Web Share API' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Navigator\/share'>Web Share API<\/a> interfacing does not work on all platforms and only works for <i>https:<\/i> protocol URLs.<\/p>\n<p>Also in the winds today is the <a target=_blank title='Unique identifier information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Unique_identifier'>&#8220;uniquifying&#8221;<\/a> of media filenames for their limited lifespan.<\/p>\n<p>And in a wind <font size=1>(<a target=_blank title='?' href='https:\/\/www.google.com\/search?q=wind+called+mariah+lyrics&#038;rlz=1C5CHFA_enAU973AU973&#038;oq=wind+called+&#038;aqs=chrome.0.69i59j69i57j46i67j46i512j46i10j0i15i22i30j0i22i30l4.16617j0j15&#038;sourceid=chrome&#038;ie=UTF-8'>called Mariah<\/a>)<\/font> we convert our PDF to a JPEG image via the great <a target=_blank title='ImageMagick' href='http:\/\/www.imagemagick.org'>ImageMagick<\/a> &#8230;<\/p>\n<p><code><br \/>\nconvert -density 300 pdffilename.pdf pdffilename.jpg<br \/>\n<\/code><\/p>\n<p> &#8230; command line type of command (accessed via PHP <a target=_blank title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.exec.php'>exec<\/a> conduit) along the way, because that might come in handy down the line.<\/p>\n<p>And then, &#8220;down the line&#8221;, we realized that for Safari platform work where a PDF is shown within an HTML iframe scenario, that JPEG image can immediately help, it being that (onclick event) intermediary between the iframe and opening PDF in a new window (but not good in the iframe element).<\/p>\n<p>See this in action with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php-GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php-GETME\">pdfimageplustext.php<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\" title=\"Click picture\">Image and Text PDF<\/a> <font size=1>(still a blank webpage without the user interaction, at this first draft)<\/font> PHP web application (helped out by <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/web_share_api_test.html---GETME \">the changed HTML and Javascript<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/web_share_api_test.html---GETME\">web_share_api_test.html<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/web_share_api_test.html\">Web Share API supervisor<\/a>) you can also <a href='#trpdfit'>try below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/image-and-text-pdf-sharing-tutorial\/'>Image and Text PDF Sharing Tutorial<\/a>.<\/p-->\n<hr>\n<p id='itpdfpt'>Previous relevant <a target=_blank title='Image and Text PDF Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/image-and-text-pdf-primer-tutorial\/'>Image and Text PDF Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.jpg\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image and Text PDF Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.jpg\" title=\"Image and Text PDF Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image and Text PDF Primer Tutorial<\/p><\/div>\n<p>We are restarting our interest in our &#8220;Timesheet Filling In Automator&#8221; web application long standing dream from another angle today.  We want to &#8230;<\/p>\n<ul>\n<li>create PDF data via the <a target=_blank title='FPDF library' href='HTTP:\/\/www.fpdf.org\/'>FPDF<\/a> PHP library &#8230; where we &#8230;<\/li>\n<li>base the PDF on a single image (at this stage) &#8230; and &#8230;<\/li>\n<li>allow for any number of x,y,text combinations placed on top of the image above &#8230; and &#8230;<\/li>\n<li>allow for Font Family and Font Style and Font Size (with a mantissa on x means to change the Font Size for individual text nodes)<\/li>\n<\/ul>\n<p> &#8230; for this early days &#8220;proof of concept&#8221; and &#8220;just the workings, not the user interaction&#8221; with our &#8220;first draft&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php_GETME\">pdfimageplustext.php<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php\" title=\"Click picture\">Image and Text PDF<\/a> <font size=1>(blank webpage without the user interaction, at this first draft)<\/font> PHP web application you can see in the example usage below &#8230;<\/p>\n<table style='width:100%;'>\n<tr id='trpdfit'>\n<th><a target=_blank href='\/\/www.rjmprogramming.com.au\/pdfimageplustext.php?pdfimageplustext=y&#038;pdfimage=moodle.jpg&#038;pdftext1=Moodle%20Page&#038;pdfx1=230&#038;pdfy1=250'>Open Link of Content Below in New Window &#8230;<\/a> or change that URL just below &#8230;<br \/><a target=_blank style='padding: 3 3 3 3;' title='Can change URL or wait 8 seconds for navigation to occur' id=\"acelink\" data-ce='' onclick=\"if (this.getAttribute('data-ce').length == 0) {  this.style.textDecoration='none';  this.style.backgroundColor='#e0e0e0';  setTimeout(function(){ if (document.getElementById('acelink').getAttribute('data-ce').length == 0) { document.getElementById('acelink').setAttribute('data-ce','n');  document.getElementById('acelink').setAttribute('contenteditable', !document.getElementById('acelink').getAttribute('contenteditable')); document.getElementById('acelink').click();  } },8000); }\" onkeydown=\"this.setAttribute('data-ce','y'); this.title='Will navigate to your new URL.';\" href=\"https:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php?pdfimageplustext=y&#038;pdfimage=moodle.jpg&#038;pdftext1=Moodle%20Page&#038;pdfx1=230&#038;pdfy1=250\" \n onblur=\" this.style.textDecoration='underline';  this.style.backgroundColor='white'; \n this.href=this.innerHTML.replace(\/\\&#038;amp\\;\/g,'&#038;'); this.setAttribute('contenteditable', !this.getAttribute('contenteditable')); this.click();\" contenteditable=true>https:\/\/www.rjmprogramming.com.au\/pdfimageplustext.php?pdfimageplustext=y&#038;pdfimage=moodle.jpg&#038;pdftext1=Moodle%20Page&#038;pdfx1=230&#038;pdfy1=250<\/a>\n<\/th>\n<\/tr>\n<tr>\n<td><iframe id='ifpdfit' src='\/\/www.rjmprogramming.com.au\/pdfimageplustext.php?pdfimageplustext=y&#038;pdfimage=moodle.jpg&#038;pdftext1=Moodle%20Page&#038;pdfx1=230&#038;pdfy1=250' style='width:100%;height:900px;'><\/iframe><\/td>\n<\/tr>\n<\/table>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d56693' onclick='var dv=document.getElementById(\"d56693\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/pdf\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d56693' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d56699' onclick='var dv=document.getElementById(\"d56699\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/api\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d56699' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d56720' onclick='var dv=document.getElementById(\"d56720\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/form\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d56720' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d56724' onclick='var dv=document.getElementById(\"d56724\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/glow\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d56724' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d56731' onclick='var dv=document.getElementById(\"d56731\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/rotation\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d56731' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d56736' onclick='var dv=document.getElementById(\"d56736\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/toast\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d56736' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d56742' onclick='var dv=document.getElementById(\"d56742\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/sequence\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d56742' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>To my mind the biggest bugbears with filling out timesheets are &#8230; totally repetitious value repeats date or datetime or time sequencing &#8230; but working off the progress up until yesterday&#8217;s Image and Text PDF More Toast Tutorial we got &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/image-and-text-pdf-timesheet-value-sequences-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,12,14,29,37],"tags":[2914,2915,84,88,1707,234,2650,281,1654,297,301,302,1971,405,4072,452,2430,3030,4073,4074,590,1658,609,675,830,913,932,997,1072,1083,1895,1133,1137,1209,1212,1254,1279,2225,2834,1288,1319,2231,1899,1345,1891,3214,4031],"class_list":["post-56742","post","type-post","status-publish","format-standard","hentry","category-animation","category-elearning","category-event-driven-programming","category-operating-system","category-tutorials","tag-_get","tag-_post","tag-animation-2","tag-api","tag-co-ordinates","tag-command-line","tag-convert","tag-css","tag-data-uri","tag-data-url","tag-date","tag-datetime","tag-direction","tag-exec","tag-filling-in","tag-form","tag-fpdf","tag-glow","tag-glowing","tag-glowing-toast","tag-image","tag-imagemagick","tag-input","tag-keyframes","tag-navigation","tag-pdf","tag-php","tag-programming","tag-rotation","tag-safari","tag-sequence","tag-share","tag-sharing","tag-style","tag-styling","tag-text","tag-time","tag-timesheet","tag-timestamp","tag-toast","tag-tutorial","tag-uniquifier","tag-units","tag-url","tag-user","tag-user-interaction","tag-web-share-api"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56742"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=56742"}],"version-history":[{"count":2,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56742\/revisions"}],"predecessor-version":[{"id":56744,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56742\/revisions\/56744"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=56742"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=56742"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=56742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}