Brian,
Good to make PDF export better, more professional. We uses the export a
lot to deliver PDF to our professional print houses.
It works very wel, exept the lack off "boxes" in the PDF file
TRIMbox = where to cut the printed result (needed for pinting)
BLEEDbox = is mostly TRIMbox + 5mm (needed for printing)
MEDIAbox not realy needed
CROPbox not realt needed
we to the printing with the API and basic code
below our code with all the Filterdata we know off (maybe there are more ?)
so we need some filter options to set the TRIMbox and the BLEEDbox
pdfHighResFilterData() =
array((makepropertyvalue("UseLosslessCompression", false))
AddPropertyValue(pdfHighResFilterData,"Quality",90) ' enkel als we
UseLossLess FALSE is (dan is het jpg)
'AddPropertyValue(pdfHighResFilterData,"ReduceImageResolution",true)
'AddPropertyValue(pdfHighResFilterData,"MaxImageResolution",150) ' only
if reduceImages = TRUE and only 75, 150, 300, 600, 1200 available
AddPropertyValue(pdfHighResFilterData,"UseTaggedPDF",false)
AddPropertyValue(pdfHighResFilterData,"SelectPdfVersion",0) '0= pdf1.4 ,
1= pdf-xa
AddPropertyValue(pdfHighResFilterData,"ExportNotes",false)
AddPropertyValue(pdfHighResFilterData,"ExportBookmarks",false)
AddPropertyValue(pdfHighResFilterData,"OpenBookmarkLevels",-1)
AddPropertyValue(pdfHighResFilterData,"UseTransitionEffects",true)
AddPropertyValue(pdfHighResFilterData,"IsSkipEmptyPages",true)
AddPropertyValue(pdfHighResFilterData,"IsAddStream",false)
AddPropertyValue(pdfHighResFilterData,"EmbedStandardFonts",false)
AddPropertyValue(pdfHighResFilterData,"FormsType",0)
AddPropertyValue(pdfHighResFilterData,"ExportFormFields",true)
AddPropertyValue(pdfHighResFilterData,"AllowDuplicateFieldNames",false)
AddPropertyValue(pdfHighResFilterData,"HideViewerToolbar",false)
AddPropertyValue(pdfHighResFilterData,"HideViewerMenubar",false)
AddPropertyValue(pdfHighResFilterData,"HideViewerWindowControls",false)
AddPropertyValue(pdfHighResFilterData,"ResizeWindowToInitialPage",false)
AddPropertyValue(pdfHighResFilterData,"CenterWindow",false)
AddPropertyValue(pdfHighResFilterData,"OpenInFullScreenMode",false)
AddPropertyValue(pdfHighResFilterData,"DisplayPDFDocumentTitle",true)
AddPropertyValue(pdfHighResFilterData,"InitialView",0)
AddPropertyValue(pdfHighResFilterData,"Magnification",0)
AddPropertyValue(pdfHighResFilterData,"Zoom",100)
AddPropertyValue(pdfHighResFilterData,"PageLayout",0)
AddPropertyValue(pdfHighResFilterData,"FirstPageOnLeft",false)
AddPropertyValue(pdfHighResFilterData,"InitialPage",1)
AddPropertyValue(pdfHighResFilterData,"Printing",2)
AddPropertyValue(pdfHighResFilterData,"Changes",4)
AddPropertyValue(pdfHighResFilterData,"EnableCopyingOfContent",true)
AddPropertyValue(pdfHighResFilterData,"EnableTextAccessForAccessibilityTools",true)
AddPropertyValue(pdfHighResFilterData,"ExportLinksRelativeFsys",false)
AddPropertyValue(pdfHighResFilterData,"PDFViewSelection",0)
AddPropertyValue(pdfHighResFilterData,"ConvertOOoTargetToPDFTarget",false)
AddPropertyValue(pdfHighResFilterData,"ExportBookmarksToPDFDestination",false)
AddPropertyValue(pdfHighResFilterData,"_OkButtonString","")
AddPropertyValue(pdfHighResFilterData,"EncryptFile",false)
AddPropertyValue(pdfHighResFilterData,"DocumentOpenPassword","")
AddPropertyValue(pdfHighResFilterData,"RestrictPermissions",false)
AddPropertyValue(pdfHighResFilterData,"PermissionPassword","")
oExport = Array( _
MakePropertyValue("Overwrite", True), _
MakePropertyValue("FilterName", "writer_pdf_Export"), _
MakePropertyValue("FilterData", pdfHighResFilterData), _
)
oDoc.storeTOURL(path,oExport)
hope i helps
greetz
Ferand
I'm new to LibreOffice development and looking at enhancing the PDF
export functionality, especially for Impress. I would like to add the
print options (such as "print" grayscale, black and white,
pages-per-sheet, ...) to PDF exporting.
Specifically, I'm looking at adding the "LibreOffice Impress" and
"Page Layout" tabs (from the File-->Print dialog) to the
File-->"Export as PDF" dialog. I have traced the code enough to see
that printing and PDF export use the same OutputDevice class, which
seems to support at least some of the options in question, so I'm
hopeful it would work well.
Questions I need help with:
1. Is this a reasonable feature idea?
2. Would this be reasonably straight-forward to implement (i.e., are
printing and PDF export as compatible as I might hope)?
3. Where is the code for the print dialog's tabs, and the export to
PDF dialog's tabs?
4. Where is the code for setting the output layout (ex: 4 pages per
sheet)?
Some background info:
I am a university lecturer and I export PDFs of my notes daily. I can
print to a PDF printer; however Acrobat and PDF Creator under Windows
generate very large PDFs (they come out as bitmaps vs a more "vector"
format). My slides have a background color and the PDF needs to be
black-and-white (to print well without wasting ink), and have 4 slides
per page. I have hacked around the code to prove I can generate a PDF
in the correct black-and-white format, but I'd like to make it a real
feature for everyone's use, rather than a hack in my copy.
All help and guidance is welcome!
Brian
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.