diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-04-01 13:41:13 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-04-02 12:33:34 +0200 |
commit | 51ac74617a33f518d068dd6e1f86431ee805bfbc (patch) | |
tree | dc263bb81bc4de5064541e16863d9c735490fc63 /vcl/README | |
parent | e341ea3863bd19a2884083d2957273cc3572f989 (diff) |
vcl/README: some notes on debugging PDF export
Change-Id: Ic48d6be35fd9308a28d9fa62b184cd34dd8f9f6b
Diffstat (limited to 'vcl/README')
-rw-r--r-- | vcl/README | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/vcl/README b/vcl/README index 76ee2bb21062..65113a62dd5d 100644 --- a/vcl/README +++ b/vcl/README @@ -152,3 +152,39 @@ before running LibreOffice; it will give you lots of useful hints. You can also fallback to EMF (from EMF+) rendering via export EMF_PLUS_DISABLE=1 + + +== Printing/PDF export == + +Printing from Writer works like this: + +1) individual pages print by passing an appropriate OutputDevice to XRenderable +2) in drawinglayer, a VclMetafileProcessor2D is used to record everything on + the page (because the OutputDevice has been set up to record a MetaFile) +3) the pages' MetaFiles are converted to PDF by the vcl::PDFWriter + in vcl/source/gdi/pdfwriter* + +Creating the ODF thumbnail for the first page works as above except step 3 is: + +3) the MetaFile is replayed to create the thumbnail + +On-screen display differs in step 1 and 2: + +1) the VCL Window gets invalidated somehow and paints itself +2) in drawinglayer, a VclPixelProcessor2D is used to display the content + + +=== Debugging PDF export === + +Debugging the PDF export becomes much easier in higher debug-levels, where +compression is disabled (so the PDF file is directly readable) and +the MARK function puts comments into the PDF file about which method +generated the following PDF content. + +touch vcl/source/gdi/pdfwriter* && make vcl dbglevel=3 + +To de-compress the contents of a PDF file written by a release build or +other programs, use the "pdfunzip" tool: + +LD_LIBRARY_PATH=$PWD/instdir/ure/lib workdir/LinkTarget/Executable/pdfunzip input.pdf output.pdf + |