![]() ![]() The Short Answer is : = new PaperSize("MyPaper", 700, 900) Preview is nice and small but printed document is large and has not proper page size How to set up and print with custom paper size in C# printdocument?Įdit: using the line: = new PaperSize("label", properWidthInHundretsOfInches, properHeightInHundretsOfInches) Also, I'd like to achieve appropriate result during printing to pdf exploration phase. ![]() Should I reconfigure printer by using printer properties OS dialog? I would like rather not to require user to modify settings of of printer in one way or another. I am aware of question How to print with custom paper size in winforms, but I don't actually understand the answer. NSettings.PaperSize = new PaperSize("label", (int)properWidthInHundretsOfInches, (int)properHeightInHundretsOfInches) PageSettings nSettings = new PageSettings() private void PrintDoc_QueryPageSettings(object sender, QueryPageSettingsEventArgs e) It correctly displays the page layout on preview, but in PDF document I observe pages printed in A4, as by default. But, I cannot specify Kind property, because it's readonly! RawKind property not helps.Īs alternative I have such event. Because I don't have the printer nearby I am using Microsoft Print To PDF option which appeared in Win10.Īs you see, here I am trying to set up custom paper size for default paper size. I am trying to use PrintDocument and set up the paper size to print or barcode thermal printer. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |