Solved

ASP.NET 3.5 - Add uploaded image to PDF document - I am starting with PSD

Posted on 2009-04-14
4
640 Views
Last Modified: 2013-12-25
Greetings experts,

I am looking to develop a process here.  I am not that familiar with working with PDFs in ASP.NET, other than simple HTML to PDF conversions using a component.  Here's what I need to accomplish:

Desired Outcome: Using ASP.NET,  I want to add uploaded logo images (including EPS files) into PDF files on the server and make them available for the visitor to print on-demand.  I would like there to be a "Proof" process in the middle.

Here's the situation:

1.  I have several different PSD files
2.  I want to provide users the ability to upload a file (.EPS, .JPG or .GIF) (using Telerik RadUpload)
3.  If it is a vector image like EPS, I want to convert it (planned on using WebSuperGoo's ImageGlue) so that it can be rendered in the browser for the proof (see step 4)
4.  I want to provide a proof as either an image or a low-res PDF
5.  If approved, I want to save the file on the server

What I'm trying to figure out is:

* when to create the PDF and what to use to do it?
* need to create these editable regions where the images will go - how do i do this?
* how can i resize and add the image (proof version - jpg) (final version - eps) to the pdf?

This project is still in discovery and I'm not really looking for code.  I'm just trying to settle on required components and approximate time that it's going to take to build each piece.  

If I could offer 1,000 points for this question, I would.  I appreciate any input you can provide.  Thanks in advance.
0
Comment
Question by:boudog13
4 Comments
 
LVL 9

Expert Comment

by:tetorvik
ID: 24145553
Take a look at iTextSharp, it's a component to create pdf documents on the fly. It can be downloaded from
http://sourceforge.net/projects/itextsharp/

iTextSharp tutorial page has lots of examples what you can actually do with it.
http://itextsharp.sourceforge.net/tutorial/index.html

Hope this helps!
0
 

Author Comment

by:boudog13
ID: 24146654
Thanks tetorvik.  

Unfortunately, this won't quit get me there.  All of the PDF creator components will allow you to create a document on the fly, but I need to convert existing PSD files to PDF, add an editable region, then add an uploaded logo to that region on the fly.

I haven't been able to find PDF converters that will do the step either.  I almost see 3 components involved in the PDF process...

component a to convert the PSD to PDF
component b to edit the PDF and insert the required editable area
component c (websupergoo imageglue) to convert EPS to JPG (if EPS is uploaded)
then back to componet b to insert the image
0
 
LVL 3

Accepted Solution

by:
stu28bu earned 500 total points
ID: 24633538
I used ImageGlue.Net to do a similar thing a while back and I see the newest version (6) now includes rendering the output of a graphic to PDF, so it should work for your needs.
What I would do is have the image uploaded and save that original, then load that original into memory and do the modifications that need to be done and then either save it as a PDF or send the PDF directly to the browser for the proof (or even use JPG).  Then once it's accepted you do the final manipulation and save it directly to a PDF with ImageGlue.  If you need the images to all be placed on a certain size for printing out (e.g. center the image on an 8.5 x 11 piece of paper), then you can use ImageGlue's ability to extend the canvas of the image.  So you simply get the current width and height and extend it to get 8.5 x 11 and then save that whole thing as a PDF.  So there shouldn't really be any need to actually edit PDF's, you're editing images the entire time and then simply saving the final version as a PDF.  
If that doesn't sound like it will work, give me some more details and we can figure something out.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Where can I find... 1 29
maps stopped work unsure why 7 34
Full width video doesn't shrink on mobile- wordpress, divi 8 45
How to close an asp.net web form using C# ? 4 30
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
In this Micro Tutorial viewers will learn how to remove an unwanted object using Photoshop’s feature known as content-aware fill.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

786 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