PDF Widget

Dr. Hawkins dochawk at gmail.com
Mon Jun 24 18:57:14 EDT 2019

> Paul provided,

> The same issue exists in the external OR in any printing based on printing cards in LiveCode. If you want someone at higher than screen resolution (like 2x or 4x, you sort of need to size the image or pDF at 2x or 4x off screen (or locked screen) and take a export of the image and the size the image down to 1x size.

I’m to even having success doing it that way. 

 I gave up on printing itself back with 5, when even fonts only rendered at screen resolution . . . I think that’s changed since then, but I”ve been exporting to pdf since then.  (besides, it’s pdfs that we use to file in bankruptcy, anyway).

 Monte mentioned,

> There’s a report open for this here to which I suggested the same workaround Paul has https://quality.livecode.com/show_bug.cgi?id=22134 <https://quality.livecode.com/show_bug.cgi?id=22134> <https://quality.livecode.com/show_bug.cgi?id=22134 <https://quality.livecode.com/show_bug.cgi?id=22134>>
> In order to resolve the report we need to add a way for a widget to draw something different into a printing context than it does normally.

It was I that filed that bug .  .  . but I haven’t succeeded in exporting around it yet.  I have three uploaded files for comparison — iMac, retina MacBook, and scaleFactor 4 on the iMac.

It’s been a couple of decades since I played with postscript (and, much as they deny it, it *IS TOO* Forth!), so I don’t remember details.

My thinking, though, would be to use the postscript base of pdf and skip rendering entirely during export.  Instead, include the source pdf file in the output, and specify a region to contain "250,220 to 400,550 of page 4 of mydoc.pdf”

In my case, just resizing the pdf for resolution won’t get me very far—I will have several regions of pdfs included in an output  page, possibly but not always from the same page of the source, *and* a bunch of livecode fields.  I’ve considered cloning the card and resizing every item, but livecode’s (and the fonts?) handling of margins and the like seems quite non-linear, so I wouldn’t get my carefully arranged output where I’ve meticulously placed and adjusted fields.

Other approaches I’ve contemplated:
1) turning the pdfs to quad density png or pg, and letting my developer maintenance machine scan my output cards pieces, stick make a graphic corresponding to each pdf, put that in the layer immediately above the pdf, and turn it invisible except when exporting.  (but relayerGroupedControls is kind of touchy . . .)
2) export to a pdf without any of the source pdfs (just my own fields), and write a build file with source pdf name, page, and region for each element, and run a shell script to build a postscript file using postscript versions of my source, and then turn that back to pdf.

Richard E. Hawkins, Esq.
The Hawkins Law Firm
3430 E. Flamingo Rd.
Suite 232
Las Vegas, NV  89121
(702) 508-8462

More information about the Use-livecode mailing list