Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2011-06

fpVectorial PDF Writer

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo M. Ramé

Hi, I'm wondering if there are plans to create a pdf writer for fpVectorial.

I was thinking of using Inkscape to create a template for reporting in a web application, then parse the SVG template using fpvectorial and output a PDF.

What do you think?
 
Leonardo M. Ramé
http://leonardorame.blogspot.com

Reply by email

Felipe Monteiro de Carvalho
to Leonardo M. Ramé

Hello,

If you are willing to work on it too, I can help you write a pdf exporter.

It should be easy, you just have to take an example document plus the Adobe documentation. PDF is just text plus an eventual zip compression.

The drawing itself is just plain PostScript which is also simple.

Felipe Monteiro de Carvalho

Reply by email

Leonardo M. Ramé
to Felipe Monteiro de Carvalho

----- Original Message -----

Show quoted text 15 lines
From: Felipe Monteiro de Carvalho To: Leonardo M. Ramé ; FPC developers' list Cc: Sent: Sunday, June 26, 2011 2:54 PM Subject: Re: [fpc-devel] fpVectorial PDF Writer Hello, If you are willing to work on it too, I can help you write a pdf exporter. It should be easy, you just have to take an example document plus the Adobe documentation. PDF is just text plus an eventual zip compression. The drawing itself is just plain PostScript which is also simple.

Ok, I'll try to start the exporter as my next weekend project.  
Leonardo M. Ramé
http://leonardorame.blogspot.com

Reply by email

Hans-Peter Diettrich
to Felipe Monteiro de Carvalho: If you are willing to work on it too, I can help you write a pdf exporter. It should be…
Show quoted text 5 lines
If you are willing to work on it too, I can help you write a pdf exporter. It should be easy, you just have to take an example document plus the Adobe documentation. PDF is just text plus an eventual zip compression.

Be warned, the Adobe documentation is incomplete in some subtle details.

E.g. the Length of an Stream is specified so vaguely, that the stored Length (observed) frequently is something between the number of data bytes with or without embedded EOL markers. See the PDF spec, 7.3.8.2 Steam Extent.

Such flaws can prevent the decoding of a PDF document, because the exact stream decoder is a secret of Adobe (like details of .NET are Microsoft secrets).

Please let me know when somebody finds source code of an PDF parser, that e.g. allows to extract the exact page count from any PDF document.

DoDi

Reply by email

Felipe Monteiro de Carvalho
to Hans-Peter Diettrich

On Mon, Jun 27, 2011 at 4:34 AM, Hans-Peter Diettrich

Please let me know when somebody finds source code of an PDF parser, that e.g. allows to extract the exact page count from any PDF document.

fpvectorial already has a PDF importer, so you could look there. I haven't written it, so I don't know any more details about how it works, just that it works.

Felipe Monteiro de Carvalho

Reply by email

Ludo Brands
to Hans-Peter Diettrich: Be warned, the Adobe documentation is incomplete in some subtle details. E.g. the Length…

Did you take a look at SumatraPDF? Obviously, I haven't tried it on "any" PDF document, but so far didn't have problems with page counts. If you have a pdf that causes page count problems I would be glad to test it. Portableapps.com has a portabale version.

Ludo

Show quoted text 5 lines
Please let me know when somebody finds source code of an PDF parser, that e.g. allows to extract the exact page count from any PDF document.

Reply by email

Hans-Peter Diettrich
to Felipe Monteiro de Carvalho: On Mon, Jun 27, 2011 at 4:34 AM, Hans-Peter Diettrich fpvectorial already has a PDF…
Show quoted text 7 lines
On Mon, Jun 27, 2011 at 4:34 AM, Hans-Peter Diettrich > Please let me know when somebody finds source code of an PDF parser, that > e.g. allows to extract the exact page count from any PDF document. fpvectorial already has a PDF importer, so you could look there. I haven't written it, so I don't know any more details about how it works, just that it works.

Thanks for the hint :-)

DoDi

Reply by email