Show PDF preview on the fly

Posted on 2010-09-08
Last Modified: 2012-05-10
Need some ideas on how best to accomplish my goal, we are a printing company and are trying to set up a site for our clients to be able to order business cards.  We'd like to show them a template (.jpg or pdf for now) of what their card looks like with XXXXXX's where name, title, email, etc. appear.  They would then be prompted to enter their information into cooresponding text boxes, hit a preview button and get a preview of what their businees card will look like.  They'd then be able to approve it or change/preview again.  We'd then like to be able to send the high res PDF directly to a hot folder where the printer is looking for it....thereby never needing a prepress person to touch it.

I've seen some HTML to PDF converters out there, but we can't seem to get a working version of a business card into HTML form.  Also, tried XML with no luck.  My prepress guys are working in InDesign to create the business card template and exporting to HTML.  If you have any ideas, please let me know, I'd like to stay away from using CSS to place the text on the image because that won't result in a high res PDF for printing.

Question by:drunk_irishman
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 21

Expert Comment

ID: 33628637
If you wanted to do a completely in-house coded solution, you are limited to the PDF generation techniques available, such as:

I have also seen a couple of organizations use Press Sense ( to do this as they offer a web application specializing in online ordering of print materials.  It's a commercial product, but it does the job well.
LVL 35

Expert Comment

ID: 33629127
We have used PDF sharp for generating PDFs.  You should make sure that the version you generate for preview is NOT the high-res version - or what is to stop the person from just taking that file.

Then when they click approve you generate the second high-res version you send to the printer.
LVL 10

Accepted Solution

Espavo earned 500 total points
ID: 33629284
Have you had a look at using ABCpdf? (I haven't used it for what you're asking here, and my experience with it makes me believe it may be able to do what you require...)
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 33629823
From what I can tell might be a little too limited for what I need to do.  It appears as though rather than replacing XXXX's in the template with the text the user provides, I will need to generate an entirely new file (ie.  Previously we created a program that would take a InDesign file in .INX format and be able to replace text within that, but that would require some human interaction to convert from .INX to least that's what my prepress guys tell me.

As for the high-res version, I think I would probably use a watermark of some kind except for the version that goes to print, thanks for keeping that in mind.

Expert Comment

ID: 33644197
You can use iText. But still you have to create the file on the server first, for instance in a temp folder.
Let me know if you want some sample code, I can give it to you easily.

Author Comment

ID: 33683865
Eddie, I am downloading iTextSharp now.  If you do have any sample code, it would be greatly appreciated.

Author Comment

ID: 33780599
Ok, I was able to use ABCpdf to do what I my only other request is:

Does anyone know a way for me to convert the PDF to a JPEG in order to show the user a preview of their business card?  I could show them the PDF but it's a fillable PDF form and therefore would give them the feeling they could type into it and make changes....I want all changes made in the web page form (textboxes, check boxes, etc).  Anyone have any ideas?


Expert Comment

ID: 33908103
sorry drunk, missed your request.

I would suggest you do the same as you did with the PDF. Generate a JPG on the fly.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to remove duplicate code from my project 5 49
PHP: Filling Out/Creating a PDF 29 109
Saving Web Page as PDF 9 47
Validation for Passport expiry in 2 17
In a previous article published here at Experts Exchange, Signature Image with Transparent Background (, I explained how to cre…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question