<?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 corrupt with Image</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 corrupt with Image]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 15:12:55 +0000</pubDate>
  <lastBuildDate>Thu, 30 Oct 2008 09:07:09 +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=982</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 corrupt with Image : Thats what I found out:Review,trying...]]></title>
   <link>http://www.quickpdf.org/forum/savetostring-corrupt-with-image_topic982_post4591.html#4591</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=961">piehl</a><br /><strong>Subject:</strong> 982<br /><strong>Posted:</strong> 30 Oct 08 at 9:07AM<br /><br />Thats what I found out:<br><br>Review,<br>trying to get my PDF as a stream for displaying in C# Web Application.<br>Using the SaveToString method to convert the given string into a stream.<br>Problem, if the pdf contains an Image, the method SaveToString provides an truncated string.<br><br>More precisely,<br>it depends on the Image <u>format</u>!<br><br>Irrespective of the mode how an Image was added,<br>from file or from string,<br>you get a different behaviour depending on the Image fomat being added.<br><br><b>Using a bmp,</b><br>- the pdf file works fine.<br>- the pdf stream can be open, but the colors were decreased. <br><br><b>Using a jpg</b><br>- the pdf file works fine.<br>- the SaveToString() returns a corrupt string.<br><br>Conclusion,<br>SaveToFile() works fine independend of the image format.<br>SaveToString() can not handle jpgs and produces an unreadable pdf format.<br>SaveToString() can handle bmps but influences the colors of the image.<br><br>For more information,<br>I ll be at your command,<br><br>best regards,<br>Torsten<br><br>]]>
   </description>
   <pubDate>Thu, 30 Oct 2008 09:07:09 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/savetostring-corrupt-with-image_topic982_post4591.html#4591</guid>
  </item> 
  <item>
   <title><![CDATA[SaveToString corrupt with Image : Hi DELBEKE,you are right,that&#180;s...]]></title>
   <link>http://www.quickpdf.org/forum/savetostring-corrupt-with-image_topic982_post4580.html#4580</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=961">piehl</a><br /><strong>Subject:</strong> 982<br /><strong>Posted:</strong> 27 Oct 08 at 5:14AM<br /><br />Hi DELBEKE,<br><br>you are right,<br>that´s my assemption too.<br><br>Thanks<br>]]>
   </description>
   <pubDate>Mon, 27 Oct 2008 05:14:56 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/savetostring-corrupt-with-image_topic982_post4580.html#4580</guid>
  </item> 
  <item>
   <title><![CDATA[SaveToString corrupt with Image : I am not an expert in C, but it...]]></title>
   <link>http://www.quickpdf.org/forum/savetostring-corrupt-with-image_topic982_post4574.html#4574</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=129">DELBEKE</a><br /><strong>Subject:</strong> 982<br /><strong>Posted:</strong> 24 Oct 08 at 5:24PM<br /><br /><P>I am not an expert in C, but it seem to remember that string in C stop with the first nul char.</P><DIV>The data for an image file can contain null chars, perhaps it's the problem.</DIV>]]>
   </description>
   <pubDate>Fri, 24 Oct 2008 17:24:01 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/savetostring-corrupt-with-image_topic982_post4574.html#4574</guid>
  </item> 
  <item>
   <title><![CDATA[SaveToString corrupt with Image : Hello Ingo,hello Forumfirst of...]]></title>
   <link>http://www.quickpdf.org/forum/savetostring-corrupt-with-image_topic982_post4570.html#4570</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=961">piehl</a><br /><strong>Subject:</strong> 982<br /><strong>Posted:</strong> 24 Oct 08 at 6:13AM<br /><br />Hello Ingo,<br>hello Forum<br><br><u>first of all, thanks for your fast reply.</u><br><br>The following piece of code demonstrates the problem I have.<br>The code is placed in a C# WebApplication and wil be invoked by clicking a LinkButton.<br><br><font face="Courier New, Courier, mono">int docId = QuickPdfNativeMethods.NewDocument();<br>QuickPdfNativeMethods.SetMeasurementUnits(MeasurementUnit.Millimeters);<br>QuickPdfNativeMethods.SetOrigin(Origin.TopLeft);<br>QuickPdfNativeMethods.SetPageSize("A4 Landscape");<br>QuickPdfNativeMethods.DrawText(10, 10, "Hello World:");<br><br>// ** optional including image<br>int imgId = QuickPdfNativeMethods.AddImageFromFile(@"images\example.jpg", 0);<br>QuickPdfNativeMethods.SelectImage(imgId);<br>QuickPdfNativeMethods.DrawImage(50, 50, 113, 52);<br>// **</font><br><font face="Courier New, Courier, mono"><br>QuickPdfNativeMethods.SaveToFile(@"C:\Temp\Test.pdf") <br>string sPdf = QuickPdfNativeMethods.SaveToString();</font><br><br>Either generation <b>without </b>including a image<br>Everything works fine.<br>Output is a Test.pdf and a sPdf string for further Web operations<br><br>Or generation <b>with </b>including a image<br>v5.11: generates a correct Test.pdf file, but a incorrect string calling SaveToString()<br>v5.22: generates a correct Test.pdf file, but a incorrect string calling SaveToString()<br>v6.02: generates a correct Test.pdf file, throws an exception caling SaveToString()<br><br>I compared the output string with an image, against the output string without an image (v511, v522)<br>The following difference attract attention:<br><br>string without image:<br>"%PDF-1.4\n%âãÏÓ\n1 0 obj\n&lt;&lt;\n/Type /Pages\n/Count 1\n... ...<b>\n&gt;&gt;\nstartxref\n818\n%%EOF\n</b>"<br><br>string with image:<br>"%PDF-1.4\n%âãÏÓ\n1 0 obj\n&lt;&lt;\n/Type /Pages\n/Count 1\n... .../Image\n/Width 113\n/Height 52\n/ColorSpace /DeviceRGB\n/BitsPerComponent 8\n/Filter /DCTDecode\n&gt;&gt;\nstream<b>\nÿØÿà</b>"<br><br>- the string without an image is longer than the one with an image.<br>- the string with an image seems to be truncated.<br><br>I hope I gave all necessary information to reproduce or to exclude the behaviour.<br><br>Best regards<br>Torsten]]>
   </description>
   <pubDate>Fri, 24 Oct 2008 06:13:12 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/savetostring-corrupt-with-image_topic982_post4570.html#4570</guid>
  </item> 
  <item>
   <title><![CDATA[SaveToString corrupt with Image : Hi Torsten,first a warm welcome...]]></title>
   <link>http://www.quickpdf.org/forum/savetostring-corrupt-with-image_topic982_post4561.html#4561</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 982<br /><strong>Posted:</strong> 23 Oct 08 at 1:17AM<br /><br />Hi Torsten,<br><br>first a warm welcome here!<br>SaveToFile is a really main function - so i don't think that it's a problem with the version 6.02 itself. Perhaps you want to publish the relevant piece of code here - so we can have a look?<br><br>In the library section we have a dll-version 5.22, too. Perhaps you want to try it. Actually few members from this forum are working a lot on the library. Digital signing, aes-encryption and better rendering are main points. Soon we'll upload new compiled versions - so please stay tuned.<br><br>Best regards,<br>Ingo<br>]]>
   </description>
   <pubDate>Thu, 23 Oct 2008 01:17:36 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/savetostring-corrupt-with-image_topic982_post4561.html#4561</guid>
  </item> 
  <item>
   <title><![CDATA[SaveToString corrupt with Image : Hello Forum,I m using the iSEDQuickPDF.dll...]]></title>
   <link>http://www.quickpdf.org/forum/savetostring-corrupt-with-image_topic982_post4559.html#4559</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=961">piehl</a><br /><strong>Subject:</strong> 982<br /><strong>Posted:</strong> 22 Oct 08 at 8:38AM<br /><br />Hello Forum,<br><br>I m using the iSEDQuickPDF.dll 5.11 (file version 4.42.1.1) in a C# ASP WebApplication.<br>A generated pdf can either be saved as a file or directly displayed into the web browser.<br>To display a pdf into browser, I used a MemoryStream (no physical file needed!).<br>Unfortunatly, the SaveToStream method is only available in Delphi, so I found the following workaround:<br><br>First I invoke the method SaveToString,<br>afterwards following the conversation from string to byte&#091;&#093;<br><br><font face="Courier New, Courier, mono">string sPdf = QuickPdfNativeMethods.SaveToString();<br>MemoryStream mem = new MemoryStream(System.Text.ASCIIEncoding.ASCII.GetBytes(sPdf));</font><br><br>This already works,<br>provided that no Image is placed into the document!<br><br>Using <font face="Courier New, Courier, mono">SelectImage(AddImageFromFile/String(...)); and DrawImage();</font><br><br>produces a corrupt stream rather a corrupt or early ending string via SaveToString();<br><br>Is this behaviour a already known?<br>How can I get a String (Stream) from my active document containing a Image?<br><br>Using latest version 6.02 Beta throws an exception when caling SaveToFile.<br><br>Thanks for help<br>Regard Torsten Piehl]]>
   </description>
   <pubDate>Wed, 22 Oct 2008 08:38:37 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/savetostring-corrupt-with-image_topic982_post4559.html#4559</guid>
  </item> 
 </channel>
</rss>