Skip to main content
Inspiring
July 12, 2010
Question

Can you insert and image into a PDF documnet?

  • July 12, 2010
  • 2 replies
  • 2426 views

HI,

I have a project in which we are generating a PDF form and filling in the values that a user has submitted. Before we fill in the information, we need to insert two images that will change each and every time.

I have used  cfpdf addWatermark howerver, that only allows me to insert one image as a water mark and if I call it again to try to add the second image only the last one added gets shown.

Has anyone used itext directly to do this? If so, how? Or if there is a better solution please let me know.

Thanks in Advance,

    This topic has been closed for replies.

    2 replies

    Dileep_NR
    Inspiring
    July 13, 2010

    Try the following

    <img src="file:///D:\img_pdfline.jpg" width="100%">

    Inspiring
    July 13, 2010

    I'll be more than willing to try this but, where should I put this? Are you suggesting to place it between the <cfpdfform> tag?

    Inspiring
    July 12, 2010

    Are you doing anything to keep track of the last image used?

    Inspiring
    July 13, 2010

    The images are generated and I have the path name. So, I can track them for this one instance or really application. However,I need to place them in specific places on the PDF.

    Inspiring
    October 24, 2011

    Hello, I'm trying to accomplish the same task of inserting images in to a PDF; were you able to find a solution?

    Thx


    I would start googling for itext. This is what CF uses to create the PDF

    http://www.geek-tutorials.com/java/itext/itext_image.php

    Good luck!