Hi all,
I have a small (?) problem I ope someone can help me fix.
I am printing a complex layout, so I followed the instructions I found in the user guide. Everything seems to be ok except the margins. I have tried to set them up, but it does not recognize the settings.
This is my code
on mouseUp
open card "GuardarMap" of stack "Guardar" --this is where I have the "header"
hide stack "Guardar"
set the printerOutput to "device"
set the printerName to the first line of the availablePrinters
set the printPaperOrientation to "landscape"
set the printPaperScale to 0.5
set the printMargins to 100,100,100,100 -- I tried several values but nothing works
open printing
set the defaultStack to "Guardar" -- the header
print this card from the topLeft of group "MapHeader" of card "GuardarMap"\
to the bottomRight of group "MapHeader" of card "GuardarMap" into \
the rect of group "MapHeader" of card "GuardarMap"
put the bottom of group "MapHeader" of card "GuardarMap" into tHeaderBottom
set the defaultStack to "Estratego"-- the body
set the printTextAlign to center -- I tried also this, but I am not printing text, so I dont know
print this card from the topLeft of field "Green" of card "BrainMap"\
to the bottomRight of field "Green" of card "BrainMap" into \
0,tHeaderBottom,the right of field "Green" of card "BrainMap", \
the bottom of field "Green" of card "BrainMap" + tHeaderBottom
close printing
end mouseUp
any suggestion will be welcomed
Marta
Printing
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
At first glance, there's nothing wrong with the script, so what is the unexpected behavior? Did you expect the printout to be scaled to fit inside the margins, or be clipped at the margins, or...?
I'm sure we can help you figure it out.
Jan Schenkel.
I'm sure we can help you figure it out.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
problem solved
Just in case anyone is interested. I solved the margins problem. Apparently, the printMargins command does not work for this type of printing.
So, you need to specified the margining in the body of the printing layout.
The example of the user guide sets it up at 0
print the card from the topLeft of field "Green"
to the bottomRight of field "Green" into
72, tHeaderBottom,the right of field "Green",-- the 72 is the left margin
the bottom of field "Green" + tHeaderBottom
I hope it helps to someone
Marta
So, you need to specified the margining in the body of the printing layout.
The example of the user guide sets it up at 0
print the card from the topLeft of field "Green"
to the bottomRight of field "Green" into
72, tHeaderBottom,the right of field "Green",-- the 72 is the left margin
the bottom of field "Green" + tHeaderBottom
I hope it helps to someone
Marta