<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : printing layers/ocgs</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : I need help - I can help : printing layers/ocgs]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 03 May 2026 05:37:10 +0000</pubDate>
  <lastBuildDate>Wed, 09 Jan 2013 11:36:25 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=2483</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[printing layers/ocgs : Hi,we encountered a problem using...]]></title>
   <link>http://www.quickpdf.org/forum/printing-layers-ocgs_topic2483_post10394.html#10394</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2096">MartinCS</a><br /><strong>Subject:</strong> 2483<br /><strong>Posted:</strong> 09 Jan 13 at 11:36AM<br /><br />Hi,<div><br></div><div>we encountered a problem using the latest build of the quickpdf library (version 912).</div><div><br></div><div>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'.</div><div><br></div><div>I've read the help and found these two methods:</div><div><br></div><div><div style=": rgb251, 251, 253;"><a href="http://www.quickpdflibrary.com/help/quickpdf/SetOpti&#111;nalC&#111;ntentGroupPrintable.php" target="_blank">http://www.quickpdflibrary.com/help/quickpdf/SetOptionalContentGroup<span ="highlight">Print</span>able.php</a></div><div style=": rgb251, 251, 253;"><a href="http://www.quickpdflibrary.com/help/quickpdf/SetOpti&#111;nalC&#111;ntentGroupVisible.php" target="_blank">http://www.quickpdflibrary.com/help/quickpdf/SetOptionalContentGroupVisible.php</a></div></div><div style=": rgb251, 251, 253;"><br></div><div style=": rgb251, 251, 253;">Here's the code I'm using:</div><div style=": rgb251, 251, 253;"><br></div><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div style=": rgb251, 251, 253;"><span style="line-height: 1.4;"><font color="#666666">Dim qp As Variant</font></span></div><div style=": rgb251, 251, 253;"><div><font color="#666666">Dim tFileIn As String</font></div></div><div style=": rgb251, 251, 253;"><div><font color="#666666">Dim tFileOut As String</font></div></div><div style=": rgb251, 251, 253;"><div><div><font color="#666666">Dim tCustomPrinter As String</font></div></div></div><div style=": rgb251, 251, 253;"><div><div><font color="#666666">Dim lQPLayerCount As Long</font></div></div></div><div style=": rgb251, 251, 253;"><div><div><font color="#666666">Dim lQPLayerID As Long&nbsp;</font></div></div></div><div style=": rgb251, 251, 253;"><div><font color="#666666"><br></font></div></div><div style=": rgb251, 251, 253;"><div><font color="#666666">Set qp = CreateObject("DebenuPDFLibraryAX0912.PDFLibrary")</font></div></div><div style=": rgb251, 251, 253;"><div><font color="#666666">Call qp.UnlockKey("&lt;REGKEY&gt;")</font></div></div><div style=": rgb251, 251, 253;"><div><font color="#666666"><br></font></div></div><div style=": rgb251, 251, 253;"><div><span style="line-height: 1.4;"><font color="#666666">tFileIn = "d:\test_Layer.pdf"</font></span></div></div><div style=": rgb251, 251, 253;"><div><font color="#666666">tFileOut = "d:\test_PRINT.pdf"</font></div></div><div style=": rgb251, 251, 253;"><div><font color="#666666"><br></font></div></div><div style=": rgb251, 251, 253;"><div><font color="#666666">' make ALL layers visible (test file does only have one layer)</font></div></div><div style=": rgb251, 251, 253;"><div><div><font color="#666666">lQPLayerCount = qp.OptionalContentGroupCount()<span ="Apple-tab-span" style="white-space: pre;">	</span></font></div></div></div><div style=": rgb251, 251, 253;"><div><div><font color="#666666">Do While (lQPLayerCount &gt; 0)<span ="Apple-tab-span" style="white-space: pre;">		</span></font></div></div></div></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div style=": rgb251, 251, 253;"><div><div><font color="#666666">lQPLayerID = qp.GetOptionalContentGroupID(lQPLayerCount)<span ="Apple-tab-span" style="white-space: pre;">		</span></font></div></div></div></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div style=": rgb251, 251, 253;"><div><div><font color="#666666">Call qp.SetOptionalContentGroupPrintable(lQPLayerID, 1)</font></div></div></div></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div style=": rgb251, 251, 253;"><div><div><font color="#666666">Call qp.SetOptionalContentGroupVisible(lQPLayerID, 1)</font></div></div></div></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div style=": rgb251, 251, 253;"><div><span style="line-height: 1.4;"><font color="#666666">lQPLayerCount = lQPLayerCount - 1</font></span></div></div></blockquote></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div style=": rgb251, 251, 253;"><div><div><font color="#666666">Loop</font></div></div></div><div style=": rgb251, 251, 253;"><div><font color="#666666"><br></font></div></div><div style=": rgb251, 251, 253;"><div><font color="#666666">Call qp.UseUnsafeContentStreams(1)</font></div></div><div style=": rgb251, 251, 253;"><div><font color="#666666"><br></font></div></div><div style=": rgb251, 251, 253;"><div><font color="#666666">tCustomPrinter = qp.NewCustomPrinter(PdfXChangeDriversAPI.PrinterName())</font></div></div><div style=": rgb251, 251, 253;"><div><font color="#666666"><br></font></div></div><div style=": rgb251, 251, 253;"><div><font color="#666666">Call qp.PrintDocument(tCustomPrinter, 1 , 1, 0)</font></div><div><font color="#666666"><br></font></div></div></blockquote>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.<div><br></div><div>I hope you guys have any suggestions on that problem or has an idea how to print a selecte ogc to a pdf document.</div><div><br></div><div><br></div><div>Thank you,</div><div>Martin</div>]]>
   </description>
   <pubDate>Wed, 09 Jan 2013 11:36:25 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/printing-layers-ocgs_topic2483_post10394.html#10394</guid>
  </item> 
 </channel>
</rss>