Solved

Insert a image dynamically on each page on a pdf report

Posted on 2008-10-09
3
574 Views
Last Modified: 2013-12-24
I am trying to insert a logo (gif file) dynamically at the top of each page outputting to a  pdf report, using CFDocument & CFDocumentitem.
In Coldfusion 7 the image is huge and in Coldfusion 8 is it tiny.

If I put it outside of the CFDocumentitem tag  it displays perfectly.

What can I do to fix this.???
Its driving me mad.###%%%





<cfdocument format="PDF" orientation="portrait"  pagetype="a4" marginleft="0.1058" marginright="0.1058"  unit="cm" fontembed="yes">

<link rel="stylesheet" href="../../css/print.css" type="text/css" media="print" />

<cfdocumentitem type="header">

	<img src="../../Images/PT_Banner.gif" />

  </cfdocumentitem>

   <cfdocumentitem type="footer">

      <font size="-3">Page #cfdocument.currentpagenumber#</font>

   </cfdocumentitem>      

  

</cfdocument>

Open in new window

0
Comment
Question by:Carid
  • 2
3 Comments
 
LVL 25

Expert Comment

by:dgrafx
ID: 22721975
It has to do with the size of the image.
Start with a real small image (16px x 16px) and you'll see that it displays fine.
Just experiment using a larger image each time until you find the ceiling.

good luck ...
0
 

Accepted Solution

by:
Carid earned 0 total points
ID: 22736215
This does not work.
I've managed to work around the problem by inserting the image into <cfdocumentsection>.
<cfdocumentsection> displays the image using the correct size but the downside is you have to calculate
manually each where each pagebreak occurs.

I will be closing this question now.
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 22737054
well yes - but your question implied that you wanted it in a section that "automatically" put it at the top of each page ...

so anyway ...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now