#1 PDF Engine » RenderMetaFile - problem with pictures » 2015-08-13 12:48:09

Lajos Juhasz
Replies: 0

I'm converting Quick Report to PDF using metafiles. Whenever on the page I've a TQRImage without auto stretch Adobe PDF Reader is unable to process the file there is no error message however the page is rendered until the images and the rest of the data is not displayed. When I set the stretch property to true Adobe can render the resulted file.

The interesting thing is that both Opera and Microsoft Reader (from Windows 8.1) can display those pdf files where stretch is false for the image.


I’ve created a simple example and compared the difference between Stretch true and false and removed from the defected file and updated length:

W
31.5 695 214.5 114.75 re
w*

After this Adobe was able to render the PDF. Can this really be the reason?

--
Lajos Juhasz

#2 Re: PDF Engine » Text overlapped after converting Meta file to PDF » 2015-05-25 15:13:46

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.

#3 PDF Engine » Text overlapped after converting Meta file to PDF » 2015-05-04 12:36:03

Lajos Juhasz
Replies: 1

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?

#4 Re: PDF Engine » Strange PDF rendering problem » 2014-12-24 15:50:45

My solution for this problem was to change the source that it will always embed only Arial Narrow Bold, this is 89KB size growth and now I can wait that Adobe fixes the reader.

#5 Re: PDF Engine » Strange PDF rendering problem » 2014-12-24 09:04:31

I have narrowed down the problem that the text is not rendered correctly by Adobe when the font is Arial Narrow Bold. Even when I change the font to be Arial Narrow the text is rendered correctly. I have checked the source meta file and it is correct as far as I can tell.

The only way for now to produce a PDF that Acrobat can display is to fully embed TTF fonts.Even when I try to embed fonts with EmbeddedWholeTTF set to false Adobe cannot correctly display the file.

Is there anything else I could try to solve this problem?

#6 PDF Engine » Strange PDF rendering problem » 2014-12-23 17:34:24

Lajos Juhasz
Replies: 2

System Windows 8.1
Delphi XE5
SynPdf 1.18

I have created a PDF from metafile produced by QuickReport. If I open the PDF using Microsoft Reader the content is rendered ok. However Adobe Reader 11.0.10 doesn't renders it correctly. Replaces the letter č with letter đ. However if I select the text and copy it to clipboard and paste the text to notepad the text is correct (in this case Matični broj).

Can anyone help me to figure out what to check? If Adobe can copy correctly to the clipboard my guess is that the PDF file is correct.

Board footer

Powered by FluxBB