Solved

Insert a image dynamically on each page on a pdf report

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

Expert Comment

by:dgrafx
Comment Utility
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
Comment Utility
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 24

Expert Comment

by:dgrafx
Comment Utility
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
website does not load without www 12 65
Why addon domain redirects to the original domain? 8 58
Website URL redirection 10 52
WEB Farm 6 22
This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
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…
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

19 Experts available now in Live!

Get 1:1 Help Now