Friday, 26 October 2012

Synopse PDF engine V1.7.2

The Unicode part of the Synopse PDF engine has been updated in order to support right-to-left languages and ligatures (i.e. glyph shaping).
Therefore, our Open Source engine is one of the few PDF producer able to natively handle Arabic languages. Even most commercial engines don’t implement this nice feature.
“Glyph Shaping” is needed e.g. for Arabic language, because the character change its shape depending on its position in the word.
The Synopse PDF engine can now optionally call the Windows Uniscribe API, to render Ordering (e.g. Left to Right direction) and Shaping of the text. The USE_UNISCRIBE conditional must be defined, and the UseUniscribe property of the TPdfDocument class must be set to true.
The UseUniscribe property can be temporary to TRUE,  when using the Canvas property, then back to FALSE when the Uniscribe API is not needed any more. Windows Uniscribe library can be slower, that’s the reason why it is disabled by default.
Note that the UseUniscribe property must be set appropriately before the content generation if you use any TPdfDocumentGdi.VCLCanvas text output with such scripting (since the PDF rendering is done once just before the saving, e.g. before SaveToFile() or SaveToStream()methods calls).
Our Synopse PDF engine don’t handle Font Fallback yet: the font you use must contain ALL glyphs necessary for the supplied unicode text – squares or blanks will be drawn for any missing glyph/character.
Using the Windows Uniscribe API is working very well (it is used internaly by Windows for drawing complex text), is almost well documented on MSDN, but there are very few sample code available. So writing this code was not so easy… but I hope it will be useful for some users! Thanks Mahammed Nasman for your comments and link to the MSDN site!

No comments:

Post a Comment

Install Fortesreport community Delphi 7 dan RX Berlin

Download  Pertama2 kita harus punya file installernya terlebih dahulu, download