5

We use report builder to generate reports on our software developed with Delphi 2010. I have a lot of reports that display an image, but:

Is it possible to display a PDF in a report builder report just like we display a JPG?

One of our customers wants to display PDFs that contains only a single page with an image (dont ask me why he did not save it as JPG). But the problem is, he has a lot of pdfs that he does not want to convert.

Rafael Colucci
  • 6,018
  • 4
  • 52
  • 121
  • I seriously doubt it since PDFs are multi-page. I have never seen anybody ever put a PDF into anything else in a Delphi reporting component. – Warren P Mar 29 '12 at 19:49
  • Yeah, neither have I. But one of our customer wants to display PDFs that contains only a single page with an image (dont ask me why he did not save it as JPG). But the problem is, he has a lot of pdf that he does not want to convert. – Rafael Colucci Mar 29 '12 at 19:52
  • Unless you call an inline previewer that grabs a screen dump and dumps a bitmap to disk and then puts that image in your report a solution, I doubt you'll find anything. That would be one big image file, if it was a US LETTER or A4 size page at 600 dpi. – Warren P Mar 29 '12 at 19:54
  • I doubt it to. I can also use tools to extract the image from the PDF, but that is a lot of work I am trying to avoid. – Rafael Colucci Mar 29 '12 at 19:55
  • 3
    @RafaelColucci check this out http://wiki.freepascal.org/PascalMagick from what I understand you should be able to do a in memory conversion of PDF to image format of your choice with ImageMagick –  Mar 29 '12 at 20:47
  • gsdll32.dll (Ghostsript) may come to the rescue, please head [here](http://www.delphipraxis.net/165450-pdf-image-trim.html) (German page). – menjaraz Apr 15 '12 at 18:31
  • http://stackoverflow.com/questions/4896333/how-to-convert-pdf-to-bmp-png-jpg-etc-etc – Glen Morse Sep 13 '12 at 06:58
  • I think it's a bad idea to even try to embed a PDF in the report and is asking for trouble. He says he does not want to convert them - is this because the task would be tedious if done manually? You could propose that he uses a tool to automatically batch convert them to JPG (just do a search for free PDF batch conversion tools in your favorite search engine). – Mattl Jan 07 '13 at 12:22
  • Why not place a link in the report to open the PDF on the appropriate viewer ? You can do that in the report. – Carlos Ferreira Jul 30 '13 at 13:49

1 Answers1

0

It is possible IF you convert the PDF to another image format.

refer to how to convert PDF to BMP/PNG/JPG etc etc

or check out http://wiki.freepascal.org/PascalMagick

Community
  • 1
  • 1
Sam
  • 2,663
  • 10
  • 41
  • 60