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:06:18 EST 2015


Richard, thanks for that.

OK,  I’m trying to follow your code. As I understand it, you have a card whose name is in “otCd”. You print the whole card by setting its rectangle. However you don’t print it to a conceptual bit of paper the same size as the card, do you? It looks like the size of the ‘paper' you print it into are numbers of pixels representing a classic US page size (is this right?), and you have margins too. So this doesn’t fulfil my admittedly rather specialised notion of having a PDF that has absolutely no margins or white space outside the confines of the original card, thus acting as a surrogate screen shot of the card.

I’ll just keep tinkering with Terry Judd’s suggestions and Jacque Gay’s sage advice (when time allows).

Cheers

Graham


> On 23 Feb 2015, at 23:26, Dr. Hawkins <dochawk at gmail.com> wrote:
> 
> On Mon, Feb 23, 2015 at 1:00 AM, Graham Samuel <livfoss at mac.com> wrote:
> 
>> But meanwhile, for my personal knowledge database, I am trying to
>> understand how to generate a PDF which has exactly the same dimensions as
>> the object which is being ‘printed’
>> 
> 
> I currently have this:
> 
>      --      print otCd from 0,0 to pg_wdt,pg_hgt into 18,18,576+18,756
>      print otCd into 18,18,576+18,756
> 
> The commented version worked in 5.5.  I had to change to the current
> version for 7.  If memory serves, it was crashing.
> 
> In any event, keeping the card to the same dimensions should do it (at
> least with square pixels . . .)
> 
> Also, it was set up in preOpenCard with
> set the height of me to pg_hgt  --+ the height of graphic "bgCtrlRect"
> --room at the bottom for controls
>   set the width of me to 8*72
>   set the printMargins to 12,12,24,24
> 
> The older bgCtrlRect was an area that hung around at the bottom.  The
> crashes led to my replacing it with a palette (which was on my to do list,
> anyway).
> 
> I don't think I've tried the offending language in 7.0.2 (undoing my
> workarounds is *way* down on the priorities list).
> 
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> 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