Solved

Setting Paperbin when printing to PDF printing software programs

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 - Convert HH:MM into Decimal 8 75
Protecting vb6 & .Net code Obfuscation 18 209
Help me. 3 77
Way to decrease size of apk file 9 128
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This video teaches viewers about errors in exception handling.
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.

738 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