Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Setting Paperbin when printing to PDF printing software programs

Posted on 2009-05-04
4
Medium Priority
?
658 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

719 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