Welcome Guest Search | Active Topics | Sign In | Register

PDF->Print - set the pages I want to print Options
serializer
Posted: Friday, April 13, 2018 8:28:02 AM
Rank: Advanced Member
Groups: Member

Joined: 5/9/2016
Posts: 84
How do I specify which pages to print? For example, user might want to print: 1-15,17
eo_support
Posted: Friday, April 13, 2018 1:19:19 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,258
Hi,

You can set FromPage and ToPage property:

Code: C#
PdfDocument doc = new PdfDocument(pdf_file);
PrinterSettings ps = EO.WebBrowser.WebView.GetDefaultPrinterSettings();
ps.FromPage = 1;
ps.ToPage = 2;
doc.Print(ps).WaitOne();


The above code print the second and the third page. Note that both FromPage and ToPage are inclusive and zero based.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.