Page 1 of 1

Problem with the Print Into command

Posted: Thu Dec 24, 2015 12:26 am
by LGates23
I have searched this forum and did not find a relevant post. If I missed it please let me know.

I am working on a personal project to create a stack to collect my recipes.
The problem I am having is with the "Print from x,x to x,x Into x,x,x,x" command format
I have both sides of the recipe card on the same stack card.
I am trying to print to 4x6 index cards which, of course, print in my inkjet printer by the short 4 inch edge.
I would like to print an area of the window that contains the first card rotated landscape into the printable area of the index card. No matter what I do it does not work. With the code below (which I think is correct) I get an area rotated correctly but only 244 points wide by 216 points high crammed into the "bottom, left" of the card. Which is only a portion of the area expected.

I have tried changing the parameters including feeding the card landscape in the printer to see if it was a problem with rotating to landscape. Results varied but did not include getting the print area on the card as desired. After wasting a LOT of index cards testing this I am hoping someone more experienced with this software may be able to shed some light on this issue.

I am running Windows 7 Pro 64 bit.
Same problem in LiveCode 7.0 and 7.1.1. So I do not think that it is a problem with the program.

-----------------------
on mouseUp
newPrint
end mouseUp

on newPrint
set the printPaperSize to "288,432" -- 4x6
set the printMargins to "10,10,10,10" -- 10 points
set the printPaperOrientation to "Landscape"
print this card from "72,14" to "518,394" into "10,10,278,422"
end newPrint
-----------------------
After using variables to hold the parameters I resorted to hard coding the parameters to simplify the code.
Print area: Top: 72; Left:14; Right:518; Bottom:392
I have swapped all coordinates (top,Left to left,top) (278,422 to 422,278) without a result showing what is wrong. The results varied but in each case the output was clipped in different ways.

Re: Problem with the Print Into command

Posted: Wed Dec 30, 2015 10:53 am
by MaxV
I didn't understand exactly what you are looking for, but I suggest you to create a PDF with livecode and try it:
For example:

########CODE#######
on mouseUp
newPrint
end mouseUp

on newPrint
#switch to current folder
set itemDel to "/"
set the defaultFolder to item 1 to -2 of (the effective fileName of this stack)
set the printPaperSize to "288,432" -- 4x6
set the printMargins to "10,10,10,10" -- 10 points
set the printPaperOrientation to "Landscape"
open printing to pdf "./esempio.pdf"
print this card from "72,14" to "518,394"
close printing
end newPrint
#####END OF CODE#####

Re: Problem with the Print Into command

Posted: Wed Dec 30, 2015 1:45 pm
by LGates23
Thank you for your response