shmuly wrote:
Is there a way to create my own paper sizes?
Vital wrote:
You can change page width and page height with propeties grid. You can't change list with predefault page sizes.
shmuly wrote:
Is there a way to specify which tray in the printer each page should print from?
Vital wrote:
At this moment no. We planning release this feature in next version.
Thanks you.
I have a few questions
1) Can you change page width and page height via code (vb. net) ? How?
2) How do you set a printer for the report via code?
2) Can you change the predefault page sizes based on the printer you selected via code?
Can you explain what you mean "predefault page size"?
I mean the drop down list in the page setup when you are in the Designer. It populates with things like A4, Letter etc.
The reason I ask is because I am trying to set the default printer to a label printer. I can setup the paper sizes via the label printer, so I am wondering whether I can populate that "predefault page size" list in the Designer, with the setup from the label printer...
PrinterSettings printerSetting = new PrinterSettings();
foreach (PaperSize ps in printerSetting.PaperSizes)
...
So you see list of page sizes from default printer.
We have added new static property StiOptions.Print.CustomPaperSizes. You can assign your own collection of paper sizes to this property.
New property will be available in build from 12 Feb. For also you can request latest version at support [at] stimulsoft [dot] com.
Dim Page As StiPage = report.Pages.Item(0)
Dim printerSetting As New PrinterSettings()
printerSetting.PrinterName = "Datamax E-4203"
StiOptions.Print.CustomPaperSizes = printerSetting.PaperSizes
For Each ps As PaperSize In printerSetting.PaperSizes
Page.PageWidth = ps.Width
Page.PageHeight = ps.Height
Dim margin As New StiMargins(printerSetting.DefaultPageSettings.Margins.Left, printerSetting.DefaultPageSettings.Margins.Right, printerSetting.DefaultPageSettings.Margins.Top, printerSetting.DefaultPageSettings.Margins.Bottom)
Page.Margins = margin
Next
The designer runs fine and the "Predefault page size" were listed, but when I try to change the predefault page size using the drop down box, an error occured
"Index was outside the bounds of the array"
The designer runs fine and the "Predefault page size" were listed, but when I try to change the predefault page size using the drop down box, an error occured
"Index was outside the bounds of the array"
Fixed.
Please take the build from the February, 12.
Please use appropriate unit conversion in the following string:
Quote:
The designer runs fine and the "Predefault page size" were listed, but when I try to change the predefault page size using the drop down box, an error occured
"Index was outside the bounds of the array"
Fixed.
I have took the build from Feb 12 and copied the files and recompiled my program... Still the same error message when I use the drop down box ....??