Hello @alexey.noskov,
My code snippet and the output window content are below.
It seems, that printer driver I sent you and driver installed on my computer are different, because list of paper sizes your and my printer can use are different. So, shall I try find the same dreiver? Or we can use Team viewer to debug this issue on my computer?
Yes, I can use workaround for this issue: Aspose.Words is able to convert this DOCX to PDF correctly. After this I can use my code to print PDF. Unfortunately, performance of this tricky print is lower than direct printing DOCX file using Aspose.Words.
Plus, a customer, who uses printing solution I develop is also able to reproduce this issue…
Dim settings As New System.Drawing.Printing.PrinterSettings()
settings.PrinterName = "Canon iR C3000 Series UFR II"
Console.WriteLine("settings.PrinterName = " + settings.PrinterName)
For i As Integer = 0 To settings.PaperSizes.Count - 1
Console.WriteLine(settings.PaperSizes(i))
Next
Console.WriteLine("====================================")
For i As Integer = 0 To settings.PaperSources.Count - 1
Console.WriteLine(settings.PaperSources(i))
Next
Console.WriteLine("====================================")
Dim doc As New Words.Document("C:\Users\Mikhael\Desktop\Casey Newsom\1032034.docx")
Console.WriteLine("doc.OriginalFileName = " + doc.OriginalFileName)
For i As Integer = 0 To doc.PageCount - 1
Dim pageInfo As Words.Rendering.PageInfo = doc.GetPageInfo(i)
Console.WriteLine(pageInfo.GetDotNetPaperSize(settings.PaperSizes))
Console.WriteLine(pageInfo.GetSpecifiedPrinterPaperSource(settings.PaperSources, settings.DefaultPageSettings.PaperSource))
Console.WriteLine("---------------------------------")
Next
doc.Print(settings)
And here is the output screen content:
settings.PrinterName = Canon iR C3000 Series UFR II
[PaperSize Letter Kind=Letter Height=1100 Width=850]
[PaperSize 11x17 Kind=Standard11x17 Height=1700 Width=1100]
[PaperSize Legal Kind=Legal Height=1400 Width=850]
[PaperSize Statement Kind=Statement Height=850 Width=550]
[PaperSize Executive Kind=Executive Height=1050 Width=725]
[PaperSize A5 Kind=A5 Height=827 Width=585]
[PaperSize B5 Kind=B5 Height=1012 Width=717]
[PaperSize A4 Kind=A4 Height=1169 Width=827]
[PaperSize B4 Kind=B4 Height=1433 Width=1012]
[PaperSize A3 Kind=A3 Height=1654 Width=1169]
[PaperSize Envelope Monarch Kind=MonarchEnvelope Height=750 Width=387]
[PaperSize Envelope No. 10 (COM10) Kind=Number10Envelope Height=950 Width=412]
[PaperSize Envelope DL Kind=DLEnvelope Height=866 Width=433]
[PaperSize Envelope C5 Kind=C5Envelope Height=902 Width=638]
[PaperSize SRA3 Kind=Custom Height=1772 Width=1260]
[PaperSize 12x18 Kind=Custom Height=1800 Width=1200]
[PaperSize Custom [Name Fixed] Kind=Custom Height=1169 Width=827]
====================================
[PaperSource Auto Kind=AutomaticFeed]
[PaperSource Multi-purpose Tray Kind=Manual]
[PaperSource Drawer 1 Kind=Upper]
[PaperSource Drawer 2 Kind=Middle]
[PaperSource Paper Type Priority Kind=Custom]
====================================
doc.OriginalFileName = C:\Users\Mikhael\Desktop\Casey Newsom\1032034.docx
[PaperSize Custom Kind=Custom Height=412 Width=950]
[PaperSource Auto Kind=AutomaticFeed]
---------------------------------
[PaperSize Letter Kind=Letter Height=1100 Width=850]
[PaperSource Auto Kind=AutomaticFeed]
---------------------------------