Print Page | Close Window

Problem with margins when printing

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1952
Printed Date: 14 Dec 25 at 3:29AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Problem with margins when printing
Posted By: xianchian
Subject: Problem with margins when printing
Date Posted: 12 Sep 11 at 5:51PM
Hello,

I implemented a service to print documents using QuickPDF Library.
But I'm facing 2 problems right now

1/ I can't print on a physical printer in grayscale mode
2/ Some documents with custom margins, aren't printed correctly. The outfitting margins aren't printed.

So to fix the 2nd problem i tried to set the Paper length and Paper Width of the PdfLibrary. But i can't find the best value to make the document fit in the printableArea.
Does anyone have an idea on how to deal with this issue please?

Thanks!!



Replies:
Posted By: xianchian
Date Posted: 12 Sep 11 at 5:52PM
For the first point, i posted on an old post talking about it too.
Here is a link to the post
http://www.quickpdf.org/forum/how-to-print-color-pdf-in-grayscale_topic1322.html


Posted By: AndrewC
Date Posted: 13 Sep 11 at 9:49AM

1. One option could be to create a 2nd printer with the print defaults set to your required custom settings as per this comment I found via google - 

http://nicholas.piasecki.name/blog/2008/11/programmatically-selecting-complex-printer-options-in-c-shar/ - http://nicholas.piasecki.name/blog/2008/11/programmatically-selecting-complex-printer-options-in-c-shar/

"What I did was create an entirely new printer with a uniquely indicative name on the print server that points to the same IP address. (I’m using a windows print server, so this might not work if you have a different setup) For this second printer, I clicked Properties>Advanced Tab>Printing Defaults Button, then I configured all of my printing options (default drawer, paper type, stapling options) and saved it. Theoretically anybody who connects to that printer now gets those options as the default. Then in my code, iterate through all connected printers looking for an indicative string in the name and print the job to that printer. I search for a string instead of hardcoding it because I have 2 departments doing the same task to two seperate printers, so all I need to worry about is getting each profile connected to the right printer and the app just works after that."

2. What exactly do you mean by "outfitting margins" - do you mean the cutting or trim marks ?  Do these marks show in Acrobat or other programs.  The CropBox and MediaBox can affect the printing of these marks.  Do you have a sample PDF we can look at ?

Have you looked at the QP.PrintOptions() function that has AutoRotateCentre, FitToPaper  options.

Andrew.


Posted By: xianchian
Date Posted: 14 Sep 11 at 11:07AM
Hello,

2. By outfitting margins i mean cutting. When i print the document with Acrobat, it's going well.
I didn't work with the FitToPaper option, and i'm going to test it to see if it's better.
Once my test will be done, i'll link you to the document printing bad.

Thanks for the answer, i'll look at the link you provided for the 1st point.


Posted By: xianchian
Date Posted: 14 Sep 11 at 11:38AM
2. The FitToPaper did the job.

Now i'm gonna try the color option.

Thanks much.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk