Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Insert a image dynamically on each page on a pdf report

Posted on 2008-10-09
3
Medium Priority
?
583 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

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…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

664 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