Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PDF to JPG conversion

Status
Not open for further replies.

mc13

Programmer
May 26, 2000
26
US
I have a webpage using VB.NET as the code behind that currently displays a PDF, but for security reasons I need to convert the dynamic PDF to a JPG to display. I am looking for a the source not a third party or open source solution
 
Are you wanting to do this conversion on the fly or prior to publishing? JPG does not support multi-page documents. You will need to convert to TIFF for that. If you are doing the conversion up front. You should be able to convert to TIFF, then it should be much easier to convert each page of the TIFF to a JPG. (TIFF and JPG are very similar in format).

I know you don't want to hear about 3rd party controls, but the VideoSoft Image Viewer (for VB6) was very useful in allowing us to convert PDF to TIFF and vise versa. It was the only control at the time that supported multi-page TIFFs without busting the company's budget.

--------------------------------------------------
"...and did we give up when the Germans bombed Pearl Harbor? NO!"

"Don't stop him. He's roll'n."
--------------------------------------------------
 
I am creating the content on the fly and then sending it to the browser at this time, but PDF has to have a file cached on the local drive to present so the solution that was suggested was to create a image file and present it in the browser. Tiff would be a fine format since this is a multi page document, but the process of getting third party controls and open source approved is long and tedious so I was trying to avoid that option.

Thanks
 
ok... i see what you're running into.

Is the data coming from a database? That way you could use SSRS or Crystal to display the data. You can also control whether or not the viewer of the report is allowed to save the document locally. SSRS comes with SQL Server 2005, and Crystal's Server Services used to come with a licensed copy of the Dev Edition. That way you could completely bypass the PDF to Image issue all together. it would also allow you to create on the fly as needed. Since they are already server services all you need to do is add a link to the report on your website. Sounds like you already have security implemented on your web services, so adding for reports shouldn't be too much more.

Anything more would be beyond my scope, and would need others' input on how to accomplish the task.

--------------------------------------------------
"...and did we give up when the Germans bombed Pearl Harbor? NO!"

"Don't stop him. He's roll'n."
--------------------------------------------------
 
The only issue with those solutions is that I have to have the format that is in the PDF, legal document.
Thanks for the input.
 
Not sure of the format you are needing, but most are fairly simple to recreate in both SSRS and Crystal Reports.

There is another option. Looking through Google, I found this on Experts-Exchange.com. You can get there from Google by searching "saving pdf as jpg in VB.Net". It was the first item in the results. (If you have an account there, you can just follow this link: How to convert PDF to JPG within VB.Net)

--------------------------------------------------
"...and did we give up when the Germans bombed Pearl Harbor? NO!"

"Don't stop him. He's roll'n."
--------------------------------------------------
 
No I don't have an account there.
 
You can get there from Google by searching "saving pdf as jpg in VB.Net". It was the first item in the results.

--------------------------------------------------
"...and did we give up when the Germans bombed Pearl Harbor? NO!"

"Don't stop him. He's roll'n."
--------------------------------------------------
 
Thanks I was looking at the results from that search, and many more that I have tried. My comment was that I don't have an account on expert exchange so I am not able to see that particular solution.
 
If you follow the Google link and scroll all the way down past the adds, you'll see the solutions.

--------------------------------------------------
"...and did we give up when the Germans bombed Pearl Harbor? NO!"

"Don't stop him. He's roll'n."
--------------------------------------------------
 
I see that now. I will give it a whirl and see what comes of it.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top