<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "SwingController: keeping printHelper settings"]]></title>
		<link>http://www.icefaces.org/JForum/posts/list/28.page</link>
		<description><![CDATA[Latest messages posted in the topic "SwingController: keeping printHelper settings"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>SwingController: keeping printHelper settings</title>
				<description><![CDATA[ Hi, 
maybe this issue was solved elsewhere, so ignore it if it isn't of interest.. 

When i used the SwingController to display a document the printer dialog always used the letter page size as default when i pressed the print button. I wanted to change this beavior using the following 
<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>
      SwingController controller;
          ... // some initialization incl. call controller.openDocument&#40;...&#41;
      controller.getViewModel&#40;&#41;.setPrintHelper&#40;
          new PrintHelper&#40; controller.getDocumentViewController&#40;&#41;, controller
              .getDocument&#40;&#41;.getPageTree&#40;&#41;, MediaSizeName.ISO_A4,
              PrintQuality.NORMAL &#41; &#41;;
</pre>
		</div>
This did not help. The reason is, that the printHelper is always overwritten in SwingController#initialisePrinting(...).

The attached patch helped me. Should i file a bug?
]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/16012.page#60419</guid>
				<link>http://www.icefaces.org/JForum/posts/list/16012.page#60419</link>
				<pubDate><![CDATA[Tue, 9 Feb 2010 06:51:33]]> GMT</pubDate>
				<author><![CDATA[ dmaass]]></author>
			</item>
			<item>
				<title>Re:SwingController: keeping printHelper settings</title>
				<description><![CDATA[ I would probably argue that this isn't a bug as the Viewer RI was intended to be modified by the end user for custom applications.  

If you want to change the default printer I would recommend you change the PrintHelper constructor as follows: 

<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>public PrintHelper&#40;DocumentViewController viewController, PageTree pageTree&#41; {
        this&#40;viewController, pageTree, MediaSizeName.NA_A4, PrintQuality.DRAFT&#41;;
    }</pre>
		</div>

This question is asked quite a lot by the European community.  I think the easiest thing to do on my end it to add a new property to the viewers properties files that would allows uses to change the default printer.  ]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/16012.page#60436</guid>
				<link>http://www.icefaces.org/JForum/posts/list/16012.page#60436</link>
				<pubDate><![CDATA[Tue, 9 Feb 2010 21:37:37]]> GMT</pubDate>
				<author><![CDATA[ patrick.corless]]></author>
			</item>
			<item>
				<title>Re:SwingController: keeping printHelper settings</title>
				<description><![CDATA[ Created to enhancement bug to track this change. http://jira.icefaces.org/browse/PDF-157. ]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/16012.page#60437</guid>
				<link>http://www.icefaces.org/JForum/posts/list/16012.page#60437</link>
				<pubDate><![CDATA[Tue, 9 Feb 2010 21:42:00]]> GMT</pubDate>
				<author><![CDATA[ patrick.corless]]></author>
			</item>
			<item>
				<title>Re:SwingController: keeping printHelper settings</title>
				<description><![CDATA[ Thank you for your quick reply!

Why not simply use the attributes of an already existing PrintHelper as in the proposed patch? I thought this was intended by the writer of (SwingController#initialisePrinting)
<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>
PrintHelper printHelper = viewModel.getPrintHelper&#40;&#41;;
</pre>
		</div>
and the error is at the next line 
<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>
printHelper = new PrintHelper&#40;documentViewController, getPageTree&#40;&#41;&#41;;
</pre>
		</div>
??]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/16012.page#60445</guid>
				<link>http://www.icefaces.org/JForum/posts/list/16012.page#60445</link>
				<pubDate><![CDATA[Wed, 10 Feb 2010 04:55:11]]> GMT</pubDate>
				<author><![CDATA[ dmaass]]></author>
			</item>
			<item>
				<title>Re:SwingController: keeping printHelper settings</title>
				<description><![CDATA[ I see your point now.  I'll also make sure the attributes get copied over as your patch states.  

Since you're now an official contributor to ICEpdf I need you to sign and send in our contributors agreement for all the wonderful legal reasons. You can download the agreement here, http://www.icepdf.org/community/contribute.html



]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/16012.page#60447</guid>
				<link>http://www.icefaces.org/JForum/posts/list/16012.page#60447</link>
				<pubDate><![CDATA[Wed, 10 Feb 2010 06:37:03]]> GMT</pubDate>
				<author><![CDATA[ patrick.corless]]></author>
			</item>
	</channel>
</rss>
