Print single sided documents

Technical support for Spire.Doc

Moderator: iceblue support

Print single sided documents

Postby Dylan_Spire » Tue Jun 20, 2017 6:09 am

Hey,

I'v created a single page document with spire doc, it needs to be duplicated/append 5 times including the existing doc. So a total of 6 pages 1=5=6 :)

Code: Select all
var tmpdoc = document.Clone();

const int index = 5;

for (var i = 0; i < index; i++)
{
    //Merge
    foreach (Section sec in tmpdoc.Sections)
          document.Sections.Add(sec.Clone());                   
}


The above code works and creates 6 pages.

I save the doc to a pdf stream then later on load that stream into a PdfDocument(). When I try and print the PdfDocument only the first page is printed single sided, the following pages are printed double sided. Is there an option to stop double sided printing? or should I add an extra page break and/or section to the end of each page?

Thanks in advanced
Dylan_Spire
 
Posts: 16
Joined: Wed Jun 15, 2016 1:28 am

Re: Print single sided documents

Postby Betsy.jiang » Tue Jun 20, 2017 7:42 am

Dear Dylan_Spire,

Thanks for your inquiry.
If you were using old version of Spire.Office, we first suggest upgrading to the latest Spire.Office Platinum Version:2.16. If this doesn't work, please try to use following code to set the single-sided printing.
Code: Select all
 pdf.PrintDocument.PrinterSettings.Duplex = System.Drawing.Printing.Duplex.Simplex;

Hope this helps. In addition, you could print the Word document directly. Did you try that, and could you please tell us the result?
If there is still the issue, please provide us with the input Word file and the printer name you were using for investigation.

Sincerely,
Besty
E-iceblue support team
User avatar
Betsy.jiang
 
Posts: 1321
Joined: Tue Sep 06, 2016 8:30 am

Re: Print single sided documents

Postby Dylan_Spire » Tue Jun 20, 2017 11:33 pm

Hey, I'll try that and see how setting the settings to simplex and see how that goes.

In regards to direct printing it works correctly (single sided) but unfortunately another process will be printing so it needs to save it to a pdf stream.
Dylan_Spire
 
Posts: 16
Joined: Wed Jun 15, 2016 1:28 am

Re: Print single sided documents

Postby Betsy.jiang » Wed Jun 21, 2017 1:39 am

Dear Dylan_Spire,

Thanks for your response.
Looking forward to the news after the simplex setting. If the issue still happens, please offer us the input file, the printer name and the whole code you were using for testing.

Thanks,
Betsy
E-iceblue support team
User avatar
Betsy.jiang
 
Posts: 1321
Joined: Tue Sep 06, 2016 8:30 am


Return to Spire.Doc

Who is online

Users browsing this forum: No registered users and 0 guests

cron