<?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="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : webbrowser control / printing</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : webbrowser control / printing]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 21 Apr 2026 17:13:03 +0000</pubDate>
  <lastBuildDate>Sat, 27 Jun 2009 04:58:14 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=14520</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[webbrowser control / printing : Hi!  This is the way the WebBrowser...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14520&amp;PID=50382&amp;title=webbrowser-control-printing#50382</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3733">Krog</a><br /><strong>Subject:</strong> 14520<br /><strong>Posted:</strong> 27 June 2009 at 4:58am<br /><br />Hi!<br /><br />This is the way the WebBrowser control handles printing: <br /><br />By default, the ExecWB() method passes a copy of the document to a separate thread, which then performs the actual printing. In this way the ExecWB() method returns immediately, without waiting for the thread to finish, and if the browser is destroyed while printing is still in progress, only part of the contents will be printed.<br /><br />You can use the following constants:<br /><br /><table width="99%"><tr><td><pre class="BBcode"><br />Const PRINT_DONTBOTHERUSER = 1<br />Const PRINT_WAITFORCOMPLETION = 2<br /></pre></td></tr></table><br /><br />These can be used to enhance the print function. For example: PRINT_WAITFORCOMPLETION can be used to wait until the pages have been sent to the printer before continuing (especially useful if you want to restore the original header/footer) and PRINT_DONTBOTHERUSER can be used to hide all print dialogs.<br /><br />So the code may look like this:<br /><br /><table width="99%"><tr><td><pre class="BBcode"><br />' start printing, and wait until output has been spooled to printer...<br />WebBrowser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, PRINT_WAITFORCOMPLETION Or PRINT_DONTBOTHERUSER, 0<br /></pre></td></tr></table><br /><br />There is more info in the MSDN link bellow:<br /><br />http://msdn.microsoft.com/en-us/library/aa769937(VS.85).aspx<br />]]>
   </description>
   <pubDate>Sat, 27 Jun 2009 04:58:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14520&amp;PID=50382&amp;title=webbrowser-control-printing#50382</guid>
  </item> 
  <item>
   <title><![CDATA[webbrowser control / printing : hi all,i managed to display +...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14520&amp;PID=49904&amp;title=webbrowser-control-printing#49904</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4807">fuxi</a><br /><strong>Subject:</strong> 14520<br /><strong>Posted:</strong> 12 June 2009 at 10:24am<br /><br />hi all,<br><br>i managed to display + print data but here's my problem:<br><br>i'd like to do somekind of serial printing - the problem: printing gives me missing + blank pages.<br>i'm doing it like this:<br><br>for page=1 to 20<br>&nbsp;&nbsp; with mybrowserWrapper<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .generate_page page ' i'm generating html data out of a database<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .show&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' i'm now saving the html data to a tmpfile, loading it to the control using .navigate tmpfile<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' the html appears, and i'm using Do While htm.Busy: DoEvents: Loop to determine when it has finished loading<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .printIt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' i'm printing like this: htm.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER<br>&nbsp;&nbsp; end with<br>next<br><br>the code seems ok, but there's something with printing, either the printing routine starts before it gets data (blank pages) or it's skipping pages (the loop continues before printing has finished).<br><br>i'm not sure where to find the problem :/ but i guess i need to wait until print has finished before i generate the next page.<br><br>anyone knows how to do it?<br>thanks,<br>fuxi<br>]]>
   </description>
   <pubDate>Fri, 12 Jun 2009 10:24:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14520&amp;PID=49904&amp;title=webbrowser-control-printing#49904</guid>
  </item> 
 </channel>
</rss>