<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Printing in a Deployed Application</title>
	<atom:link href="http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/</link>
	<description>Loren Shure works on design of the MATLAB language at MathWorks. She writes here about once a week on MATLAB programming and related topics.</description>
	<lastBuildDate>Thu, 09 Feb 2012 04:19:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Peter Webb</title>
		<link>http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-32253</link>
		<dc:creator>Peter Webb</dc:creator>
		<pubDate>Mon, 16 May 2011 20:34:22 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-32253</guid>
		<description>Aaron,

I&#039;m not an expert on MATLAB&#039;s graphics (I&#039;m a compiler guy), but my sources indicate that the Z buffer data is transient and not available to MATLAB functions.</description>
		<content:encoded><![CDATA[<p>Aaron,</p>
<p>I&#8217;m not an expert on MATLAB&#8217;s graphics (I&#8217;m a compiler guy), but my sources indicate that the Z buffer data is transient and not available to MATLAB functions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Wetzler</title>
		<link>http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-32251</link>
		<dc:creator>Aaron Wetzler</dc:creator>
		<pubDate>Wed, 11 May 2011 20:09:32 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-32251</guid>
		<description>Hi
I came across this when trying to discover how to access the z-buffer of a figure. We are trying to simulate simple output of the Kinect by rendering an object and then getting the depth map. The z-buffer should contain exactly what Im looking for but I cant find out how to expose that information. Is their a handle to it somewhere?</description>
		<content:encoded><![CDATA[<p>Hi<br />
I came across this when trying to discover how to access the z-buffer of a figure. We are trying to simulate simple output of the Kinect by rendering an object and then getting the depth map. The z-buffer should contain exactly what Im looking for but I cant find out how to expose that information. Is their a handle to it somewhere?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29991</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Wed, 28 Jan 2009 12:34:14 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29991</guid>
		<description>@ OkinawaDolphin

there is a bug in MCR R2007a. matlab/sys/gs8x is not included in the MCR, Ghostscript will not run.

This bug was fixed as of R2007b

If you are using a previous version, copy the contents of  the matlab/sys/gs8x directory into the MATLAB Component Runtime\v76\sys folder</description>
		<content:encoded><![CDATA[<p>@ OkinawaDolphin</p>
<p>there is a bug in MCR R2007a. matlab/sys/gs8x is not included in the MCR, Ghostscript will not run.</p>
<p>This bug was fixed as of R2007b</p>
<p>If you are using a previous version, copy the contents of  the matlab/sys/gs8x directory into the MATLAB Component Runtime\v76\sys folder</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Eddins</title>
		<link>http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29927</link>
		<dc:creator>Steve Eddins</dc:creator>
		<pubDate>Fri, 12 Dec 2008 14:39:58 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29927</guid>
		<description>Okinawa&#8212;I think it&#039;s safe to assume that the MATLAB Central bloggers are always using the latest version of MATLAB.</description>
		<content:encoded><![CDATA[<p>Okinawa&mdash;I think it&#8217;s safe to assume that the MATLAB Central bloggers are always using the latest version of MATLAB.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OkinawaDolphin</title>
		<link>http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29926</link>
		<dc:creator>OkinawaDolphin</dc:creator>
		<pubDate>Fri, 12 Dec 2008 12:50:04 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29926</guid>
		<description>Well, I have tried creating PDFs with R2007b and it works fine. The PDFs can be saved with hgexport(). It isn&#039;t necessary to use printdlg() or print().

I think the bloggers should be more specific about the Matlab version they refer to. Not all companies and universities purchase the newest release half a year.</description>
		<content:encoded><![CDATA[<p>Well, I have tried creating PDFs with R2007b and it works fine. The PDFs can be saved with hgexport(). It isn&#8217;t necessary to use printdlg() or print().</p>
<p>I think the bloggers should be more specific about the Matlab version they refer to. Not all companies and universities purchase the newest release half a year.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aurélien Queffurust</title>
		<link>http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29920</link>
		<dc:creator>Aurélien Queffurust</dc:creator>
		<pubDate>Tue, 09 Dec 2008 07:33:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29920</guid>
		<description>As I mentionned in a previous post on Steve blog: http://blogs.mathworks.com/steve/2008/09/19/blog-changes/
I really appreciate discussions concerning  MATLAB Compiler. You give a good summary about the differences of appearance of a GUI when deployed or about the main things to be aware when we want to print from a standalone. I am sure technical support will have less phone calls thanks to these articles !
I&#039;ve got 1 topic I&#039;d like to hear more about: how standalones are affected by multithreading combined with explicit parallelism when executed against MDCS?
Thanks,
Aurélien QUEFFURUST</description>
		<content:encoded><![CDATA[<p>As I mentionned in a previous post on Steve blog: <a href="http://blogs.mathworks.com/steve/2008/09/19/blog-changes/" rel="nofollow">http://blogs.mathworks.com/steve/2008/09/19/blog-changes/</a><br />
I really appreciate discussions concerning  MATLAB Compiler. You give a good summary about the differences of appearance of a GUI when deployed or about the main things to be aware when we want to print from a standalone. I am sure technical support will have less phone calls thanks to these articles !<br />
I&#8217;ve got 1 topic I&#8217;d like to hear more about: how standalones are affected by multithreading combined with explicit parallelism when executed against MDCS?<br />
Thanks,<br />
Aurélien QUEFFURUST</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OkinawaDolphin</title>
		<link>http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29908</link>
		<dc:creator>OkinawaDolphin</dc:creator>
		<pubDate>Wed, 03 Dec 2008 07:29:56 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29908</guid>
		<description>Peter Webb,

I tried to generate a PDF document using print with a deployed program. There are several error messages in the DOS window. My Matlab version is R2007a. Is there any work around for the errors described below? What version did you compile your program with?

The error messages are:


Warning: See help sprintf for valid escape sequences.
&gt; In graphics\private\ghostscript at 74
  In print at 290
  In SpeichereAbbildung at 94
  In AlarmMaske\DruckknopfSpeichern_Callback at 522
  In gui_mainfcn at 95
  In AlarmMaske at 42
??? Error using ==&gt; graphics\private\ghostscript at 74
Can not find the directory for Ghostscript in c:

Error in ==&gt; SpeichereAbbildung at 92

Error in ==&gt; AlarmMaske&gt;DruckknopfSpeichern_Callback at 522

Error in ==&gt; gui_mainfcn at 95

Error in ==&gt; AlarmMaske at 42

??? Error using AlarmMaske(&#039;DruckknopfSpeichern_Callback&#039;,gcbo,[],guidata(gcbo))
Error using ==&gt; graphics\private\ghostscript at 307
Error using ==&gt; graphics\private\ghostscript at 74
Can not find the directory for Ghostscript in c:

??? Error while evaluation uicontrol Callback</description>
		<content:encoded><![CDATA[<p>Peter Webb,</p>
<p>I tried to generate a PDF document using print with a deployed program. There are several error messages in the DOS window. My Matlab version is R2007a. Is there any work around for the errors described below? What version did you compile your program with?</p>
<p>The error messages are:</p>
<p>Warning: See help sprintf for valid escape sequences.<br />
&gt; In graphics\private\ghostscript at 74<br />
  In print at 290<br />
  In SpeichereAbbildung at 94<br />
  In AlarmMaske\DruckknopfSpeichern_Callback at 522<br />
  In gui_mainfcn at 95<br />
  In AlarmMaske at 42<br />
??? Error using ==&gt; graphics\private\ghostscript at 74<br />
Can not find the directory for Ghostscript in c:</p>
<p>Error in ==&gt; SpeichereAbbildung at 92</p>
<p>Error in ==&gt; AlarmMaske&gt;DruckknopfSpeichern_Callback at 522</p>
<p>Error in ==&gt; gui_mainfcn at 95</p>
<p>Error in ==&gt; AlarmMaske at 42</p>
<p>??? Error using AlarmMaske(&#8216;DruckknopfSpeichern_Callback&#8217;,gcbo,[],guidata(gcbo))<br />
Error using ==&gt; graphics\private\ghostscript at 307<br />
Error using ==&gt; graphics\private\ghostscript at 74<br />
Can not find the directory for Ghostscript in c:</p>
<p>??? Error while evaluation uicontrol Callback</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Webb</title>
		<link>http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29897</link>
		<dc:creator>Peter Webb</dc:creator>
		<pubDate>Mon, 01 Dec 2008 16:32:38 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29897</guid>
		<description>OkinawaDolphin,

Have you tried printing to PDFs from a deployed application using the PRINT command directly? I&#039;ve compiled and run the toPDF function below on a Windows machine, and it generates a PDF file very similar (if not identical) to that created by an interactive MATLAB session.

function toPDF
    knot;
    print(gcf, &#039;-dpdf&#039;, &#039;knot.pdf&#039;);

Your point about the help button in the Print Preview dialog box is well taken. I&#039;ll enter that as a bug into our bug-tracking system. Thanks for pointing that out.</description>
		<content:encoded><![CDATA[<p>OkinawaDolphin,</p>
<p>Have you tried printing to PDFs from a deployed application using the PRINT command directly? I&#8217;ve compiled and run the toPDF function below on a Windows machine, and it generates a PDF file very similar (if not identical) to that created by an interactive MATLAB session.</p>
<p>function toPDF<br />
    knot;<br />
    print(gcf, &#8216;-dpdf&#8217;, &#8216;knot.pdf&#8217;);</p>
<p>Your point about the help button in the Print Preview dialog box is well taken. I&#8217;ll enter that as a bug into our bug-tracking system. Thanks for pointing that out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OkinawaDolphin</title>
		<link>http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29895</link>
		<dc:creator>OkinawaDolphin</dc:creator>
		<pubDate>Fri, 28 Nov 2008 13:44:52 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29895</guid>
		<description>I found out that it is possible to print PDFs with a good quality. The figure to be printed out or saved to the PDF is resized so its width is equal to the width of the paper (A4). 

The frame around the object of interest is clearly visible. The figure property InvertHardCopy is set to &quot;off&quot; so a white frame is printed/ saved white.

The settings of the PDF printer are chosen in a way that the figure is not resized, but printed/ saved in its original size.

It seems that the only way to save a PDF file from a deployed application is printdlg. Everything else I have tried out so far causes error messages or does not work properly.</description>
		<content:encoded><![CDATA[<p>I found out that it is possible to print PDFs with a good quality. The figure to be printed out or saved to the PDF is resized so its width is equal to the width of the paper (A4). </p>
<p>The frame around the object of interest is clearly visible. The figure property InvertHardCopy is set to &#8220;off&#8221; so a white frame is printed/ saved white.</p>
<p>The settings of the PDF printer are chosen in a way that the figure is not resized, but printed/ saved in its original size.</p>
<p>It seems that the only way to save a PDF file from a deployed application is printdlg. Everything else I have tried out so far causes error messages or does not work properly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OkinawaDolphin</title>
		<link>http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29890</link>
		<dc:creator>OkinawaDolphin</dc:creator>
		<pubDate>Wed, 26 Nov 2008 09:16:54 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/11/25/printing-in-a-deployed-application/#comment-29890</guid>
		<description>Loren,

thank you very much for writing about printing. The function printdlg is handy for deployed applications.

However, there are some little issues about printing:

1. I tried to print a figure containing an image and a title of it to a PDF. The image contains a pengin swimming in a bassin. A colored frame is drawn around the pengin. In the GUI, the contrast between the frame and the background is strong so the frame can be seen very well. The title does not appear in the GUI, but texts in GUIs are readable anyway. However, in the PDF the frame seems to be thinned and the text is somehow smeared.

2. The print preview is in English even on a machine with non-English Windows. Moreover, I get an error message in the DOS window when pressing the help button. This might confuse some users. Either the help button should be invisible in a deployed application or help should be implemented in another way.

It is easy to open a figure and let the user export an image or diagram from there. However, the user might try to use some functionality that does not work properly when the program is deployed. This does not only apply for the print preview. In Matlab it is possible to save a figure to a PDF and the resulting PDF looks good. However, when the program is deployed, trying to save (not to print) a figure to a PDF does not work and causes an error message in the DOS window. A simple, but not very elegant work around is discouraging users from trying to create PDFs.</description>
		<content:encoded><![CDATA[<p>Loren,</p>
<p>thank you very much for writing about printing. The function printdlg is handy for deployed applications.</p>
<p>However, there are some little issues about printing:</p>
<p>1. I tried to print a figure containing an image and a title of it to a PDF. The image contains a pengin swimming in a bassin. A colored frame is drawn around the pengin. In the GUI, the contrast between the frame and the background is strong so the frame can be seen very well. The title does not appear in the GUI, but texts in GUIs are readable anyway. However, in the PDF the frame seems to be thinned and the text is somehow smeared.</p>
<p>2. The print preview is in English even on a machine with non-English Windows. Moreover, I get an error message in the DOS window when pressing the help button. This might confuse some users. Either the help button should be invisible in a deployed application or help should be implemented in another way.</p>
<p>It is easy to open a figure and let the user export an image or diagram from there. However, the user might try to use some functionality that does not work properly when the program is deployed. This does not only apply for the print preview. In Matlab it is possible to save a figure to a PDF and the resulting PDF looks good. However, when the program is deployed, trying to save (not to print) a figure to a PDF does not work and causes an error message in the DOS window. A simple, but not very elegant work around is discouraging users from trying to create PDFs.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

