Solved

Setting Paperbin when printing to PDF printing software programs

Posted on 2009-05-04
4
655 Views
Last Modified: 2012-05-06
Hello,
My app works fine printing.... I have switched to the MS VbPrn.DLL for printing and still works well... but for some "PDF Printer" outputs... I'm getting an error setting PaperBin....  I have some default code that grabs all the values from the Print Dialog and copies them to the Printer.... PaperBin is an issue....

In this case it is set to '15' when it is copied to the Printer.PaperBin and this throws an "invalid value error".

How do we know what values are valid?

I have an if statement on there in case it's not defined at all... In this case it is set but the PDF Creator does not like it. Same with desktop PDF.

ANy ideas?

-Tim
0
Comment
Question by:torrid333
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 20

Accepted Solution

by:
thehagman earned 500 total points
ID: 24294995
Hm, my printer dialog of PDF creator shows no different paper bins - you can rather palce arbitrary paper sizes in the "one" bin ...
0
 

Author Comment

by:torrid333
ID: 24295055
Right maybe that's the issue... but how do you tell the printer to ignore the paper bin?

Somehow by default there is a prnDialog value of 15... and my if code sees a value and tries to assign it...

Is there an if statement that I could use to check to see if that printer propert "exists" at all?  if so I could use that as the criteria as to whether to set it???

Having code that breaks on some printers and not others is going to be really annoying....

0
 

Author Comment

by:torrid333
ID: 24337777
The solution was to get code to check for number of paperbins... if that is ZERO then there are no paperbins and it's a PDF printer.... There is code on the internet on MSDN to check for number of paperbins.
If the PDF printer would just let number of paperbins default to 1 this would not have been an issue.. I have found that some of them worked fine like PDF XChange so they must have done that. Whereas PDF Creator caused an error so did not....

Hope this helps someone.
0
 

Author Closing Comment

by:torrid333
ID: 31577529
I'm awarding points even though I had to figure it out myself...
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…

728 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