okirisx2 wrote:Hello,
I was wondering how I can utilize the Duplex print setting to give the option to print double sided or single sided. This code seems like it would work but it always prints whatever the default settings are.
- Code: Select all
PdfDocument pdf = new PdfDocument();
pdf .LoadFromFile("test.pdf");
SpirePrintOptions options = new SpirePrintOptions() // custom object
options.IsDuplex = false; // this value is set by the input.
if (options.IsDuplex && pdf.PrintSettings.CanDuplex)
pdf.PrintSettings.Duplex = Duplex.Vertical;
else
pdf.PrintSettings.Duplex = Duplex.Simplex;
Thanks,
Sam
Hi Sam,
Thanks for your inquiry.
I tested your code but I did not reproduce your issue, I can enable duplex or simplex printing based on the conditions. Could you please provide us with the following messages to help us work out a solution for you? You can send them to us via email (
support@e-iceblue.com) or attach them here. Thanks for your assistance.
1) the details about your physical printer.
2) the version of Spire.PDF you are using.
3) your application type, such as Console App .NET Framework 4.8.
Sincerely,
Triste
E-iceblue support team