<?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 : SaveToString() throws Exception</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 : SaveToString() throws Exception]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 02:13:32 +0000</pubDate>
  <lastBuildDate>Mon, 24 Nov 2008 10:03:48 +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=989</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[SaveToString() throws Exception : Hi Forum, hi Ingo,still working...]]></title>
   <link>http://www.quickpdf.org/forum/savetostring-throws-exception_topic989_post4613.html#4613</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=961">piehl</a><br /><strong>Subject:</strong> 989<br /><strong>Posted:</strong> 24 Nov 08 at 10:03AM<br /><br />Hi Forum, hi Ingo,<br><br>still working with C# .NET Framework 3.5<br>but upgrading to iSEDQuickPDF.dll v6.02 Beta<br>there is an other curious behaviour I found:<br><br>My Unit Test run, <br>using iSEDQuickPDF statics to create several documents,<br>saving to file and saving to string.<br><br>The method SaveToString() throws an "AccessViolationException",<br>shown below -&gt;<br><br><font face="Courier New, Courier, mono"><font color="#006600">// DOC 1.1 -&gt; File</font><br>int docId = QuickPdfNativeMethods.NewDocument();<br>QuickPdfNativeMethods.SetMeasurementUnits(MeasurementUnit.Millimeters);<br>QuickPdfNativeMethods.SetOrigin(Origin.TopLeft);<br>QuickPdfNativeMethods.SetPageSize("A4 Landscape");<br><br>int fontId = QuickPdfNativeMethods.AddTrueTypeFont("Arial", 0);<br><font color="#006600">//int fontId = QuickPdfNativeMethods.AddTrueTypeFont("Arial", 1);<br>//int fontId = QuickPdfNativeMethods.AddStandardFont(StandardFont.Helvetica);</font><br>QuickPdfNativeMethods.SelectFont(fontId);<br>QuickPdfNativeMethods.SetTextSize(12);<br>QuickPdfNativeMethods.DrawText(10, 10, "Hello World:"); }<br>QuickPdfNativeMethods.SaveToFile(@"C:\Buffer\PdfTest1.pdf");<br>QuickPdfNativeMethods.RemoveDocument(docId);<br><br><font color="#006600">// DOC 1.2 -&gt; String</font><br>docId = QuickPdfNativeMethods.NewDocument();<br>QuickPdfNativeMethods.SetMeasurementUnits(MeasurementUnit.Millimeters);<br>QuickPdfNativeMethods.SetOrigin(Origin.TopLeft);<br>QuickPdfNativeMethods.SetPageSize("A4 Landscape");<br><br>fontId = QuickPdfNativeMethods.AddTrueTypeFont("Arial", 0);<br><font color="#006600">// fontId = QuickPdfNativeMethods.AddTrueTypeFont("Arial", 1);<br>// fontId = QuickPdfNativeMethods.AddStandardFont(StandardFont.Helvetica);</font><br>QuickPdfNativeMethods.SelectFont(fontId);<br>QuickPdfNativeMethods.SetTextSize(12);<br>QuickPdfNativeMethods.DrawText(10, 10, "Hello World:");<br>string sPdf = QuickPdfNativeMethods.SaveToString();<br><b>// throw Exception</b><br>QuickPdfNativeMethods.RemoveDocument(docId);<br><br><font color="#006600">// DOC 2.1 -&gt; Datei</font><br>docId = QuickPdfNativeMethods.NewDocument();<br>QuickPdfNativeMethods.SetMeasurementUnits(MeasurementUnit.Millimeters);<br>QuickPdfNativeMethods.SetOrigin(Origin.TopLeft);<br>QuickPdfNativeMethods.SetPageSize("A4 Landscape");<br><br>fontId = QuickPdfNativeMethods.AddTrueTypeFont("Arial", 0);<br><font color="#006600">// fontId = QuickPdfNativeMethods.AddTrueTypeFont("Arial", 1);<br>// fontId = QuickPdfNativeMethods.AddStandardFont(StandardFont.Helvetica);</font><br>QuickPdfNativeMethods.SelectFont(fontId);<br>QuickPdfNativeMethods.SetTextSize(12);<br>QuickPdfNativeMethods.DrawText(10, 10, "Hello World:");<br>sPdf = QuickPdfNativeMethods.SaveToString();<br><b>// throw Exception</b><br>QuickPdfNativeMethods.RemoveDocument(docId);</font><br><br><br>whenever -&gt;<br>a TrueType Font was added, but not embedded. (AddTrueTypeFont(fontName, 0))<br><u>Exception is throws after min. 2 invokes of SaveToString()</u><br><br>Using -&gt;<br>an embeded TTF. (AddTrueTypeFont(fontName, 1))<br><u>Exception is throws after min. 8 invokes of SaveToString()</u><br><br>Using -&gt;<br><u>a standard font, the SaveToString() still works fine!</u><br><br>Seems to be a bug?<br>Any good advices or workarounds<br>except using standard fonts???<br><br>Best regards,<br>Torsten<br><br>]]>
   </description>
   <pubDate>Mon, 24 Nov 2008 10:03:48 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/savetostring-throws-exception_topic989_post4613.html#4613</guid>
  </item> 
 </channel>
</rss>