#1 2015-05-04 12:36:03

Lajos Juhasz
Member
Registered: 2014-12-23
Posts: 6

Text overlapped after converting Meta file to PDF

Hi,

I am using the code posted by Arnaud to convert a QR report to PDF. However in some cases the texts from two components are overlapped. If I save the Meta file there is a space between the two texts but in the PDF the text is overlapped.

Can anyone help me to figure out while is this happening?

Offline

#2 2015-05-25 15:13:46

Lajos Juhasz
Member
Registered: 2014-12-23
Posts: 6

Re: Text overlapped after converting Meta file to PDF

This looks like a bug in TPdfEnum.TextOut (some kind of rounding issue). if I replace

    fscaleY := Abs(Canvas.fFactorY * Canvas.GetWorldFactorY * Canvas.FDevScale);
    fscaleX := Abs(Canvas.fFactorX * Canvas.GetWorldFactorX * Canvas.FDevScale);

with:

    fscaleY := Abs(Canvas.fFactorY * Canvas.GetWorldFactorY * Canvas.FDevScale)-0.05;
    fscaleX := Abs(Canvas.fFactorX * Canvas.GetWorldFactorX * Canvas.FDevScale)-0.05;

then there is no overlap and the result is close to what I get with the XPS printer.

PS. I know that this is a hack, unfortunately I have no technical knowledge to debug this issue and this hack is working for my test case.

Offline

Board footer

Powered by FluxBB