Page 1 of 1

Adding papersize has wrong dimentions

Posted: Wed May 19, 2021 9:41 pm
by tamagee
I am using the below code to add a custom paper size of 1" x 2". The new size shows up in the dropdown, but has the size of 8.5 x 11. If I set the Kind to Stimulsoft.System.Drawing.Printing.PaperKind.LetterSmall, it still shows 8.5 x 11.

Code: Select all

var newpapersize = new Stimulsoft.System.Drawing.Printing.PaperSize(Stimulsoft.System.Drawing.Printing.PaperKind.Custom ,"1 x 2 label", 1, 2); 

var papersizes = new Stimulsoft.System.Drawing.Printing.PrinterSettings.PaperSizeCollection();
papersizes.add(newpapersize);
    

Re: Adding papersize has wrong dimentions

Posted: Wed May 19, 2021 10:05 pm
by tamagee
I also noticed that if I examine the properties of the individual page, my custom paper size is not listed.

Re: Adding papersize has wrong dimentions

Posted: Fri May 21, 2021 2:29 pm
by Lech Kulikowski
Hello,

You should add your formats to the StiOptions.Print.customPaperSizes collection.

Thank you.