[Lazarus] PDF generator, try 2

Michael Van Canneyt michael at freepascal.org
Thu Mar 31 18:13:12 CEST 2016



On Thu, 31 Mar 2016, silvioprog wrote:

> On Thu, Mar 31, 2016 at 11:18 AM, silvioprog <silvioprog at gmail.com> wrote:
>
>> On Thu, Mar 31, 2016 at 11:02 AM, Michael Van Canneyt <
>> michael at freepascal.org> wrote:
>>>
>>> Hello
>>>
>>> In revision 33401 of FPC subversion, a lot of fixes have been committed
>>> for Font
>>> handling in the PDF generator: e.g. Unicode fonts should now render
>>> correctly.
>>
>> [...]
>>
>> Great news! :-)
>>
>> I'm going to re-test it ...
>>
>
> Finally the PDF was succefully generated on Windows! \o/
>
> I have some observations:
>
> . The demo print a lot of lines if the font is not found:
>
> Exception at 0041F4B7: EFOpenError:
> Unable to open file "fonts\FreeSans.ttf".
> Exception at 0041F4B7: EFOpenError:
> Unable to open file "fonts\FreeSans.ttf".
> Exception at 0041F4B7: EFOpenError:
> Unable to open file "fonts\FreeSans.ttf".
> Exception at 0041F4B7: EFOpenError:
> Unable to open file "fonts\FreeSans.ttf".
> ... infinitely ...
>
> . The PDF was generated with some wrong chars (you can download it here:
> https://dl.dropboxusercontent.com/u/135304375/test.pdf):

That is logical, if it cannot find the file which it tries to embed ??


> Greek: Ge?? s?? ??s
> Polish: Witaj swiecie
> Portuguese: Ol? mundo
> Russian: ???????????? ???
> Vietnamese: Xin ch?o th? gi?i
>
> In the previous fppdf version, the PDF was generated about ~650KB, after
> update it I get a PDF ~381KB. Is it OK?

No, I have one of ~1Mb. But probably logical if the file is not there ?

It's not quite clear what to think of your report ?

For me

"PDF was succefully generated"

does not compute with

"Unable to open file "fonts\FreeSans.ttf".

:-)


Michael.




More information about the Lazarus mailing list