#1 2010-06-29 16:41:38

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

Synopse PDF Engine 1.8.1

Our PDF engine has been updated, it's now on version 1.8.1.

Features added by contribution of REDDWARF / ONDREJ - THANKS!

Here are the modifications:
  - new feature: allow forced JPEG compression for graphics;
  - new feature: UNDERLINE + STRIKEOUT support (also in RICH TEXT and rotated text !);
  - new USE_SYNGDIPLUS conditional if you want to use the default jpeg unit instead of our SynGdiPlus (but you loose TIF, PNG, and GIF support);
  - enhanced: PenWidth changed to Single -> better precision (e.g. for underlined text);
  - fix issue: Rotated text was misplaced for some angles;
  - some small fixes about FillRect() + scaling, and move/line stroke.

REDDWARF / ONDREJ shared a very good work - I just made some code refactoring.
Amazing contribution, in all cases. Hope will be useful.

You can download the updated full source code of this unit, with other needed Synopse units, from synpdf.zip. Source code is licensed under a MPL/GPL/LGPL tri-license.

Offline

#2 2010-06-30 17:11:43

dsicom
Member
Registered: 2010-06-30
Posts: 1

Re: Synopse PDF Engine 1.8.1

I've trying insert two images and it show error: AddXObject: dup name Syn -1. Only 1 image works. I have 1.8.1 version

My code:

with pdf do
  try
    info.Title := Application.Title;
    info.Author := 'OttoBock';
    DefaultPaperSize := psA4;

    pdfPagina := AddPage;

    VCLCanvas.Font.Name := 'Arial';
    VCLCanvas.Font.Size := 24;
    VCLCanvas.Font.Style := [fsBold];
    i := VCLCanvas.TextWidth(lblProdNombre.Caption);

    VCLCanvas.TextOut((VCLCanvasSize.cy-i) div 2, 20,lblProdNombre.Caption);

    VCLCanvas.Draw(10,50,imgProd.Picture.Graphic);

    VCLCanvas.Draw(10,VCLCanvasSize.cx - imgTabla.Picture.Graphic.Height - 50,imgTabla.Picture.Graphic);

    SaveToFile(DirExe + 'DAT\temppdf.pdf');

Offline

#3 2010-06-30 17:33:39

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

Re: Synopse PDF Engine 1.8.1

That sounds like a regression introduced by the last update...
I'll try to find how to get it work.

Offline

#4 2010-06-30 18:14:37

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

Re: Synopse PDF Engine 1.8.1

It should be fixed now. I've uploaded the unit with a correction.

Please try with your code and confirm it works as expected.

Offline

#5 2010-07-02 04:40:08

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Re: Synopse PDF Engine 1.8.1

Great job, man!

I hope it can extract meta data from an existing PDF!


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#6 2010-07-02 07:54:02

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

Re: Synopse PDF Engine 1.8.1

I'm not sure I understand you, edwinsn... "extract meta data" i.e. reading a PDF and browse its content? It's not difficult to do, but the purpose of our unit is to PRODUCE such files, not read them.

You'll need to write a parser of PDF files, and create all objects according to it. It's not difficult with our framework, you have all needed objects, but you'll have to write the parser itself.

Offline

Board footer

Powered by FluxBB