9,46d8
< class RPDF extends FPDF { // thanks to http://www.fpdf.org/en/script/script31.php
<
< function TextWithDirection($x, $y, $txt, $direction='R')
< {
< if ($direction=='R')
< $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',1,0,0,1,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
< elseif ($direction=='L')
< $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',-1,0,0,-1,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
< elseif ($direction=='U')
< $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',0,1,-1,0,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
< elseif ($direction=='D')
< $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',0,-1,1,0,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
< else
< $s=sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
< if ($this->ColorFlag)
< $s='q '.$this->TextColor.' '.$s.' Q';
< $this->_out($s);
< }
<
< function TextWithRotation($x, $y, $txt, $txt_angle, $font_angle=0)
< {
< $font_angle+=90+$txt_angle;
< $txt_angle*=M_PI/180;
< $font_angle*=M_PI/180;
<
< $txt_dx=cos($txt_angle);
< $txt_dy=sin($txt_angle);
< $font_dx=cos($font_angle);
< $font_dy=sin($font_angle);
<
< $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',$txt_dx,$txt_dy,$font_dx,$font_dy,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
< if ($this->ColorFlag)
< $s='q '.$this->TextColor.' '.$s.' Q';
< $this->_out($s);
< }
<
< }
<
108,138d69
<
146,147d76
< var nofiddling=false;
<
187,193d115
< if (outans.indexOf(arris[iarris] + ';;') != -1) {
< if (document.getElementById('pdffontstyle')) {
< document.getElementById('pdffontsize').value='' + arris[iarris];
< } else {
< document.getElementById('coords').innerHTML+='';
< }
< }
357,358d278
< document.getElementById('relfind').style.display='none';
< document.getElementById('myptwo').style.display='none';
397,403c317
< document.body.innerHTML+=\"
Click where text node(s) are to be placed in your resultant PDF. You will get prompted for optional styling options.
\";
< setTimeout(hideIt, 10000);
< }
<
< function hideIt() {
< document.getElementById('custom-alert-1').style.display='none';
< }
---
> }
410d323
< if (nofiddling) {
412,415d324
< } else {
< datauri=document.getElementById('slideshow').value.replace(/^\.\.\//g, '').replace(/^\.\//g, 'PHP/');
< document.getElementById('slideshow').value=datauri;
< }
424,426d332
< var szc='';
< var trc='';
< var lastcis=-1;
428,485c334
< var hases=ino.value.split('#');
< if (hases.length > 1) {
< if (hases[1].trim() != '') {
< var coms=hases[1].split(',');
< if (hases[1].toLowerCase().indexOf('rgb') == 0) {
< document.getElementById('coords').innerHTML+='';
< document.getElementById('coords').innerHTML+='';
< document.getElementById('coords').innerHTML+='';
< hases[1]=hases[1].replace(hases[1].split(')')[0] + ')', '').trim();
< }
< if (ino.value.replace(hases[0] + '#','').indexOf('px') != -1) {
< while ((' ' + ino.value.replace(hases[0] + '#','').split('px')[0]).slice(lastcis).substring(0,1) >= '0' && (' ' + ino.value.replace(hases[0] + '#','').split('px')[0]).slice(lastcis).substring(0,1) <= '9') {
< szc=(' ' + ino.value.replace(hases[0] + '#','').split('px')[0]).slice(lastcis);
< lastcis--;
< }
< hases[1]=hases[1].replace(szc + 'px', '').trim();
< document.getElementById('coords').innerHTML+='';
< }
< lastcis=1;
< if ((hases[1] + ' ').substring(0,1) >= '0' && (hases[1] + ' ').substring(0,1) <= '9') {
< while ((hases[1] + ' ').substring(0,lastcis).slice(-1) >= '0' && (hases[1] + ' ').substring(0,lastcis).slice(-1) <= '9') {
< trc+=(hases[1] + ' ').substring(0,lastcis).slice(-1);
< lastcis++;
< }
< hases[1]=hases[1].replace(trc + '', '').trim();
< document.getElementById('coords').innerHTML+='';
< }
< if (hases[1].indexOf('Normal') != -1) {
< document.getElementById('coords').innerHTML+='';
< hases[1]=hases[1].replace('Normal', '').trim();
< }
< if (hases[1].indexOf('Bold') != -1) {
< document.getElementById('coords').innerHTML+='';
< hases[1]=hases[1].replace('Bold', '').trim();
< }
< if (hases[1].indexOf('Ital') != -1) {
< document.getElementById('coords').innerHTML+='';
< hases[1]=hases[1].replace('Italic', '').replace('Itallic', '').trim();
< }
< if (hases[1].indexOf('Underline') != -1) {
< document.getElementById('coords').innerHTML+='';
< hases[1]=hases[1].replace('Underline', '').trim();
< }
< if (hases[1].indexOf('R') != -1) {
< document.getElementById('coords').innerHTML+='';
< } else if (hases[1].indexOf('L') != -1) {
< document.getElementById('coords').innerHTML+='';
< } else if (hases[1].indexOf('U') != -1) {
< document.getElementById('coords').innerHTML+='';
< } else if (hases[1].indexOf('D') != -1) {
< document.getElementById('coords').innerHTML+='';
< }
< }
< document.getElementById('iurl').value=hases[0].trim() ; //ino.value.split('#')[0];
< }
< if (hases[0].trim() != '') {
< nofiddling=true;
< document.getElementById('slideshow').value=ino.value.split('#')[0];
---
> document.getElementById('slideshow').value=ino.value;
487,488d335
< nofiddling=false;
< }
498c345
< ... or ...
---
> ... or ...
501,503c348
<
< ... or ...
<
---
>
559,562c404
< $outputpdf = new RPDF('P','pt');
< //if (isset($_POST['pdfrtext']) && isset($_POST['pdfgtext']) && isset($_POST['pdfbtext'])) {
< //$outputpdf->SetTextColor(urldecode($_POST['pdfrtext']), urldecode($_POST['pdfgtext']), urldecode($_POST['pdfbtext']));
< //}
---
> $outputpdf = new FPDF('P','pt');
715,724c557
< if (isset($_POST['pdfrtext']) && isset($_POST['pdfgtext']) && isset($_POST['pdfbtext'])) {
< $outputpdf->SetTextColor(urldecode($_POST['pdfrtext']), urldecode($_POST['pdfgtext']), urldecode($_POST['pdfbtext']));
< }
< if (isset($_POST['pdfdirectiontext'])) {
< $outputpdf->TextWithDirection($ourx,$oury,$stris,$_POST['pdfdirectiontext']);
< } else if (isset($_POST['pdfrotatetextdeg'])) {
< $outputpdf->TextWithRotation($ourx,$oury,$stris,$_POST['pdfrotatetextdeg'],0);
< } else {
< $outputpdf->Text($ourx,$oury,$stris);
< }
---
> $outputpdf->Text($ourx,$oury,$stris);
755,758c588
< $outputpdf = new RPDF('P','pt');
< //if (isset($_GET['pdfrtext']) && isset($_GET['pdfgtext']) && isset($_GET['pdfbtext'])) {
< //$outputpdf->SetTextColor(urldecode($_GET['pdfrtext']), urldecode($_GET['pdfgtext']), urldecode($_GET['pdfbtext']));
< //}
---
> $outputpdf = new FPDF('P','pt');
906,913c736
< if (isset($_GET['pdfrtext']) && isset($_GET['pdfgtext']) && isset($_GET['pdfbtext'])) {
< $outputpdf->SetTextColor(urldecode($_GET['pdfrtext']), urldecode($_GET['pdfgtext']), urldecode($_GET['pdfbtext']));
< }
< if (isset($_GET['pdfdirectiontext'])) {
< $outputpdf->TextWithDirection($ourx,$oury,$stris,$_GET['pdfdirectiontext']);
< } else if (isset($_GET['pdfrotatetextdeg'])) {
< $outputpdf->TextWithRotation($ourx,$oury,$stris,$_GET['pdfrotatetextdeg'],0);
< }
---
> $outputpdf->Text($ourx,$oury,$stris);