|
Hi,
we encountered a problem using the latest build of the quickpdf library (version 912).
I have a document with a collection of layers/optional content groups on it and would like to print a selected layer by choice. But the print out of the pdf document always results in an empty pdf document. I do get the right paper size. But the content of the selected, visable and printable layer is not in the printed document. If I use the build 911 the printed document shows the whole content of the source document. It seems like it ignores the optional content group settings 'printable' and 'visable'.
I've read the help and found these two methods:
http://www.quickpdflibrary.com/help/quickpdf/SetOptionalContentGroupPrintable.php - http://www.quickpdflibrary.com/help/quickpdf/SetOptionalContentGroup - Printable.php http://www.quickpdflibrary.com/help/quickpdf/SetOptionalContentGroupVisible.php - http://www.quickpdflibrary.com/help/quickpdf/SetOptionalContentGroupVisible.php
Here's the code I'm using:
Dim qp As Variant Dim tCustomPrinter As String Dim lQPLayerCount As Long Set qp = CreateObject("DebenuPDFLibraryAX0912.PDFLibrary") Call qp.UnlockKey("<REGKEY>") tFileIn = "d:\test_Layer.pdf" tFileOut = "d:\test_PRINT.pdf" ' make ALL layers visible (test file does only have one layer) lQPLayerCount = qp.OptionalContentGroupCount() Do While (lQPLayerCount > 0)
lQPLayerID = qp.GetOptionalContentGroupID(lQPLayerCount)
Call qp.SetOptionalContentGroupPrintable(lQPLayerID, 1)
Call qp.SetOptionalContentGroupVisible(lQPLayerID, 1)
lQPLayerCount = lQPLayerCount - 1
Call qp.UseUnsafeContentStreams(1) tCustomPrinter = qp.NewCustomPrinter(PdfXChangeDriversAPI.PrinterName()) Call qp.PrintDocument(tCustomPrinter, 1 , 1, 0)
If I check the document properties of the source document in Adobe it shows that the settings for printing allowed and visiable are set correctly.
I hope you guys have any suggestions on that problem or has an idea how to print a selecte ogc to a pdf document.
Thank you, Martin
|