#1 2012-11-28 19:44:07

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,718
Website

SynPdf library 1.18

Our SynPdf library was released as part of every mORMot version.

But the stand-alone .zip was still in 1.15 revision.

I have updated it, and now it reflects the latest version from our source code repository.
Thanks to nice proposals - see this article, engine is pretty complete.

Here are the main features since revision 1.15:

Version 1.16
  - includes new TSynAnsiConvert classes for handling Ansi charsets
  - do not stop TMetaFile enumeration in case of invalid EMF content (e.g.
    if the EMR_SELECTOBJECT refers to an out-of-range object): this is
    the default behavior of GDI and GDI+ renders (and our SynGdiPlus), so
    we'll stay to it - may fix issue with some badly formatted objects - also
    made the TMetaFile rendering stronger to badly formated EMF input
  - fixed issue in TPdfDocument.CreateOrGetImage about guessing if a bitmap is
    to be reused as a pdf object
  - added TPdfDocument.ForceNoBitmapReuse property
  - added a "Decimals: cardinal=6" parameter to TPdfCanvas.ConcatToCTM
  - TPdfCanvas.SetDash parameter is now an array of integer
  - set PDF_MAX_FONTSIZE limit to 2000 - should be big enough in practice
  - fixed an issue when handling bitmap palette
  - fixed an issue when the first time a font was used is as Unicode
  - fixed a potential GPF issue in function HashOf() in PUREPASCAL mode (used
    to reuse any existing bitmap content within the PDF document)

  Version 1.17
  - new TPdfDocument.UseFontFallBack property (enabled by default) and
    associated FontFallBackName property (set to 'Arial Unicode MS' by default),
    used to define if the PDF document will handle "font fallback" for characters
    not existing in the current font: it will avoid rendering block/square
    symbols instead of the correct characters (e.g. for Chinese text)
  - now handle device or bitmap fonts as the most close true-type font available
  - speed-up of internal true-type fonts list (using binary search)
  - SynPdf unit can now link to standard ZLib.pas unit if you want to use SynPdf
    stand-alone and do not need SynZip.pas + deflate.obj + trees.obj
    (but SQLite3Commons.pas main unit of mORMot will need SynZip, so it is
    enabled by default for use within the framework)

  Version 1.18
  - fixed potential GPF issue in TPdfWrite.AddUnicodeHex and TPdfWrite.AddHex
  - Several fixes and enhancements by Sinisa (sinisav):
    - fixes are mostly for embeded metafiles
    - added World Transformation matrix
    - fixed scaling objects (bitmaps, pen, text)
    - fixed text positioning
    - added region/clipping support
    - added graphics/mapping mode
    - add new enum items: EMR_POLYPOLYGON, EMR_POLYPOLYLINE, EMR_POLYPOLYGON16,
      EMR_POLYPOLYLINE16, EMR_GRADIENTFILL, EMR_MODIFYWORLDTRANSFORM, EMR_EXTCREATEPEN,
      EMR_SETMITERLIMIT, EMR_SETMETARGN, EMR_EXTSELECTCLIPRGN, EMR_INTERSECTCLIPRECT,
      EMR_SETMAPMODE, EMR_BEGINPATH, EMR_ENDPATH, EMR_ABORTPATH, EMR_CLOSEFIGURE,
      EMR_FILLPATH, EMR_STROKEPATH, EMR_STROKEANDFILLPATH, EMR_SETPOLYFILLMODE,
      EMR_SETSTRETCHBLTMODE, EMR_SETARCDIRECTION, EMR_POLYLINETO, EMR_POLYLINETO16
    - fixed EMR_POLYBEZIER* and moveto action (new way to mark when processed - when
      coordinates are set to use Point(0,0) )
    - fixed null pen and not stroke
    - few more issues still remains (gradient fill, some text size issues...)

See http://synopse.info/fossil/wiki?name=Downloads for download link.
And http://blog.synopse.info/post/2012/11/2 … brary-1.18 article.

Offline

#2 2012-12-03 18:10:13

BavDev
Member
Registered: 2012-10-18
Posts: 6

Re: SynPdf library 1.18

Hello,

clipping does still NOT work! I was hoping for this enhancement since you promised that some months ago. But it does not work when drawing on the TCanvas.

Offline

#3 2012-12-03 19:09:03

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,718
Website

Re: SynPdf library 1.18

Therefore this is an excellent opportunity for you to show your skills and find what is to be enhanced and contribute to this open source project.

We did not promise anything, since their is no warranty associated with this code, as with all other closed or open software release. We announced some contributions and changes.

Feel free to propose any patch.


The latest commit is already a very exciting enhancement, and there is some clipping support.
We are sorry it still don't fill your needs. perhaps you can change the way you draw on the canvas.
We honnestly do what we can...

Offline

#4 2012-12-03 20:14:07

BavDev
Member
Registered: 2012-10-18
Posts: 6

Re: SynPdf library 1.18

I am sorry, I feel not competent enough to understand your source. Basically I am not an expert of such deep-in-the-system things, that's why I am using 3rd party libs for such functionality. Instead, I am writing end-user software...
I will try other ways of drawing if I will see the clipping somehow.
Anyway, I had already stated elsewhere that this free SynPDF is much better than other expensive libs...

Offline

#5 2012-12-03 23:53:12

RalfS
Member
Registered: 2011-07-11
Posts: 57

Re: SynPdf library 1.18

Some XE3 compiler issues:

PDF\SynPdf.pas(2686) Hint: H2443 Inline function 'Point' has not been expanded because unit 'System.Types' is not specified in USES list
PDF\SynPdf.pas(3058) Hint: H2443 Inline function 'TList.Remove' has not been expanded because unit 'System.Types' is not specified in USES list
PDF\SynPdf.pas(3267) Hint: H2443 Inline function 'TList.Remove' has not been expanded because unit 'System.Types' is not specified in USES list
PDF\SynPdf.pas(6162) Warning: W1057 Implicit string cast from 'AnsiString' to 'string'
PDF\SynPdf.pas(6239) Warning: W1000 Symbol 'ByteType' is deprecated: 'Moved to the AnsiStrings unit'
PDF\SynPdf.pas(6245) Warning: W1000 Symbol 'ByteType' is deprecated: 'Moved to the AnsiStrings unit'
PDF\SynPdf.pas(7485) Warning: W1057 Implicit string cast from 'AnsiString' to 'string'
PDF\SynPdf.pas(7567) Warning: W1057 Implicit string cast from 'AnsiString' to 'string'
PDF\SynPdf.pas(8164) Hint: H2443 Inline function 'Point' has not been expanded because unit 'System.Types' is not specified in USES list
PDF\SynPdf.pas(8403) Hint: H2443 Inline function 'Point' has not been expanded because unit 'System.Types' is not specified in USES list
PDF\SynPdf.pas(8420) Hint: H2443 Inline function 'Point' has not been expanded because unit 'System.Types' is not specified in USES list

Offline

#6 2012-12-19 17:33:12

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,718
Website

Re: SynPdf library 1.18

Sounds more like issues/regressions in XE3 in respect to XE2 for instance.
Code compiles just fine with no warning in XE2.
The necessity of adding System.Types was not necessary.

The same about the need of adding the AnsiStrings unit. IMHO it does not make any sense, and makes it even more difficult to find out which overloaded function is to be called, and it is not even possible to work with Delphi XE2 since the AnsiStrings unit in XE2 is just ambiguous with the one included in SysUtils.pas.
I'm fed up with such breaking changes... due to inconsistency of the VCL/RTL maintainers.

I did not buy the XE3 license, since I built XE2 and never used any of its "new" features... just enjoyed some fixes regarding Delphi 2009, and find out new regressions.
A lot of money for me.

In all cases, all those were warnings/hints, not compilation errors.
See http://synopse.info/fossil/info/6bbc0257b9

Thanks for the feedback.

Offline

#7 2012-12-21 12:01:57

RalfS
Member
Registered: 2011-07-11
Posts: 57

Re: SynPdf library 1.18

All compilation hints are gone now in D6..XE3. Thanks.

Offline

#8 2021-03-22 10:49:19

CarbonCreator
Member
Registered: 2021-03-22
Posts: 1

Re: SynPdf library 1.18

Great library, my respect!

Last edited by CarbonCreator (2021-03-22 10:49:41)

Offline

#9 2023-03-24 16:52:47

San
Member
Registered: 2023-03-24
Posts: 1

Re: SynPdf library 1.18

Great lib, but are there any plans for digital signing support in pdf?

Offline

Board footer

Powered by FluxBB