Delphi PDF generation [closed] - delphi

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
We're using Fast Reports to create reports but we're not very happy with the quality of the PDFs it creates. I know we can plug in other PDF components instead of the one that comes with FastReports so my question is
What good PDF components are there out there (Free or Commercial) for Delphi? Ideally it should not require any dlls.
Edit: I bought Gnostice in the end as it had the FastReports integration, source available and a fairly good reputation. I did however find an issue (after I had bought it) with exporting multipage reports from FastReports to PDF where the component leaks memory and corrupts the output. I've reported it to Gnostice so I guess we'll see how good their support is in the next few days...
Edit 2: Gnostice came back with a fix that rectifies the memory leak and the corrupted output.

Use our SynPDF unit. Among its features, you can use a true TCanvas to create the PDF, and embed True Type fonts subsets. It's one of the few libraries handling Arabic languages and such (via the UniScribe API). It's fully Unicode ready, and very fast.
And it's FREE and OpenSource!
Works from Delphi 6 up to Delphi XE.
http://blog.synopse.info/?q=pdf

We are using Gnostice and are very pleased with it. It allows us to print our ReportBuilder reports to PDF, HTML, XML, Excel, Gif, ...
Some minor issues we have come accross working with the component
Somewhere deep in the bowels of the component, Application.Processmessages get's called. You have to make sure your code handles reëntrance.
We had to set Preferences.UseImagesAsResources of the TgtDocSettings component to True to resolve AV's when printing to anything else but PDF.
Probably due to the way we use the component but the first printed page was always Portrait. We had to add a call to gtRBExportInterface.Engine.Settings.Page.Orientation to set the orientation to landscape if needed.

We use wPDF. We don't generate pdf-files directly thought - we generate different reports, and 'print' them to pdf as an alternative to printer.

PowerPDF is free and opensource (LGPL). its realy small but effective!
PowerPDF

Here are some (All Commercial) I came across when looking for something similar:
VisPDF Library - This is worth checking out and you get source.
PDFDoc Scout library - This is an ActiveX control and you don't get source but has some good features (good HTML to PDF conversion for example).
PDF Creator Pilot - Worth checking out too.
I found that the freely available ones LibHaru, PoDoFo weren't up to scratch for my requirements unfortunately.

I've been using wPDF with QuickReports / QRDesign. Basically by converting the report to a metafile then producing the pdf from that. It also claims to have Fast Report support.

There are 2 ways to create PDF reports using eDocEngine. Either you use a report builder component (like QuickReport, Rave etc) and then use the eDocEngine interface to save the contents as PDF.
The other way is to programmtically use TgtPDFDocument class and then settings it's properties and collections. This gives much finer control over features like watermarks, permissions, password security etc.

IIPDFLib by llionsoft at: www.llion.net
Delphi library llPDFLib 3.6
llPDFLib is pure Object Pascal library to create PDF documents. This library doesn't use any DLL or external third-party software to generate PDF files. Library includes TPDFDocument component with properties and methods like Delphi's TPrinter but is designed to generate a PDF file.
Features:
Real Canvas.Handle (HDC)
Unicode support
Acroforms (buttons, radiobuttons, checkboxes, comboboxes, text input fields)
Watermarks
Thumbnail
JavaScript
vEncryption (40 and 128 bit)
Outlines (with support russian, turkish, baltic, east europe, greek, CJK languages)
Compression
Image compression(Jpeg, Flate, CCITT 3, CCITT 3 (2D), CCITT 4)
Hyperlink
Annotation(with support russian, turkish, baltic, east europe, greek, CJK languages)
Embedding True Type fonts (TTF and TTC)
Emulation of the Underline and StrikeOut font style
Present output into Stream for work with CGI/ISAPI applications
Filters for QReport,FastReport and Report Builder.
Set of the components for work with DBGrids
True Type font subset
It costs $299 US, but you get what you pay for.
(source: llion.net)

Related

Edit PDF documents in Delphi

We have a requirement to add the ability to edit PDF documents witin a Delphi application.
I.e. given a PDF document, open it and generate a form with edit boxes on it which the user can use to update the PDF document.
Can anyone suggest a third part component that would provide this functionality or suggest some way of achieving this.
Thanks
I use QuickPDF. Well documented, lots of examples, good support. However updating text in a PDF is an art, not a science, and unless you have full control over the producer of the PDF you may find it hard to do in the general case. For example: I have seen PDFs where text is formed from individual characters, each inserted at a specific location, so hard to edit as words; and of course in some PDFs the 'text' is actually an image of text, requiring OCR before you can edit it.
You can try Gnostice PDFtoolkit.
DISCLAIMER: I work for Gnostice.
Take a look at Amyuni PDF Creator ActiveX, it is supported in 32 bit and 64 bit applications, you may find it useful now that Delphi has a 64 compiler.
Usual disclaimer applies

PDF Parsing with Text and Coordinates [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I am currently using PDF Box to parse a pdf and I am trying to figure out how to retrieve data about the text such as the font (bold, size, etc) and the location of the font.
Any suggestions?
After poking around the (hard to find) PDFBox docs, I found this little gem.
Apparently one of the examples shows exactly how to do everything you asked. Basically, you subclass PdfTextStripper and override the processTextPosition method. There, you query the TextPosition for whatever information you need.
For future reference, you can find the javaDoc here: http://pdfbox.apache.org/apidocs/index.html
Edit 2018-04-02: original link is dead, but example can be found in the SVN repo here.
One of the best things for text extraction from PDFs is TET, the text extraction toolkit. TET is part of the PDFlib.com family of products.
PDFlib.com is Thomas Merz's (the author of the "PostScript and PDF Bible") company.
TET's first incarnation is a library. That one can probably do everything you want, including to positional information about each text element on the page. Oh, and it can also extract images. It recombines+merges images which are fragmented into pieces.
pdflib.com also offers another incarnation of this technology, the TET plugin for Acrobat. Obviously you'd need Acrobat as well to make use of this.
And the third incarnation is the PDFlib TET iFilter. This is a standalone tool for user workstations. Both this is free (as in beer) to use for private, non-commercial purposes.
Lastly, TET also comes with a commandline interface.
TET is really powerful. Way better than Adobe's own text extraction. It extracted text for me where other tools (including Adobe's) do spit out garbage only.
A few months ago I tested their desktop standalone tool, and what they say on their webpage is true. It has a very good commandline. Some of my "problematic" PDF test files the tool handled to my full satisfaction.
This thing is my recommendation for every sophisticated and challenging PDF text extraction requirements.
TET is simply awesome. It detects tables. Inside tables, it identifies cells spanning multiple columns. It identifies table rows and contents of each table cell separately. It deals very well with hyphenations: it removes hyphens and restores complete words. It supports non-ASCII languages (including CJK, Arabic and Hebrew). When encountering ligatures, it restores the original characters...
Give it a try.
The GetPageText function with extract option 3 or 4 in Quick PDF Library returns a CSV string for the selected page which includes the text (either individual words or a piece of text) and the related font name, text color, text size and co-ordinates on the page.
Note: it is a commercial library and I work for the company that sells it.
PDF files can be parsed with tabula-py, or tabula-java.
I made a full tutorial on how to use tabula-py on this article. You can tabula in a web-browser too as long as you have installed Java.

PDF compressor for DELPHI 2007

Need a PDF compressor that I can use from DELPHI 2007.
What is the best one out there?
UPDATE ---
By PDF compressor I mean some way to compress an existing PDF. I don’t need to create new PDF files.
The usage that I’ll do with it, simple, I have in my applications the possibility to associate a file to a product, an entity, equipment whatever, and if the file is a PDF I want to be able reduce its size.
There some tools that can do this with no need to actually zip the file, what would mean that to see it you would have to decompress(unzip), this tools jut reduce the size.
So a PDF compressor, or call it what you will, is just this.
If you need to create PDF from Delphi code, see this page in Delphi:about.
I'd like to add our Open Source SynPdf unit, working from Delphi 6 up to XE.
Arguably the best is the Acrobat family of software from Adobe itself.
Edit 2:
Adobe has quite some extensive documentation on their API and docs on their Acrobat.com services.
Their Acrobat products are in use by a lot of vendors, even the affordable ones, to provide PDF support.
Edit 1:
Downvoters: it is for two reasons I mentioned Arguably in my original answer.
First of all just stating best without adding more criteria will always get a subjective answer.
Second: Adobe is the inventor of PDF, and the PDF support of their software is great. I know there are drawbacks of Adobe software too, but the question was the 'best', which I interpreted as the best PDF support.
There is an on-line PDF compressor that I heard is giving good results.
It should not be too hard to wrap that in Delphi for occasional use.

free visual editor for graph (dot) files [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Is there a free (as in "cheers"), linux-compatible, interactive visual editor for graphviz or other graphs? aptitude seems to be drawing a blank.
edit: "cheers" means both "beer" and "speech". meta-edit: I guess it should be "free as in beach".
edit 2: Maybe a suitable svg editor would be a more realistic goal. I basically want something that can be used to conveniently create a collection of labeled shapes and lines which connect them. Actually it would probably make more theoretical sense to extract the graph from this data, since it includes both semantic data (the graph) and presentation data (the way it's arranged on the screen, the colours used, etc). Is there a way to lay out labeled shapes conveniently with inkscape or some other free vector graphics editor? I really need rearranging of the nodes, and (re)flowing of the text in them, to happen with maximum convenience.
I've also realized that this is really a superuser question. I was going to repost it over there when I found an existing question that seems likely to provide me with an answer: dia.
edit 3: dia seems useful except that it doesn't seem to be possible to get the textual contents of node objects to wrap in any useful manner (ie any way other than by inserting manual line breaks). This is kind of a dealbreaker, since it screws most of the convenience factor that's my incentive to do things this way rather than with a text editor or a pen and paper. But it supports some sort of event model and Python-based scripting, so I'm going to dig around a bit and see if I can use python to wrap the text in response to content changes. Unless one of you lovely people has a better idea..? Basically I want to have the option to explicitly set the node size via GUI interaction, and have the contents wrap and rescale (within a certain range of font sizes) to fit it. Rich text would be pretty useful.
In other words, this is actually a valid SO question at this point, since it appears to require coding.
To save time those eager to try existing programs handling DOT graphs:
dotty can display DOT graphs and with little luck you can move its nodes with a mouse, nothing more, and you can easily segfault as a bonus (I tried latest stable graphviz)
lefty is only a special-purpose language interpreter used by dotty, nothing to look at
KGraphEditor is an empty wishful project (a QT window and a few buttons)
gvedit is not really a graph editor: it provides a simple text editor and you hit F5 to run a layout tool and open a picture; you can actually get more functionality from configuring your own favourite text editor
grappa is an abandoned java applet, which I failed to run
interestingly, dia can export to DOT ("PyDia DOT Export"), but due to its buggy printing, you have to post-process the files to use them
graphedit can read in DOT a graph and you can move its nodes around and change their colors
Eclipse people started working on DOT support in GEF4, so it can display DOT graphs
GraphUI has a very interesting demonstration video, but beware: although it might seem that the graph is being created by clicking and dragging, in reality all editing happens through the keyboard, using shortcuts. On the plus side, contextual instructions are always available showing which shortcuts do what.
DotEditor claims a tree editor, modifying node attributes/color/shape with mouse.
The graph editors mentioned in other answers, yEd (a Java application) and JointJS/Rappid (a JaveScript thing) apparently have nothing to do with DOT (tried both).
I believe there exist no working DOT-handling graph editor out there at all.
JointJS is a Javascript graph editing library based on Backbone : http://www.jointjs.com/
The author also provides Rappid, an online graph editor which might suit your needs, I don't know about dot files import though.

Need PDF viewer control - tried a lot [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm looking for a component to view and print PDF files from Delphi/C++Builder. Delphi or ActiveX, not .NET. The license must be for royalty free distribution and the viewer must not require Adobe Reader to be installed.
So far I have tried:
Gnostice PDFtoolkit:
Display problems with JPX images
Radaee PDF Viewer:
Fast rendering, but crashes.
NO reply from support.
VeryPDF:
Slow rendering, but reliable.
No printing
WPViewPDF:
Messed up layout of most PDFs
GdViewer:
No continuous multi-page display
QuickPDF library:
No continuous multi-page display
eXPert PDF Viewer:
Use not allowed for generic PDF viewer.
NO reply from support.
EasyPDF SDK:
No continuous multi-page display
DynamicPDF:
No royalty-free license
Foxit PDF SDK:
No royalty-free license
3-Heights PDF Viewer:
No royalty-free license
Any other options?
Regards,
Brian
I successfully implemented SumatraPDF as an embedded viewer in a Delphi application.
It's to be launched through a shell command but adding the -plugin parameter makes it child of your form or any container. You can then send keystrokes or use DDE to pilot it.
see the wiki and look for "-plugin".
Sumatra is very fast and redistributable under the GPL conditions, it uses MuPDF as rendering engine, which is a very viable solution.
if you look at the source code of the following Total Commander plugin, you will find how to use it. Just ignore the part of the source that integrates the functionality as a TC plugin
For this scenario I recommend Amyuni PDF Creator ActiveX. As stated in the website:
The application license allows for royalty-free distribution
of your application.
Additionally, it supports JPX images, continuous multi-page display and many other features.
Disclaimer: I am part of the development team of this product.
It seems like continuous multipage display is your main problem here with the royalty free libraries.
Just an idea : One option may be to use QuickPDF to convert the PDF into a multipage PDF file and then write some code yourself to simulate a continuous multipage scolling. If you need zooming and other PDF display features then this may not suit your needs though. Another option is to use a thumbnail window down the side to help users navigate and show single page in the main window. You may not have too many other options as you seem to have used all of the PDF libraries that I am aware and a couple more.
It all depends on what your viewing and printing requirements are of course.
WPViewPDF is now available in Version 3.x which is based on a new rendering engine.
It now works with most PDF files. It is very responsive due to multi threading and has the possibility to manipulate PDF files, i.e. interactive moving or deletion of pages.
info: http://www.wpcubed.com
Kind Regards, WPCubed GmbH

Resources