On Fri, 22 Mar 2019, LacaK wrote:


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);

This needs to be looked at...


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)

I think this is a good idea in each case.


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

My guess is that this is not so easy.


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?)

It aleready works so if you use poSubsetFont.


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

Anything is possible, but IMO it's better to encourage people to think about 
what they're doing.

There is a dutch saying "Laziness is the pillow of the devil."...

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

Reply via email to