I attached 2 patches to the bug tracker which solves the problem for me.
1.
I can confirm, that in my case it is fixed for NO-embedded case only. For embedded fonts case there is still small issue (some characters are okay, some are shifted) - see attachments

(but looking into PDF there is still in FontDescriptor wrong MissingWidth attribute, which does not goes into play AFAICS)

2.
Can I ask what is purpose of Sections in PDF structure?
Because when I want use more than 1 Section I get exception "Dictionary element "Count" not found."
Try:
  PDF.Sections.AddSection;
  PDF.Sections[0].Title := 'Section1';
  PDF.Sections[0].AddPage(PDF.Pages.AddPage);

  PDF.Sections.AddSection;
  PDF.Sections[1].Title := 'Section2';
  PDF.Sections[1].AddPage(PDF.Pages.AddPage);

3.
Would it be possible to add "shortcut" AddPage directly to TPDFDocument, which will add Page to last Section or create new section if none exists? (if I guess right there is no big usage of sections in user code, so hide sections from user POV is no issue)

4.
How complicated would be add support for digital signing of PDF documents?

5.
How complicated would be (in case of embedding fonts) subset only those characters, which are used in document, not a whole font?
(or does it works already so?)

6.
Would it be possible to use as default:
FOPtions := [poCompressFonts, poCompressImages, poPageOriginAtTop, poSubsetFont];
(which are IMO most used options)

Thank you

-Laco.


Attachment: test-noembed.pdf
Description: Adobe PDF document

Attachment: test-embed.pdf
Description: Adobe PDF document

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to