Page 1 of 1
PDF printing problem
Posted: Mon Oct 15, 2018 9:14 pm
by dunbarx
I had mentioned something like this once before, but need help again.
I am trying to print a bunch of line graphics to PDF. If I use the "Print..." menuItem in the "File" menu, and then "Save as PDF" in the dropdown there, I get a pretty decent rendering of the graphics on the card.
But if I
Code: Select all
open printing to pdf (filePath & ".pdf")
print this card
close printing
I get a distorted image in the resultant pdf. Some lines change both weight and position.
Is there a way to use whatever pdf gadget LC uses from the menu when printing to pdf, as opposed to the "open printing to pdf" command? Why would they be different?
Craig
Re: PDF printing problem
Posted: Wed Nov 21, 2018 6:48 pm
by richmond62
whatever pdf gadget LC uses from the menu
I'm not sure which operating system you are using, but, back in the stone age over
here on Mac OS 10.7.5 Livecode 8.1.10 can ONLY print to PDF using the inherent
capabilities of the operating system itslef rather than anything inwith LiveCode Ding An Sich.
-
-
Digging around in the Dictionary I came across
rreHardcopyPrintPDF
which, it turns out, only works for mobile devices, which
underlines my thesis that the LiveCode people have got their eyes so
firmly fixed on tablets and phones they are neglecting desktop computers.
Re: PDF printing problem
Posted: Wed Nov 21, 2018 7:05 pm
by richmond62
My main
"bitch" with
printing to pdf is that it will NOT print the contents of a field.
HOWEVER, my
Devawriter Pro CAN print a field's contents to PDF (admittedly on Mac OS only):
Code: Select all
on mouseUp
put the systemVersion into ZYS
if ZYS contains "Windows" then
set the vis of img "WinWarnZ.png" to true
else
if ZYS contains "NT" then
set the vis of img "WinWarnZ.png" to true
else
ask file "Save as:" with "Print.pdf"
put it into tFileName
if tFileName is empty then exit to top
set the printerOutput to "file:" & tFileName
revShowPrintDialog false, false
revPrintField the long name of fld "fRESULT"
end if
end if
end mouseUp
where fld "fRESULT" is the field which has to have its contents printed.
Re: PDF printing problem
Posted: Wed Nov 21, 2018 7:18 pm
by dunbarx
Richmond.
So you are saying that the "save as PDF" calls something in Acrobat, but "Open printing to PDF" calls something in the OS?
Rats.
My main "bitch" with printing to pdf is that it will NOT print the contents of a field.
You mean there is no analog to the "revPrintField" command?
Anyone else wish there were much better PDF gadgetry in LC?
Craig
Re: PDF printing problem
Posted: Wed Nov 21, 2018 7:20 pm
by richmond62
As far as I'm aware there is nothing like
"revPrintToPDFfield"
which would be lovely.
Re: PDF printing problem
Posted: Wed Nov 21, 2018 8:11 pm
by capellan
Probably I am doing something wrong, but I could print
text fields to PDF using open printing.
In fact, the PDF is produced by Livecode using a pdf printer
driver from Cairo Graphics Project version 1.14.6
By the way, Cairo Graphics Project produces a svg printer
driver that produces svg files for svg 1.1 or svg 1.2
Re: PDF printing problem
Posted: Wed Nov 21, 2018 8:16 pm
by richmond62
I could print
text fields to PDF using open printing
-
Wow!
Please share the
Good News.
Re: PDF printing problem
Posted: Wed Nov 21, 2018 8:44 pm
by capellan
Check this PDF saved from a Livecode stack. You could select
and copy the text.
Compare the PDF with a screenshot of the stack.
The PDF printing parameters selected for this specific stack
explain the visible differences.
LiveCode_PDF_Text_Field.png
LiveCode_PDF_Text_Field.zip