[fpc-pascal] fpPDF and support of Latin2 charset

LacaK lacak at zoznam.sk
Fri Mar 22 08:16:25 CET 2019


> 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-noembed.pdf
Type: application/pdf
Size: 5040 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190322/b767959b/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-embed.pdf
Type: application/pdf
Size: 39109 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190322/b767959b/attachment-0001.pdf>


More information about the fpc-pascal mailing list