Printing to pdf resolution

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
geo
Posts: 31
Joined: Sun Aug 04, 2019 7:28 pm

Printing to pdf resolution

Post by geo »

Hello
In my app I have created a substack "print" (size 1190 x 1684) with a card "crdPDF" which contains information that I need to print
This is for the substack "print"

Code: Select all

on preOpenStack
   set the fullscreenmode of this stack to "noScale"
end preOpenStack

Code: Select all

open printing to pdf tPDFPath
   print card "crdPDF" of stack "print" into 0,0,595,842
   set the printScale to 0.5 
   close printing
this is the code i use for printing

When I run it from the IDE on my mac it outputs a correct pdf with the resolution 595 × 842
When I run it from the ipad it outputs a pdf with the resolution 612 × 792 => not correct

Anybody knows what the resolution problem could be?
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Printing to pdf resolution

Post by jacque »

Try setting the printscale before the print command.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
geo
Posts: 31
Joined: Sun Aug 04, 2019 7:28 pm

Re: Printing to pdf resolution

Post by geo »

Set the printscale before the print command, but it's still the same

i found out that 612 x 792 is us letter size
don't have a clue why it would output that size
I need A4
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Printing to pdf resolution

Post by Klaus »

Try to also set -> the printPaperSize

Code: Select all

...
## Do this before -> open printing to pdf...:
set the printPaperSize to 595,842
open printing to pdf tPDFPath
set the printScale to 0.5 
print card "crdPDF" of stack "print" into 0,0,595,842
close printing
...
geo
Posts: 31
Joined: Sun Aug 04, 2019 7:28 pm

Re: Printing to pdf resolution

Post by geo »

Thanks Klaus

Now it works
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Printing to pdf resolution

Post by Klaus »

Grrrrrrrrrreat! :-)
Post Reply