<?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 : Adding Images to Templates</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 : General Discussion : Adding Images to Templates]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 04 May 2026 07:10:24 +0000</pubDate>
  <lastBuildDate>Mon, 16 Jan 2006 08:14:55 +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=265</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[Adding Images to Templates : Ah, I forgot to mention:  Here...]]></title>
   <link>http://www.quickpdf.org/forum/adding-images-to-templates_topic265_post1039.html#1039</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=153">jabaltie</a><br /><strong>Subject:</strong> 265<br /><strong>Posted:</strong> 16 Jan 06 at 8:14AM<br /><br />Ah, I forgot to mention:<br /><br />Here are some samples of the images I'd like to add :<br /><br />- A student's photo : <br /><br />http://www.DES.online.unimep.br/au/photo.jpg<br /><br />- The student's identification document (a scanned copy of it ) :<br /><br />http://www.DES.online.unimep.br/au/ident.jpg<br /><br />Thanks again !]]>
   </description>
   <pubDate>Mon, 16 Jan 2006 08:14:55 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/adding-images-to-templates_topic265_post1039.html#1039</guid>
  </item> 
  <item>
   <title><![CDATA[Adding Images to Templates : This message is a bit long. Sorry...  I...]]></title>
   <link>http://www.quickpdf.org/forum/adding-images-to-templates_topic265_post1038.html#1038</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=153">jabaltie</a><br /><strong>Subject:</strong> 265<br /><strong>Posted:</strong> 16 Jan 06 at 8:07AM<br /><br />This message is a bit long. Sorry...<br /><br />I have PDF templates, which are simply PDF with empty form fields.<br /><br />I stuff data onto these fields on-the-fly, using SetFormFieldValue. <br /><br />I read the data to be filled in from a XML document that comes from a Unisys mainframe and was generated in Cobol.<br /><br />So, it works like this : I generate the XML text file on the mainframe and download it. Then I read the XML document. There inside this XML I have the name of the PDF template that I must use to fill in. I also have an array of  form field name/form field value inside this XML. So, I loop across this entity of the XML and do the form filling on the PDF. After all, I save (or print) the resulting PDF.<br /><br />Should you want to have a look on a XML, get a sample from here : <br /><br />http://www.DES.online.unimep.br/au/pdffields.xml<br /><br />So far, so good. It's working perfectly.<br /><br />But now I also want to sophisticate it some more, by adding dynamic images on-the-fly, which are always JPG files, as if they were form fields. I'm not talking about logotypes for instance cause these images would be there on the PDF template already. They're static. I'm talking about dynamic (variable) images.<br /><br />Examples of use for that :<br /><br />1) I have a form where I want to add the photo (picture) of the student (we're an University).<br /><br />2) On another form, I want to add a scanned copy of the student's identification document.<br /><br />3) Yet, on another form, I want to add a map of the place where the student should go to his/her first class on the University. <br /><br />And so far...<br /><br />So my plan is to specify another entity within that original XML that comes from the mainframe. This entity would be a list of the image paths to be added. Images are always JPG files and the XML would specify the path of the image to be added , its positioning within the PDF file and also the image size.<br /><br />Then, finally, my question :<br /><br />After grabbing the data related to the image from the XML file, which would be the best function to add these images onto the PDF ? Would it be FitImage ?<br /><br />I guess so but, would this be function be generic enough  to all of the images I want to add ?<br /><br />I'm considering that all of the images :<br /><br />- are always locallly resident (that is, they always will reside on my hard-disk, although I could later generalize the image path to be also an URL, so I could later fetch the image from outside. For our purposes however we should think that the image would reside locally. If it is not local it would be brought to a local path.<br />- are always JPG files<br />- some are black and white, mostly scanned documents, whereas others are colorful, such as pictures (photos)<br /><br />So, the XML image token would look like :<br /><br />&lt;IMAGES&gt;<br />  &lt;IMAGE&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;ORIGIN TYPE="PATH|URL"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C:\SOMEWHERE\DOWN\ON\MY\HARD\DISK\PHOTO.JPG<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ORIGIN&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;LEFT&gt;NUMBER&lt;/LEFT&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;TOP&gt;NUMBER&lt;/TOP&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;WIDTH&gt;NUMBER&lt;/WIDTH&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;HEIGHT&gt;NUMBER&lt;/HEIGHT&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;HALIGN&gt;NUMBER&lt;/HALIGN&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;VALIGN&gt;NUMBER&lt;/VALIGN&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;ROTATE&gt;NUMBER&lt;/ROTATE&gt;<br />  &lt;/IMAGE&gt;<br />&lt;/IMAGES&gt;<br /><br />Notice that the XML simply "mimics" the FitImage arguments. So I would translate this XML entity to a call to AddImageFromfile and then FitImage.<br /><br />I also should specify a standard measurement unit for the numbers to be specified on the XML.<br /><br />After all, what do you think ?<br /><br />Is it a good plan ?<br /><br />Will "FitImage" be generic enough to add all of the images that would come from the XML ?<br /><br />Would there be some missing information on the original XML or something that would be nice to have, something that could be handy later ?<br /><br />Sorry for being so long...<br /><br />Thank you so much for the appreciation of the issue.<br /><br />]]>
   </description>
   <pubDate>Mon, 16 Jan 2006 08:07:24 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/adding-images-to-templates_topic265_post1038.html#1038</guid>
  </item> 
 </channel>
</rss>