Adding papersize has wrong dimentions

Stimulsoft Reports.JS discussion
Post Reply
tamagee
Posts: 4
Joined: Fri May 14, 2021 9:41 pm

Adding papersize has wrong dimentions

Post 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);
    
tamagee
Posts: 4
Joined: Fri May 14, 2021 9:41 pm

Re: Adding papersize has wrong dimentions

Post by tamagee »

I also noticed that if I examine the properties of the individual page, my custom paper size is not listed.
Lech Kulikowski
Posts: 6238
Joined: Tue Mar 20, 2018 5:34 am

Re: Adding papersize has wrong dimentions

Post by Lech Kulikowski »

Hello,

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

Thank you.
Post Reply