Solved

Setting Paperbin when printing to PDF printing software programs

Posted on 2009-05-04
4
656 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
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…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

623 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