[fpc-pascal] fpPDF and support of Latin2 charset

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Fri Mar 22 10:43:23 CET 2019


On 22/03/2019 07:16, LacaK wrote:
> (but looking into PDF there is still in FontDescriptor wrong 
> MissingWidth attribute, which does not goes into play AFAICS)

What do you think is wrong with it? On my side it is set to 600, which
as far as I can see is correct for cour.ttf subset embedded font. That
value is only used by PDF viewers when they need to display a glyph, but
the glyph is not defined in the selected font.

I'll take another look at the spacing issue.


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

It allows you to be infinitely flexible with the layout of a document.
eg: If a report had several sections with different margins, headers,
footers, orientation etc. You would use sections to set those. Attached
is a very simple PDF showing sections. Note: some had different page
layout, page numbering etc.

If you have a decent PDF (reporting) viewer that support sections, you
can jump between sections like you jump between pages. fpGUI's "report
preview" supports that.

I'll take a look at the sections issue you raised. Would you be so kind
as to create a Mantis report for that specific bug.


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

Obviously it could be added, but do we? It's comes down to different
users with different needs. Plus what Michael said about the Dutch
saying. ;-)


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

I briefly looked at that when I implemented fpPDF, and that is quite
tricky.  Plus I don't fully understand all the requirements yet.

> How complicated would be (in case of embedding fonts) subset only those 
> characters, which are used in document, not a whole font?

That is exactly how [poSubsetFont] works. Simple to test. Embed a large
font like "DejaVu Sans". With poSubSetFont disabled, a one page PDF with
the only text "Hello World" will be a couple of MBs in size. Then enable
poSubsetFont and see the massive size reduction.



Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MultiSections.pdf
Type: application/pdf
Size: 9014 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190322/da739c17/attachment.pdf>


More information about the fpc-pascal mailing list