<div dir="ltr"><div><div><div>Great!<br></div>Are metadata included ?<br><br></div>Thanks,<br><br></div> R.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-05 18:27 GMT+01:00 Michael Van Canneyt <span dir="ltr"><<a href="mailto:michael@freepascal.org" target="_blank">michael@freepascal.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have committed a PDF generator to FPC Subversion: fcl-pdf.<br>
<br>
Why a new pascal PDF generator ? Mainly because the existing ones written in Object Pascal suffer from<br>
several disadvantages: - Font support usually incomplete or downright buggy.<br>
- Dependency on a GUI (LCL, VCL, Windows).<br>
The latter is important because the PDFs must be generated on a headless (no<br>
display) webserver.<br>
<br>
So, the fcl-pdf package contains a PDF generating unit fppdf that does not depend<br>
on any external libraries or GUI system.<br>
<br>
The PDF generator has the following features:<br>
- Support for basic shapes.<br>
- Support for basic line styles.<br>
- Dictionary support.<br>
- Multi-page PDF.<br>
- Image support.<br>
- TTF Font support.<br>
- Font embedding.<br>
- Unicode font support.<br>
- Stream Compression.<br>
- Image embedding.<br>
- Several paper types.<br>
- Portrait/Landscape.<br>
- Support for multiple measurement units.<br>
- Rotation matrix system.<br>
- PDF creator information.<br>
- The generated PDF passes several PDF validators.<br>
<br>
The library is based on a library that came with FPGUI, with a feature set<br>
which came closest to what I desired. It was completed for the company I<br>
work for by Graeme Geldenhuys, and is heavily unit tested.<br>
<br>
It is not yet feature-complete, but the above should be ample for most<br>
applications.<br>
<br>
In the near future, I expect to commit a reporting engine which, likewise, does not need a GUI (but can use one) and uses the PDF generator as one possible backend.<br>
<br>
Todo:<br>
- Implement TFPCustomCanvas descendent (TPDFCanvas) that draws on a PDF.<br>
(should allow easy integration in LCL) - Partial embedding of (unicode) fonts (only used glyphs) for smaller PDFs.<br>
- On windows (possibly mac), allow to use native font mechanisms for extracting info from TTF files.<br>
- Reduce memory usage by streaming finished pages to file.<br>
<br>
Optionally:<br>
- PDF Forms ?<br>
- Archive format ?<br>
- Signatures ?<br>
<br>
Enjoy,<br>
<br>
I would welcome additional tests/demos, suggestions, bugreports, improvements or patches.<br>
<br>
Michael.<br>
<br>
--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" rel="noreferrer" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</blockquote></div><br></div>