<?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 : Another Changing Trays question</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 : General Discussion : Another Changing Trays question]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 04 May 2026 05:56:32 +0000</pubDate>
  <lastBuildDate>Tue, 28 Dec 2021 11:00:45 +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=3783</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[Another Changing Trays question : function GetTraysID()(TraysName:...]]></title>
   <link>http://www.quickpdf.org/forum/another-changing-trays-question_topic3783_post16009.html#16009</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=3313">jack97119</a><br /><strong>Subject:</strong> 3783<br /><strong>Posted:</strong> 28 Dec 21 at 11:00AM<br /><br />&nbsp; function GetTraysID()(TraysName: string; adevice, aport: PWideChar): Word;<div>&nbsp; var</div><div>&nbsp; &nbsp; i, rslt: Integer;</div><div>&nbsp; &nbsp; tBinNames: array of Tbinname;</div><div>&nbsp; &nbsp; BinCodes: array of Word;</div><div>&nbsp; begin</div><div>&nbsp; &nbsp; Result := DM_DEFAULTSOURCE;</div><div>&nbsp; &nbsp; rslt := devicecapabilitiesW(adevice, aport, dc_binnames, nil, nil);</div><div>&nbsp; &nbsp; if rslt &gt; 0 then</div><div>&nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; setlength(tBinNames, rslt);</div><div>&nbsp; &nbsp; &nbsp; setlength(BinCodes, rslt);</div><div>&nbsp; &nbsp; &nbsp; try</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if devicecapabilitiesW(adevice, aport, dc_binnames, @tBinNames&#091;0&#093;,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nil) = -1 then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setlength(BinCodes, 0);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setlength(tBinNames, 0);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; raise exception.Create('error tbinnames');</div><div>&nbsp; &nbsp; &nbsp; &nbsp; end;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if devicecapabilitiesW(adevice, aport, DC_BINS, @BinCodes&#091;0&#093;, nil) = -1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setlength(BinCodes, 0);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setlength(tBinNames, 0);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; raise exception.Create('error&nbsp; BinCodes');</div><div>&nbsp; &nbsp; &nbsp; &nbsp; end;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; for i := 0 to rslt - 1 do</div><div>&nbsp; &nbsp; &nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if TraysName = tBinNames<em> then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Result := BinCodes<em>;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Break;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; end;</div><div>&nbsp; &nbsp; &nbsp; finally</div><div>&nbsp; &nbsp; &nbsp; &nbsp; setlength(BinCodes, 0);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; setlength(tBinNames, 0);</div><div>&nbsp; &nbsp; &nbsp; end;</div><div>&nbsp; &nbsp; end;</div><div>&nbsp; end;</div><div><br></div>]]>
   </description>
   <pubDate>Tue, 28 Dec 2021 11:00:45 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/another-changing-trays-question_topic3783_post16009.html#16009</guid>
  </item> 
  <item>
   <title><![CDATA[Another Changing Trays question : Printer.BeginDoc;  //dosomething...print...]]></title>
   <link>http://www.quickpdf.org/forum/another-changing-trays-question_topic3783_post16008.html#16008</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=3313">jack97119</a><br /><strong>Subject:</strong> 3783<br /><strong>Posted:</strong> 28 Dec 21 at 10:57AM<br /><br /><div><div>&nbsp; &nbsp; Printer.BeginDoc;</div><div>&nbsp; &nbsp; //dosomething...print</div><div><br></div><div>&nbsp; &nbsp; //--------- Changing Trays .... -----------------</div><div>&nbsp; &nbsp; Printer.GetPrinter(device, driver, port, hDMode);</div><div>&nbsp; &nbsp; if (hDMode &lt;&gt; 0) then</div><div>&nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; pDMode := GlobalLock(hDMode);</div><div>&nbsp; &nbsp; &nbsp; if Assigned(pDMode) then</div><div>&nbsp; &nbsp; &nbsp; begin&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pDMode.dmFields := pDMode.dmFields or DMBIN_MANUAL;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pDMode.dmDefaultSource :=GetTraysID();&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;winapi.Windows.EndPage( Printer.Handle );&nbsp; &nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If ResetDC( Printer.canvas.Handle, pDMode^ ) = 0 Then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; showmessage( 'ResetDC failed, '+SysErrorMessage(GetLastError));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GlobalUnlock( hDMode );</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;winapi.Windows.StartPage( Printer.Handle );</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Printer.Canvas.Refresh;</div><div>&nbsp; &nbsp; &nbsp; end;</div><div>&nbsp; &nbsp; //--------------------------------------------------</div><div><br></div><div>&nbsp; &nbsp; //dosomething...print</div><div>&nbsp; &nbsp; Printer.EndDoc;</div><div>&nbsp; &nbsp; end;</div></div><div><br></div><span style="font-size:10px"><br /><br />Edited by jack97119 - 28 Dec 21 at 10:58AM</span>]]>
   </description>
   <pubDate>Tue, 28 Dec 2021 10:57:19 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/another-changing-trays-question_topic3783_post16008.html#16008</guid>
  </item> 
  <item>
   <title><![CDATA[Another Changing Trays question : Hi Bob,that&amp;#039;s not possibl...]]></title>
   <link>http://www.quickpdf.org/forum/another-changing-trays-question_topic3783_post15110.html#15110</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 3783<br /><strong>Posted:</strong> 18 Feb 20 at 10:13PM<br /><br />Hi Bob,<br><br>that's not possible:<br>https://www.debenu.com/kb/can-print-different-printer-trays/<br>Ideas for further enhancements you should post into the official page regarding technical issues.<br>Here's the user/user-community...<br><br>]]>
   </description>
   <pubDate>Tue, 18 Feb 2020 22:13:01 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/another-changing-trays-question_topic3783_post15110.html#15110</guid>
  </item> 
  <item>
   <title><![CDATA[Another Changing Trays question : I also have a question about changing...]]></title>
   <link>http://www.quickpdf.org/forum/another-changing-trays-question_topic3783_post15109.html#15109</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2208">BobW</a><br /><strong>Subject:</strong> 3783<br /><strong>Posted:</strong> 17 Feb 20 at 4:32PM<br /><br /><div>I also have a question about changing trays.&nbsp; Using the library, I can look at each page of my PDF and determine which tray I want to draw from.&nbsp; I created a custom printer and can change its tray during printing&nbsp; My problem is that it creates a new print spool job each time I switch trays.&nbsp; For instance if I see the first 5 pages go to tray 2:</div><div>set the tray to 2 and PrintPages 1-5&nbsp;</div><div><div style="color: rgb0, 0, 0; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decorati&#111;n: n&#111;ne; text-indent: 0px; text-trans: n&#111;ne; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">then change the tray to 3 and PrintPages 6</div><div style="color: rgb0, 0, 0; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decorati&#111;n: n&#111;ne; text-indent: 0px; text-trans: n&#111;ne; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">then change the tray the back to 2 and PrintPages 7-11, etc.</div><div style="color: rgb0, 0, 0; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decorati&#111;n: n&#111;ne; text-indent: 0px; text-trans: n&#111;ne; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><br></div><div style="color: rgb0, 0, 0; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decorati&#111;n: n&#111;ne; text-indent: 0px; text-trans: n&#111;ne; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">This can potentially create hundreds of spool jobs (I create a print very large PDFs).</div><div style="color: rgb0, 0, 0; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decorati&#111;n: n&#111;ne; text-indent: 0px; text-trans: n&#111;ne; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><br></div><div style="color: rgb0, 0, 0; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decorati&#111;n: n&#111;ne; text-indent: 0px; text-trans: n&#111;ne; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">Is there any way I can perform this in a single print job?&nbsp; If not, this would be a great feature to add.&nbsp; Something like:</div><div style="color: rgb0, 0, 0; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decorati&#111;n: n&#111;ne; text-indent: 0px; text-trans: n&#111;ne; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><br></div><div style="color: rgb0, 0, 0; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decorati&#111;n: n&#111;ne; text-indent: 0px; text-trans: n&#111;ne; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">StartPrinter</div><div style="color: rgb0, 0, 0; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decorati&#111;n: n&#111;ne; text-indent: 0px; text-trans: n&#111;ne; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">print to tray 2</div><div style="color: rgb0, 0, 0; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decorati&#111;n: n&#111;ne; text-indent: 0px; text-trans: n&#111;ne; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">print to tray 3</div><div style="color: rgb0, 0, 0; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decorati&#111;n: n&#111;ne; text-indent: 0px; text-trans: n&#111;ne; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">print to tray 2</div><div style="color: rgb0, 0, 0; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decorati&#111;n: n&#111;ne; text-indent: 0px; text-trans: n&#111;ne; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">EndPrinter</div></div>]]>
   </description>
   <pubDate>Mon, 17 Feb 2020 16:32:59 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/another-changing-trays-question_topic3783_post15109.html#15109</guid>
  </item> 
 </channel>
</rss>