So I've had two posts with this whole printing to pdf thing on android. Overall, great results.
1) How do I get it to save to the document folder? And, Klaus totally answered that.
2) How do I display that pdf once it's saved? And, Bernard totally answered that.
Now, one more and I think I am set. For some reason the following code cuts off the right and bottom of the card being printed. Both on the IDE (and desktop web browser to display) and on the android device:
--
on mouseUp
put specialfolderpath("documents") & "/lms.pdf" into tPDFPath
open printing to pdf tPDFPath
print card
close printing
end mouseUp
--
Any thoughts on why it is doing that?
Printing to pdf cuts off portion of card
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Printing to pdf cuts off portion of card
I resolved this issue! Put a grc over the entire cd and voila:
--
on mouseUp
put specialfolderpath("documents") & "/lms.pdf" into tPDFPath
open printing to pdf tPDFPath
print this card into the rect of graphic "printArea"
close printing
end mouseUp
--
on mouseUp
put specialfolderpath("documents") & "/lms.pdf" into tPDFPath
open printing to pdf tPDFPath
print this card into the rect of graphic "printArea"
close printing
end mouseUp
Re: Printing to pdf cuts off portion of card
At a guess, it is because the page default of the pdf virtual printer is not the same as the size of the card you are printing. You can set up the page size to match the card before printing, and then print into "the printRectangle". It is something I have done on Windows, anyway.
Re: Printing to pdf cuts off portion of card
I wanted to come back to this. When you are printing a card, at least with an image from mobile (android), it appears that the maximum image size that the card will print is approximately 594x768. So there you go to avoid any part of the image (or card, not sure if its the image or the card to be honest) being cut off. Don't have your image or your card exceed that dimension and the whole thing will print perfectly.
Re: Printing to pdf cuts off portion of card
@JereMiami: I think its just because of the standard print settings - take a look at the printPaperSize and printMargins (and printGutter). The paper size will determine the size of the page generated in the PDF. If you use 'print into rect' then you get the whole of `the printRectangle` to play with. However, if you use `print card`, then the engine will layout the cards using the printMargins and printGutter (as you can print more than one per page - there's many other print properties too which affect this).