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 <[email protected]> wrote: > > >> On Feb 23, 2015, at 1:00 AM, Graham Samuel <[email protected]> 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 > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
