Printing just one card to PDF [was Re: The owner of a selected control - a mystery]
Graham Samuel
livfoss at mac.com
Tue Feb 24 06:19:15 EST 2015
Wow! It worked! I did not get an extra page, and so I got what I wanted.
At first sight, I couldn't see the functional difference between my code and yours., then I realised that you set the printMargins BEFORE your ‘open printing’ statement, and I’d set them afterwards. I suppose to the engine this is somehow logical. I will see if a clarifications needs to go into the LC Dictionary.
Thanks - wonderful!
Graham
PS This was using LC 7.0.2 rc-2 on a Mac with Yosemite 10.10.2
> On 24 Feb 2015, at 01:29, Paul Hibbert <paul at livecode.org> wrote:
>
>
>> On Feb 23, 2015, at 1:00 AM, Graham Samuel <livfoss at mac.com> wrote:
>>
>> I am trying to understand how to generate a PDF which has exactly the same dimensions as the object which is being ‘printed’
>
>
> Try this…
>
> set the printMargins to 0,0,0,0
> set the printPaperSize to the width of this card,the height of this card
> open printing to pdf specialFolderPath("Documents") & "/mytest.pdf" -- or Wherever
> print this card
> close printing
>
> It works for me in LC5.5.5 to LC7.0.2(rc2).
>
> Paul
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list