Pavel Vassiliev wrote:
On 2/16/06, Philipp Lohmann - Sun Germany <[EMAIL PROTECTED]> wrote:
Hi,

Pavel Vassiliev wrote:
On 2/16/06, Philipp Lohmann - Sun Germany - ham02 - Hamburg
I made research of the PDF export source code and as I understood you
just take the snapshot of the page, save it to JPEG and then write
this page image stream into the pdf file.
I'm not quite sure what you mean here ? Signatures need JPEG's of the
page streams ? I thought signatures would need only a digest over most
of the PDF file as detailed in PDF reference 1.5 chapter 8.7.

Yes, that's the way it should be. I just tried to understand the way
you export document to PDF.

The abstract for PDF export goes like this:

Applications treat PDF export basically as if they would print their document. Instead of going to the printer all drawing operations (bitmaps, lines, polygons, text, whatever) get recorded in a metafile.

That metafile gets replayed and each of its actions causes a call to PDFWriter (the actual details are in the filter module in filter/source/pdf/pdfexport.cxx which does the metafile replaying and from there calls PDFWriter in vcl module). PDFWriter (or rather its implementation class in vcl/source/gdi/pdfwriter_impl.cxx) then translates the calls like DrawBitmap, DrawText, etc. into PDF operators which get written into the page streams.

Each time the metafile contains a StartPage the current page object is ended and a new one begins.

There is some extra stuff going on for things that do not fit into a metafile (like controls, hyperlinks, document structure). These get processed either on the fly or after all pages are done and before the PDF document is complete (e.g. for annotations most things can be set after all pages are finished since the actual annotation objects have not yet been written).

For signatures I'd suggest setting the necessary certificates (and other necessary information) as part of the Context with which the PDFWriter class gets created. Alternatively one could change the emit method of PDFWriter (which finalizes the PDF file) to accept optional signature information.

Since signatures seem to involve a signature field, we also need to decide where in the document that should be and what it should look like (if at all, PDF reference mentions that a signature field can be invisible indicating that by width and height 0).

Kind regards, pl

--
If you give someone a program, you will frustrate them for a day;
if you teach them how to program, you will frustrate them for a lifetime.
     -- Author unknown

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to