Is it possible to force a printer to a specific paper format like: A4 fanfold 210 mm x 11 2/3 in?
This paperformat is available in the printer driver. Current problem now is that after one print job, this paper format is reset to Letter.
Set TfrxReportPage.PaperSize to A4
I already tried this, unfortunately without any effect. A4 paper is defined in Delphi, but A4 fanfold isn't.
I also used TFormInfo1 to get all available paper sizes and set the TfrxReportPage.PaperSize to the right integer, but also no effect.
Did you change paper size before preparing of report?
Unfortunately this doesn't help:
frxReportPage.PaperSize := DMPAPER_USER;
frxReportPage.PaperHeight := 25.4; // in 0.1 mm
frxReportPage.PaperWidth := 220; // in 0.1 mm
Back to the orriginal code:
The problem still is:
Set in printer driver: papersize to A4 fanfold 210 mm x 11 2/3 in
So the settings below are correct when I open the properties page when I want to print.
But when I just did a print job and want to print again, the properties are
The Letter size is not correct for this printer, so it fails.
The paper size was never changed by me in code.
Can you set format what you need in the FR Designer? What result did you get when print this report?
I am not able to set the correct paper size in FR Designer. The needed format is not available.
I tried below code to get all paper sizes and set frxReportPage.PaperSize to the right index, but without any success.
procedure TFMain_Settings.GetPaperInfo(PrinterName: PWideChar);
var HPrinter: THandle;
Forms: Array of TFormInfo1;
Count, Needed, Returned: DWORD;
If OpenPrinter(PrinterName, HPrinter, Nil)
If Not EnumForms(HPrinter, 1, Nil, 0, Needed, Returned)
If GetLastError <> ERROR_INSUFFICIENT_BUFFER
Count := (Needed div SizeOf(TFormInfo1)) +1;
If EnumForms(HPrinter, 1, @Forms, SizeOf(TFormInfo1) * Count, Needed, Returned)
If Returned < Count
Then SetLength(Forms, Returned +1);
For Counter := 0 to Returned -1 do
ListItem := ListView_Printers_Papers.Items.Add;
ListItem.Caption := IntToStr(Counter);
ListItem.ImageIndex := -1;
ListItem.Checked := False;
ListItem.SubItems.Add(Format('%dmm x %dmm', [Forms[Counter]. Size.cx div 1000, Forms[Counter].Size.cy div 1000]));
Did you set your printer in the report settings before set paper size?
It is already going wrong within the Preview screen.
What/Who changed the Paper Size?
Now I have to manualy correct the paper size. This is not what I want to do.
Below the solution:
frxReport.PrintOptions.PrintMode := pmScale;
frxReport.PrintOptions.PrintOnSheet := 186 // right index of TFormInfo1 (in my case A4 fanfold 210 mm x 11 2/3 in)
Rich Text Editor.
To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph.
An inline formatting menu will show up when you select text. Hit tab to get into that menu.
Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.