<?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 : AddImageFromString</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 : AddImageFromString]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 14 May 2026 16:51:22 +0000</pubDate>
  <lastBuildDate>Sat, 31 Jul 2021 15:14: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=3942</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[AddImageFromString : From my opinion opening an image...]]></title>
   <link>http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15849.html#15849</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 3942<br /><strong>Posted:</strong> 31 Jul 21 at 3:14PM<br /><br />From my opinion opening an image with notepad should give me the same view than look directly into your string content. Are there differences?<br>BTW: There's another function called AddImageFromStream available...<br><br>]]>
   </description>
   <pubDate>Sat, 31 Jul 2021 15:14:09 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15849.html#15849</guid>
  </item> 
  <item>
   <title><![CDATA[AddImageFromString : The links that Ingo posted confirm...]]></title>
   <link>http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15848.html#15848</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1388">tfrost</a><br /><strong>Subject:</strong> 3942<br /><strong>Posted:</strong> 30 Jul 21 at 9:08PM<br /><br />The links that Ingo posted confirm my feeling that the problem is much more likely to arise in preparing the 'string', and not in QPDF itself.&nbsp; The key to passing the data to QPDF is <b>never</b> to treat it as a 'string'.&nbsp; It is just a block of bytes. If you ever give the compiler a chance to treat it as a string, C or C++ functions will stop processing at the first null byte (and there are many of these in an image). So my feeling is that if you really 'read a string from the table' you will end up with only a tiny piece of it; the rest will have disappeared already, before you even try to pass it to QPDF.&nbsp; You should treat it always as an array of bytes, and only use 'string' when you cast the pointer to pass to QPDF.&nbsp; But I never use C with QPDF, so do not have personal experience of this problem!]]>
   </description>
   <pubDate>Fri, 30 Jul 2021 21:08:13 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15848.html#15848</guid>
  </item> 
  <item>
   <title><![CDATA[AddImageFromString : Hi,I jump into this thread for...]]></title>
   <link>http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15847.html#15847</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=3224">JanX</a><br /><strong>Subject:</strong> 3942<br /><strong>Posted:</strong> 30 Jul 21 at 7:51PM<br /><br /><div>Hi,</div><div><br></div><div>I jump into this thread for I face the same problem as Edgar. And I tried LastErrorCode() as suggested, but that also returns a 0.</div><div><br></div><div>The point is: AddImageFromFile() works like a charme. But what I do (please don't discuss this) is that the picture is stored in a binary table field. The character set of this table is ANSI. When creating the PDF file I read the string from the table. And I want to add this string to the pdf without the detour storing this string to a temp file and adding this to the PDF via AddImageFromFile().</div><div><br></div><div>So: When AddImageFromFile() (and all other function calls I do) is working, but AddImageFromString() and LastErrorCode() both return a 0 - what's wrong?</div><div><br></div><div>JanX<br></div>]]>
   </description>
   <pubDate>Fri, 30 Jul 2021 19:51:24 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15847.html#15847</guid>
  </item> 
  <item>
   <title><![CDATA[AddImageFromString : These three threads will give...]]></title>
   <link>http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15844.html#15844</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 3942<br /><strong>Posted:</strong> 26 Jul 21 at 10:11PM<br /><br />These three threads will give you an idea how to do it the right way:<br>http://www.quickpdf.org/forum/c-using-addimagefromstring-with-drawingimaging_topic2308.html<br>http://www.quickpdf.org/forum/addimagefromstring-in-c-dll-project-resolved_topic2144.html<br>https://www.debenu.com/kb/how-do-i-programmatically-create-thumbnails-for-pages-in-pdfs/<br><br>]]>
   </description>
   <pubDate>Mon, 26 Jul 2021 22:11:10 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15844.html#15844</guid>
  </item> 
  <item>
   <title><![CDATA[AddImageFromString : instead you should try LastErrorCode...]]></title>
   <link>http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15843.html#15843</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 3942<br /><strong>Posted:</strong> 26 Jul 21 at 10:06PM<br /><br />instead you should try LastErrorCode directly after the function call.<br>Perhaps then you'll get a more detailed info about the error.<br><br>]]>
   </description>
   <pubDate>Mon, 26 Jul 2021 22:06:39 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15843.html#15843</guid>
  </item> 
  <item>
   <title><![CDATA[AddImageFromString : For the DLL version the C++ header...]]></title>
   <link>http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15841.html#15841</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1054">eborger</a><br /><strong>Subject:</strong> 3942<br /><strong>Posted:</strong> 25 Jul 21 at 5:52PM<br /><br /><div>For the DLL version the C++ header (QPDF 18) declares the parameter as a string, not a wstring. Your guess is as good as mine as to the format it expects, but I would try pointing it at a simple array of bytes containing the file contents. Of course this data may contain byte values of zero, so it is not really a null-terminated string.</div><div><br style=": rgb251, 251, 253;"></div><div>this is what I did, and I get an 0 (error) return .... so I guess it must have some kind of header or something.... I will try contacting support...</div><div>Thanks</div>]]>
   </description>
   <pubDate>Sun, 25 Jul 2021 17:52:30 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15841.html#15841</guid>
  </item> 
  <item>
   <title><![CDATA[AddImageFromString : I have never used this function...]]></title>
   <link>http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15840.html#15840</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1388">tfrost</a><br /><strong>Subject:</strong> 3942<br /><strong>Posted:</strong> 25 Jul 21 at 10:58AM<br /><br />I have never used this function (and never want to, after looking into it), so all I know is what is in the documentation and what the Delphi IDE tells me. For Delphi, the DCU object file (QPDF&nbsp; 18) says the parameter is a WideString, but in the (QPDF 16) source code that I no longer use it is declared as an AnsiString and moved directly into a memorystream for use. This is one reason why it is not worth my experimenting in Delphi, because would be is simpler to use ...fromStream and be certain, if I needed this functionality!<div><br></div><div>For the ActiveX version, the QPDF 18 documentation makes clear that it is a string of 16-bit characters, and that only the low 8 bits of each character are used. So this function needs work to create its parameter from real-world image data, before you can call it in this way.</div><div><br></div><div>For the DLL version the C++ header (QPDF 18) declares the parameter as a string, not a wstring. Your guess is as good as mine as to the format it expects, but I would try pointing it at a simple array of bytes containing the file contents. Of course this data may contain byte values of zero, so it is not really a null-terminated string.</div><div><br></div>]]>
   </description>
   <pubDate>Sun, 25 Jul 2021 10:58:32 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15840.html#15840</guid>
  </item> 
  <item>
   <title><![CDATA[AddImageFromString : with AddImageFromFile it works...]]></title>
   <link>http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15839.html#15839</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1054">eborger</a><br /><strong>Subject:</strong> 3942<br /><strong>Posted:</strong> 24 Jul 21 at 9:32PM<br /><br />with AddImageFromFile it works fine, so the question is how should the string be built ?<div>I am using Xbase++ language which is C++ based, and calling the DLL version of the lib.</div><div>Is there a prefix to the string ? what is the valid format of the string ?</div><div><br></div><div>Thanks,</div><div>Edgar</div>]]>
   </description>
   <pubDate>Sat, 24 Jul 2021 21:32:56 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15839.html#15839</guid>
  </item> 
  <item>
   <title><![CDATA[AddImageFromString : If you have the images as files,...]]></title>
   <link>http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15838.html#15838</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1388">tfrost</a><br /><strong>Subject:</strong> 3942<br /><strong>Posted:</strong> 24 Jul 21 at 7:17PM<br /><br />If you have the images as files, have you already tried AddImageFromFile?&nbsp; If this works, then you have ruled out any problem about&nbsp; the data.&nbsp; If there is some reason why you cannot use files in your application, then how you build the string depends on what programming language you are using, which you have not said.]]>
   </description>
   <pubDate>Sat, 24 Jul 2021 19:17:15 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15838.html#15838</guid>
  </item> 
  <item>
   <title><![CDATA[AddImageFromString : Hello,I am trying to use the AddImageFromString...]]></title>
   <link>http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15837.html#15837</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1054">eborger</a><br /><strong>Subject:</strong> 3942<br /><strong>Posted:</strong> 24 Jul 21 at 6:15PM<br /><br />Hello,<div><br></div><div>I am trying to use the AddImageFromString function, but get a 0 result (error), what kind of string should this be ?&nbsp;</div><div>I loaded a BMP and a JPG file into memory, but it does not work, can you help me ?</div><div><br></div><div>thank you,</div><div>Edgar</div><div><br></div>]]>
   </description>
   <pubDate>Sat, 24 Jul 2021 18:15:23 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/addimagefromstring_topic3942_post15837.html#15837</guid>
  </item> 
 </channel>
</rss>