Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 429
  • Last Modified:

PDF not being created with images on some computers accessing a Coldfusion server

I have a windows 2003 server running Coldfusion. I have created basic html forms that the user fills out. On submit, the server creates a PDF using the <cfdocument> tag. It then emails the document and then opens it in the client browser so it can be printed.  The computers are all corporate and generally standard. They run Windows XP and use IE for a browser. On most of the client computers using the form everything works fine. On a hand full of machines, however, the PDF gets created with boxes containing a red x where the images should be. I have looked at some of the machines to be sure they were standard and had the right versions of windows and browser. I tried the very simple code listed below in case there was some sort of memory issue. I get the same result. On most machines it works fine but on some even this simple code creates a PDF without images. Is there some browser setting I am missing?
<cfdocument format="pdf">
	<img src="images/agclogo.jpg" width="100px" />
</cfdocument>

Open in new window

0
agcsupport
Asked:
agcsupport
  • 5
  • 3
2 Solutions
 
erikTsomikSystem Architect, CF programmer Commented:
what is CF version are you using
0
 
erikTsomikSystem Architect, CF programmer Commented:
is that a CF 7 ?

0
 
agcsupportAuthor Commented:
I am using CF8.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
erikTsomikSystem Architect, CF programmer Commented:
try this

<cfset LImage="images/agclogo.jpg">
<cfdocument format="pdf">
        <img src="#lImage#" width="100px" />
</cfdocument>
0
 
agcsupportAuthor Commented:
It does the same thing.

I noticed a posting describing image issues that are similar but on a previous version. In my case, however, the problem seems to be with specific machines as opposed to the amount of load on the server cpu. I wonder if there is some way to slow down the PDF process to be sure the images render properly, or use another type that would render more quickly? Just a thought based on the note below.
Unfortunately this person did not get a response.

----- similar problem ------

We are running CFMX7 on a Windows 2003 Server w/SP1 installed. Server is 2-cpu
Dell 2650.

We have a page with 8 photo images on it. If I load the page using cfhttp and
put the content into a PDF document using cfdocument, I can get one of two
results:

1. Most often, the first one or two images render OK, and the rest render at
too high a magnification and as if the image was cropped on the bottom and
right. In other words, we see the upper left corner of the image. This
happens when there is little CPU load on the server (i.e., 20% or lower).

2.Once in a while, all of the images in the page render properly. This ALWAYS
SEEMS TO HAPPEN when there is a fair amount of CPU load on the server (perhaps
50% or higher).

This is quite repeatable. There appears to be a timing issue with the
rendering of images in PDF files created by cfdocument. It is as if the
document is being created faster than the images can be rendered if there is
enough CPU speed available on the server.

We have width and height values in all the images.

Have seen several threads about improper image behavior like this, so thought
these results might be of interest. If anyone has a suggestion or a solution,
it would be much appreciated. -bg
0
 
SidFishesCommented:
0
 
agcsupportAuthor Commented:
I found the solution. Use File System With CFdocument as shown.

<cfdocument format="pdf">
        <img src="file:///d:\mysite\images\myimage.jpg" width="50" height="60">
</cfdocument>

It does seem to be some sort of access issue and not a rendering issue.          
0
 
erikTsomikSystem Architect, CF programmer Commented:
That if you have CF 7
0
 
erikTsomikSystem Architect, CF programmer Commented:
i believe i gave the correct answer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now