Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

CFDocument PDF print problem

Posted on 2009-02-18
8
Medium Priority
?
1,306 Views
Last Modified: 2012-05-06
Hi,

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"
	orientation="portrait"
	scale="100"
	pagetype="legal"
	margintop=".5"
	 marginbottom=".5"
	 marginleft = "0.25"
	 marginright = "0.25">
   	 <cfinclude template="scps_report_pdf.cfm">
</cfdocument>

Open in new window

0
Comment
Question by:wkolasa
  • 4
  • 4
8 Comments
 
LVL 36

Expert Comment

by:SidFishes
ID: 23674891
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


0
 

Author Comment

by:wkolasa
ID: 23675010
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???
example.jpg
0
 
LVL 36

Expert Comment

by:SidFishes
ID: 23675256
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

0
How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

 
LVL 36

Accepted Solution

by:
SidFishes earned 2000 total points
ID: 23675282
"that it's placed the pdf higher than the 11 inches of paper.  Why doesn't it just start it where the paper starts???"

btw...

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
0
 

Author Comment

by:wkolasa
ID: 23681882
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.
0
 

Author Comment

by:wkolasa
ID: 23681904
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.  
0
 
LVL 36

Expert Comment

by:SidFishes
ID: 23682198
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 option...training your end user (sorry)

0
 

Author Comment

by:wkolasa
ID: 23682228
Flashpaper suffers from the same scaling issues.  Thanks SidFishes, you've actually been very helpful (as always).
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…

810 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