Solved

Insert a image dynamically on each page on a pdf report

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

632 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