Lazarus

Miscellaneous => Other => Topic started by: anyone on September 29, 2020, 10:07:09 pm

Title: Is there any support for PDF in Free Pascal?
Post by: anyone on September 29, 2020, 10:07:09 pm
Hi all, I am new to this forum.

I wonder if it is worth to create a command-line utility txt2pdf... In fact, I have already started working on it. So it would not make much sense for me to continue working on it if Free Pascal already has built-in support for PDF.



Title: Re: Is there any support for PDF in Free Pascal?
Post by: Handoko on September 29, 2020, 10:26:42 pm
Maybe:
https://wiki.freepascal.org/PowerPDF (https://wiki.freepascal.org/PowerPDF)
https://wiki.freepascal.org/fcl-pdf
https://wiki.freepascal.org/FPReport
Title: Re: Is there any support for PDF in Free Pascal?
Post by: jwdietrich on September 29, 2020, 10:59:13 pm
You should also observe the licenses of the existing tools, which may pose restrictions on the mode of distribution of your code.

Additionally, you might want to check out https://foundation.freepascal.org/projects/project-6 (https://foundation.freepascal.org/projects/project-6) and https://foundation.freepascal.org/projects/reporting-engine (https://foundation.freepascal.org/projects/reporting-engine) for information on projects currently being developed.
Title: Re: Is there any support for PDF in Free Pascal?
Post by: anyone on September 29, 2020, 11:50:09 pm
Thank you, @Handoko and @jwdietrich.

"A reporting engine [with PDF support] that does not have GUI dependencies" is something I was looking for.

Though, I just need to convert plain text file into PDF file. In the mean time, I think I will just stick to my own txt2pdf by looking up PDF File Format 1.7 Specification.

However, it is good to know that professional PDF libraries for Free Pascal are available or going to be officially made available.
Title: Re: Is there any support for PDF in Free Pascal?
Post by: trev on September 30, 2020, 01:47:54 am
There is already a wide selection of text to PDF command line tools for both Windows and UNIX or UNIX-like operating systems with source, though they are generally written in C and have varying licences.
Title: Re: Is there any support for PDF in Free Pascal?
Post by: anyone on September 30, 2020, 10:50:04 am
There is already a wide selection of text to PDF command line tools for both Windows and UNIX or UNIX-like operating systems with source, though they are generally written in C and have varying licences.

Thanks for this useful information.  I hope I am not reinventing the wheel because someone has already done it before.

I am not sure about those command-line tools written in C, but from my initial finding, quite a number of open-source  software (regardless of the platform) are using PdfBox (and its Android port), or iText. Even my resume created with a mobile app was produced by iText (as shown in metadata section).

It is not difficult just to convert plain text into PDF programmatically after a few attempts (without using third-party library) although it would be much complicated to generate multi-page PDF (if input text file is long enough).

 
TinyPortal © 2005-2018