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 » Sun Mar 26, 2023 11:10 am

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: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Printing to pdf resolution

Post by jacque » Sun Mar 26, 2023 6:03 pm

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 » Sun Mar 26, 2023 6:38 pm

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: 13793
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Printing to pdf resolution

Post by Klaus » Sun Mar 26, 2023 6:45 pm

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 » Mon Mar 27, 2023 3:47 am

Thanks Klaus

Now it works

Klaus
Posts: 13793
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Printing to pdf resolution

Post by Klaus » Mon Mar 27, 2023 8:53 am

Grrrrrrrrrreat! :-)

Post Reply

Return to “iOS Deployment”