If you only want to fill in the stamp and then print the result, what
I do is import the pdf as an image, overlay fields wherever I need
them, then fill them in by script, and print the result. If you want
to export it instead of printing it, you could take a snapshot of the
result and export that as jpg or, I guess, as a pdf file, though I'm
not sure about the latter, maybe use the pdfLib for that.
-- Peter
Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig
On Dec 6, 2010, at 1:34 AM, Anthony Howe wrote:
Thanks Jan,
Great to hear the detail around this one. The feature you mention
that you're working on is actually all that we would require and
sounds ideal!
We simply want to 'stamp' an existing document with a customers
unique ID and details. The area of the document to be stamped will
be blank space on each page....at a defined location (footer or
header area, for example) and requires no interaction with the
existing content.
From there, just a re-export of the PDF would be required.
What do you think?
On 06/12/2010, at 5:24 PM, Jan Schenkel <janschen...@yahoo.com> wrote:
--- On Sun, 12/5/10, Anthony Howe <anthonyh...@me.com> wrote:
My question was also not really
around whether PDF export is possible, but rather if it was
possible to open an existing PDF file (which was created in
LC, or not) and add new data (like a personalized footer or
header from LC app data for example), then, reexport it...as
a PDF, ready for distribution.
The answer to this one so far seems to be no.....but I'm
hoping for an angle....:)
Hope that clarifies things, and perhaps I should have
started a separate thread on this question, as I accept it
does stray somewhat from the original post.
*gulp*
Cheers,
A.
While I have written a library to create new PDF files from
scratch, by script, I'm not sure where to begin taking apart an
existing PDF file and modifying its content.
The structure of a PDF file is completely unlike Word DOC or RTF
files. Word processing files are structured around a flow of
paragraphs, sentences and words. PDF files are a set of low-level
instructions (draw a line here, draw this bit of text there, now
switch to font 'Times', set the drawing color to 'red', etc.) and
there is no rigid flow structure.
More precisely, PDF has no concept of paragraphs - you're at the
mercy of the producing application printing each bit of text in the
'right' order to ease extraction. In fact, PDF doesn't even have
text styling concepts other than 'font'. You want an underline?
Draw it yourself.
In fact, it's so complicated that the selection of text in Adobe
Reader or Apple Preview is based on OCR (optical character
recognition) algorithms: we know there's a bit of text here, and
that other bit of text has the same baseline, so that could
actually be a single line of text in the user's mind - let's select
both!
So if you're looking to read an existing file, and modify the
content - such as replacing placeholder text and expecting the
whole flow of the text to update along with it - you have your work
cut out for you.
One feature I have been working on, is the ability to open an
existing PDF file, and use pages from it as a background on top of
which you draw additional elements. In that scenario I'm not even
really tweaking the content, and this is presenting its own
gotchas...
Jan Schenkel.
=====
Quartam Reports & PDF Library for LiveCode
www.quartam.com
=====
"As we grow older, we grow both wiser and more foolish at the same
time." (La Rochefoucauld)
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode