CFDocument PDF print problem


I'm trying to format a PDF print using <cfdocument> (code below).  I have it formatted for legal paper, no scaling.  The problem is, unless the user selects 'legal' paper in their printer settings, the header gets chopped off (b/c the printer setting is laying out for legal, and instead of putting the extra space at the bottom, or breaking the page to the next page, it wants more room at the top...).  So if the user doesn't select legal, keeps the default letter, the top of the document gets cut off in the printing.

I've pasted the code below.

Any help with this problem would be greatly appreciated.
<cfdocument format="pdf"
	 marginleft = "0.25"
	 marginright = "0.25">
   	 <cfinclude template="scps_report_pdf.cfm">

Open in new window

Who is Participating?
"that it's placed the pdf higher than the 11 inches of paper.  Why doesn't it just start it where the paper starts???"


that's because you have Auto-Rotate and Center checked. That will center vertically as well as horizontally...uncheck it and the top of the page will be the top of the document
are you saying that the pdf is not being generated to the correct size on screen or that it's just not printing properly unless the user changes paper size?

cfdoc should be outputting based on your code (legal gives me 8.5 x14)

the printing issue is a os/printerdriver/acrobat/user problem and there's nothing cfdocument will be able to change there

wkolasaAuthor Commented:
It's not printing properly unless the user selects the correct paper size.  For instance, I set the output to legal, but if the user's default printer setting is letter, then the top of the pdf gets cut off.

I've attached a jpg so you can see what I mean.  Notice at the top (of the preview area) that it's placed the pdf higher than the 11 inches of paper.  Why doesn't it just start it where the paper starts???
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

that's an issue with the way acrobat prints pdfs... just open any pdf that's formatted for legal and you will have the same problem... not sure there's anything you can do about it...

but then any program you print from will not print properly if you don't select the correct paper size

wkolasaAuthor Commented:
Is there a way to force the printer setting, or auto-populate the printer settings dialog box with 'legal' instead of 'letter' paper... b/c that would solve everything.
wkolasaAuthor Commented:
Or, even better, simply turn OFF the 'auto-rotate and center' box.  I'm struggling with this b/c the company I work for CLAIMS this used to work perfectly last year, and now suddenly it doesn't.  My best guess is that it was to do with software updates that allow for these new 'extra' features.  I don't know.  
nothing you can do in coldfusion code for sure. there may be some settings in acrobat reader that can be modified but that's likely a per machine fix.

And yes, it's very likely an issue with added -features- of everyone's favorite bloatware...acrobat

You might try using format="flashpaper" and see if you have any better luck... but if that doesn't work I think you're stuck with the worst possible your end user (sorry)

wkolasaAuthor Commented:
Flashpaper suffers from the same scaling issues.  Thanks SidFishes, you've actually been very helpful (as always).
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.