View Issue Details

IDProjectCategoryView StatusLast Update
0035652PackagesPrinterpublic2020-01-07 08:18
ReporterLars J. Stenberg Assigned ToJuha Manninen  
Status resolvedResolutionfixed 
PlatformLinuxOSMint 19.1 kernel 4.15.0-50-gener 
Product Version2.0 
Summary0035652: Multipage print construct fails paper size after 1 page in landscape mode
DescriptionI have the following multipage print construct in a Lazarus application targeting CUPS printers:
    if not Topmenu.PrintDialog1.Execute then
            ShowMessage('Please reset configuration!');
    for i := 1 to 5 do
          rct := Rect((100-PScale)*(Printer.PageWidth div 100),
                    (100-PScale)*(Printer.PageHeight div 100),
                    PScale*(Printer.PageWidth div 100),
                    PScale*(Printer.PageHeight div 100));
          Chart.Draw(TPrinterDrawer.Create(Printer), rct);
        finally { Some kind of error handling here };
        if i < 5 then
    end; { for loop }
The above code works fine in portrait mode - i.e. generates 5 pages, equally sized portrait prints on my three printers (Canon MG6350 inkjet, Brother HL-L2375DW laser and generic CUPS-PDF). However, when I change orientation to landscape, 1. page comes out correct but the following 4 pages though oriented correct are printed on an odd size (scale) paper format. When the code is compiled for and executed under Win10, no problem - everything works right. Suspect a CUPS server bug since all my printers behave odd in landscape mode under linux, while the same printers works the same and perfect under Win10.
Steps To ReproduceIf needed & requested, I can provide full Linux/Win source and/or executables (8-12MB)
TagsNo tags attached.
Fixed in Revision
Attached Files


Lars J. Stenberg

2019-06-03 13:11

reporter   ~0116548

I have added created PDF file showing 1. page in A4 sized landscape orientation as set/expected but 4 following pages in odd papersize (non-A4).

Observation: porting the lazarus code to openSUSE leap 15.1, everything plays right (like in Win10 ports) i.e. the attached file would reflect 5 identical sized A4 pages in landscape orientation.
Wf_Test10_D74161.pdf (36,848 bytes)

Lars J. Stenberg

2019-06-04 10:09

reporter   ~0116560

It seems the issue has been solved in most recent (at time of writing) version of Lazarus, version 2.0.2. So this ticket is ok to close for me.

Juha Manninen

2020-01-07 08:18

developer   ~0120250

Ok. Resolving.

Issue History

Date Modified Username Field Change
2019-05-30 17:10 Lars J. Stenberg New Issue
2019-06-03 13:11 Lars J. Stenberg File Added: Wf_Test10_D74161.pdf
2019-06-03 13:11 Lars J. Stenberg Note Added: 0116548
2019-06-04 10:09 Lars J. Stenberg Note Added: 0116560
2020-01-07 08:18 Juha Manninen Assigned To => Juha Manninen
2020-01-07 08:18 Juha Manninen Status new => resolved
2020-01-07 08:18 Juha Manninen Resolution open => fixed
2020-01-07 08:18 Juha Manninen LazTarget => -
2020-01-07 08:18 Juha Manninen Note Added: 0120250