Solved

Insert a image dynamically on each page on a pdf report

Posted on 2008-10-09
3
576 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

830 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