- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I don't understand what it means for the PrintSetup to be InSession versus CurrentPrintSetting. Can anyone explain what InSession means?
I'm trying to print a pdf of size 32x42 inches from my code. If the default printer on my computer is set to anything other than my default PDF printer (under Devices and Printers in the Control Panel), I get an error when I try to set the paper size in my code.
The error say: "Illegal paper size" and mentions the problem is with "Parameter name: ps". If my default printer is set to Bluebeam (my PDF printer), then my code works fine and every pdf will print the first time. But if the default is another printer, it fails the first time through.
Worth noting, when my print-to-pdf command fails on the first try, I can select my Print Pdf button from the Ribbon again and it will work from then on. Something about failing that first attempt at running the command, seems to be setting internal things as they need to be set....when my default printer is not set to Bluebeam.
I have seen help online that stated I needed to assign InSession to CurrentPrintSetting. I am doing that.
PrintManager.PrintSetup.CurrentPrintSetting = PrintManager.PrintSetup.InSession;
But I don't understand why. What does InSession mean?
Any thoughts are appreciated. Thanks for your help!
Solved! Go to Solution.