Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.
Sun Jul 19, 2020 5:05 pm
Hi,
How to print a word document which has 34 Pages, but i want to print Only 23 to 26 page number.
Thanks in Advance.
-
pravindkumarr
-
- Posts: 1
- Joined: Mon Feb 12, 2018 4:59 pm
Mon Jul 20, 2020 3:36 am
Hello,
Thanks for your inquiry.
Please refer to the following code to set print page range. If there is any other question, just feel free to contact us.
- Code: Select all
Document doc = new Document();
doc.LoadFromFile(input);
//Get the PrintDocument object
PrintDocument printDoc = doc.PrintDocument;
//Set print page range
printDoc.PrinterSettings.FromPage = 23;
printDoc.PrinterSettings.ToPage = 26;
printDoc.Print();
Sincerely,
Rachel
E-iceblue support team
-
rachel.lei
-
- Posts: 1571
- Joined: Tue Jul 09, 2019 2:22 am
Mon Aug 03, 2020 3:53 am
Hello,
Greetings from E-iceblue!
Did my code help you? Any feedback will be greatly appreciated!
Sincerely,
Rachel
E-iceblue support team
-
rachel.lei
-
- Posts: 1571
- Joined: Tue Jul 09, 2019 2:22 am