#1 2019-03-13 14:13:08

viki
Member
Registered: 2019-03-13
Posts: 1

line width in pdf

I am using SynPdf to save QuickReport to PDF in Delphi.
I have problem that printed report is not the same like PDF report.
In exported PDF report  all lines are vary fat and they have  different widths.
On original QRreport all lines are same width and thin.
How I can fix this problem....

Offline

#2 2019-11-20 14:35:12

MtwStark
Member
From: Italy
Registered: 2016-01-05
Posts: 27

Re: line width in pdf

Hi viki,
I think I have solved that problem..

There are many changes involving the pen, you can start looking at my old code SynPDF.pas,
look for ExtCreatePen function called by EMR_EXTCREATEPEN metafile record

Also, in SelectObjectFromIndex

in NULL_PEN case I have changed

{$IFDEF TMW_TEST_NEW_PENNULL}
    pen.style := (pen.style and not PS_STYLE_MASK) or PS_NULL;
{$ELSE}
    pen.style := PS_NULL;
{$ENDIF}

and in OBJ_PEN case I have changed

{$IFDEF TMW_TEST_NEW_PENNULL}
    pen.null := (PenWidth < 0) or ((PenStyle and PS_STYLE_MASK) = PS_NULL); // !! 0 means as thick as possible
{$ELSE}
    pen.null := (PenWidth < 0) or (PenStyle = PS_NULL); // !! 0 means as thick as possible
{$ENDIF}

I hope this will help

Last edited by MtwStark (2019-11-20 14:54:37)

Offline

Board footer

Powered by FluxBB