How to export to PDF an exact area of a card.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
How to export to PDF an exact area of a card.
Can anyone help me? I need to create a pdf with the exact capture of a certain area of a card, that is to say, that the pdf shows exclusively that area WITHOUT ANY MARGIN and with THE SAME PROPORTION.
The only thing I get is either that the pdf keeps the proportion but does not fit the image, or that it fits the image but changes the proportion.
I use the values "842,594" to define the paper (I think they correspond to DIN A4).
Thank you very much in advance.
The only thing I get is either that the pdf keeps the proportion but does not fit the image, or that it fits the image but changes the proportion.
I use the values "842,594" to define the paper (I think they correspond to DIN A4).
Thank you very much in advance.
Re: How to export to PDF an exact area of a card.
Hola Fermin,
we can -> print card [from topLeft to bottomRight] [into pageRect]
So maybe this will work for you?
Out of my head, but should work! (famous last words...
)
Hope I understood you correctly.
Best
Klaus
we can -> print card [from topLeft to bottomRight] [into pageRect]
So maybe this will work for you?
Code: Select all
...
print card 1 from 50,50 to 300,600 into 50,50,300,600
...
![Smile :-)](./images/smilies/icon_smile.gif)
Hope I understood you correctly.
Best
Klaus
Re: How to export to PDF an exact area of a card.
Thank you very much, Klaus and sorry for taking so long to reply.
What I get with your example is a landscape DIN A4 size pdf with the 50,50 to 300,600 capture inside and what I would need is for the document itself to be the exact size of that capture, i.e. in your example: 250 x 550 (300-50) x (600-50). . . . .
I'm looking at the Dictionary and I think the issue has to do with other properties like printPaperSize, etc. Let's see...
Translated with www.DeepL.com/Translator (free version)
What I get with your example is a landscape DIN A4 size pdf with the 50,50 to 300,600 capture inside and what I would need is for the document itself to be the exact size of that capture, i.e. in your example: 250 x 550 (300-50) x (600-50). . . . .
I'm looking at the Dictionary and I think the issue has to do with other properties like printPaperSize, etc. Let's see...
Translated with www.DeepL.com/Translator (free version)
-
- VIP Livecode Opensource Backer
- Posts: 9785
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: How to export to PDF an exact area of a card.
No surprises there...Out of my head,
Craig
Re: How to export to PDF an exact area of a card.
Ah, I see, then you should also set the printpapersize etc. accordingly, like this:Fermin wrote: ↑Wed Dec 15, 2021 4:28 pmThank you very much, Klaus and sorry for taking so long to reply.
What I get with your example is a landscape DIN A4 size pdf with the 50,50 to 300,600 capture inside and what I would need is for the document itself to be the exact size of that capture, i.e. in your example: 250 x 550 (300-50) x (600-50). . . . .
I'm looking at the Dictionary and I think the issue has to do with other properties like printPaperSize, etc. Let's see...
Translated with www.DeepL.com/Translator (free version)
Code: Select all
...
set the printpapersize to "250,550"
open pringting to PDF<filename>
set the printMargins to 0,0,0,0
print this cd from 50,50 to 300,600 into 0,0,250,550
close printing to PDF
...
Re: How to export to PDF an exact area of a card.
Siiii!
Yes, it seems to be working, I have to do some definitive tests but I think it's fixed. Thanks once again Klaus.![Smile :)](./images/smilies/icon_smile.gif)
Yes, it seems to be working, I have to do some definitive tests but I think it's fixed. Thanks once again Klaus.
![Smile :)](./images/smilies/icon_smile.gif)
Re: How to export to PDF an exact area of a card.
De nada, Señor! ![Smile :-)](./images/smilies/icon_smile.gif)
Just corrected the first line in my example script.
![Smile :-)](./images/smilies/icon_smile.gif)
Just corrected the first line in my example script.