Home General

Using a PDF image as a report template

edited April 2011 in General
Hi,

My client issues certificates to their clients who have achieved their
objective. I've created a report that maps firstname, surname etc onto the
places on the certificate which they'll put in the printer. That has been
working fine for ages now.

Now they want to be able to export the report to a JPEG file which I can do
with PsRBExportDevices Pro v2.05 from rarefind which works with
ReportBuilder. However they also want to have the printing that is on the
certificate aswell as the fields that I put on with ppReport in the JPEG
image so I'm wondering if I can somwhow import the PDF file they've sent me
and use it as a 'soft' template for the ppReport either at design or
runtime?

I'm currently using Delphi 6 with Report Builder 7.04.

Many thanks for any help
Cheers
Colin

Comments

  • edited April 2011
    Hi Colin,

    ReportBuilder does not have the ability to display a PDF file inside a
    report. The best option would be to use a conversion utility to convert
    the PDF to an image or RTF format then add that to the report as the
    starting template.

    The latest version of ReportBuilder now supports exporting to image
    files as well as many other file formats. Moving forward, we hope you
    will consider upgrading.

    http://www.digital-metaphors.com/rbWiki/General/What's_New/RB_12


    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2011
    Hi Nico,

    Many thanks for this, does RB12 export include export to JPEG?

    Cheers
    Colin
  • edited April 2011
    Hi Nico,

    I've downloaded version 12 RB and as it now can export to JPEG I'll be
    upgrading and charging to the client! ,

    Could you tell me where I can find the documentation / tutorial to create a
    report with the RTF image as a starting template please? Any
    recommendations on any converter to take a JPG to an RTF format?

    Could you also please confirm that the Standard version 12 of RB does this
    please?

    Many thanks and kind regards
    Colin

  • edited April 2011
    Hi Colin,

    There are a number of on-line and downloadable conversion tools to
    convert PDF files to image or RTF format. A quick search in Google
    gives a number of options. I know some customers in the past have used
    a tool named VeryPDF.

    If you would like to do this in code, I believe Gnostice develops a PDF
    to RTF converter library.

    Once you convert your PDF to an image or RTF, then simply place the
    image/RTF inside the report. Ideally this will be placed in the
    PageStyle band behind the rest of the report so you can then position
    the actual report components to match up with the template.


    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2011
    Hi Nico,

    Thanks for this, I assume you mean loading the rtf into an rb image
    component on the report, but do you know if there is a limit on the size in
    megs that the image can be?

    Cheers
    Colin


  • edited April 2011
    Hi Colin,

    Sorry if I wasn't being clear.

    You have two options.

    1. Convert the PDF "template" to an image (jpeg, gif, bmp, etc.) and
    place it inside the report using a TppImage component.

    2. Convert the PDF to an RTF file and place it inside the report using a
    TppRichText component.

    I believe we have had customers successfully perform both methods.
    There is no set limit on the size of an image you can place inside a
    report. The only limitation would be the amount of memory/resources
    your computer has available.


    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2011

    The best solution is to find a high quality conversion utility that can
    convert the PDF to a metafile. Unlike a jpeg, a metafile can contain a list
    of windows graphics commands (GDI commands) that can be 'played' to render
    the image. For text based info, this provides a much smaller file and
    produces higher quality output.


    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited April 2011
    Hi Nico,

    re being clear, it was more likely me plus I am more informed now. Hurrah!

    I've got the client to send me the certificate as a jpg now and so far I've
    used Word to load that in as an image and save out to a RTF file.

    Where I got confused was that I put a TImage into the PageStyle band and got
    an access violation which led me to think there was a limit on the size of
    image it would take.

    What I didn't realise however is that I should use a TppRichText component.
    It's been years since I did any Delphi work and I'd never used a TppRichText
    component.

    Thanks very much I'll see how I go.
    Best
    Colin

    I have the image as a jpg now and I can
  • edited April 2011
    Hi Nard,

    As you'll see from my reply to Nico I think I may be able to get away with
    the JPG option but definitely take your advice on board.

    Great to hear you've got export to jpg on v12 and had I known my clients
    subsequent requirement for that I would have bought the upgrade the month
    before last or so when we talked about orientation of text fields!

    Best from an aftershockful night in Christchurch NZ :-)
    Colin

This discussion has been closed.