Page 1 of 1
printing cards
Posted: Tue Jun 22, 2010 7:50 am
by Glenn Boyce
I seem to be having a lot of trouble printing a card. when I print manually from a stack (when I'm in the application builder) only part of the card is printed on an A4 page. I've tried setting up buttons to print using the print into command and it doesn't make any difference. At this stage if I want to print a complete card I have to take a screen shot and paste it into Word! size of the card is 1008,700 pixels.
Re: printing cards
Posted: Tue Jun 22, 2010 2:28 pm
by dunbarx
Is the card larger than the A4 page? In other words, when you say "only part of the card is printed..." do you mean that most of the A4 page itself is blank, or is the page fully filled up, but with only part of the card?
Re: printing cards
Posted: Tue Jun 22, 2010 11:20 pm
by Glenn Boyce
The card is 1008 by 700 pixels which fits comfortably on a laptop screen. even when I reduce the size in the printer dialogue I still get the same image (part of the card) but smaller!
cheers
Glenn
Re: printing cards
Posted: Wed Jun 23, 2010 6:18 am
by Janschenkel
By default, printing doesn't scale the card to fit your paper size and/or print margins. So you're going to have to do some scripting. Off the top of my head:
Code: Select all
on mouseUp
local tTargetRectangle, tTargetWidth, tTargetHeight, tSourceWidth, tSourceHeight
local tBestFitScale, tPrintMargins
--
answer page setup
if the result is "Cancel" then exit mouseUp
-- determine the available width and height on the page
put the printRectangle into tTargetRectangle
put item 3 of tTargetRectangle - item 1 of tTargetRectangle into tTargetWidth
put item 4 of tTargetRectangle - item 2 of tTargetRectangle into tTargetHeight
put the width of this stack into tSourceWidth
put the height of this stack into tSourceHeight
-- determine the print scale and set it before printing
put min(tTargetWidth / tSourceWidth, tTargetHeight / tSourceHeight) into tBestFitScale
put min(1, tBestFitScale) into tBestFitScale
set the printScale to tBestFitScale
-- finally set the printMargins to fit the available print area
put item 1 of tTargetRectangle, \
item 2 of tTargetRectangle, \
item 1 of tTargetRectangle, \
item 2 of tTargetRectangle \
into tPrintMargins
set the printMargins to tPrintMargins
-- go ahead and print
open printing with dialog
if the result is "Cancel" then exit mouseUp
print this card
close printing
end mouseUp
This will use the most of the printable paper area, scaling to keep the aspect ratio (without blowing it up). If you're running on Windows, printing may not look so good - best to read up on printing in the User Guide pdf file.
HTH,
Jan Schenkel.
Re: printing cards
Posted: Mon Jun 28, 2010 2:04 am
by Glenn Boyce
Thanks Jan. Have read up the PDF also.