Link to home
Start Free TrialLog in
Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on

pdf as background image in HTML

Can a pdf be used as an image on a web page?

Is there an easy, inexpensive way to convert a pdf to a jpg? Or png?

Thanks
Avatar of Paul MacDonald
Paul MacDonald
Flag of United States of America image

Can a pdf be used as an image on a web page?
No.

Is there an easy, inexpensive way to convert a pdf to a jpg? Or png?
On a Windows machine, open the PDF, select the PDF viewer window, press CTRL+PRT SCR (Control key and the Print Screen key).  This will take a screen capture of the PDF window.  You can paste (CTRL+V) the image into a program (like Paint) that will let you save the image as a JPEG or PNG.
You can't practically use a PDF as a background but it should be straight forward to convert it.

I use GIMP for my Graphic work - it will import a PDF as images which you can then export as an image.

If you have problems finding a solution post the PDF here and I will convert - it does not take long.
Hi Richard,
Tons of ways to convert PDF to PNG or other image formats. Paul and Julian mentioned a couple of them. Another one is Xpdf's PDFtoPNG utility. You may learn about the utilities overall in this 5-minute EE video Micro Tutorial:
Xpdf - Command Line Utility for PDF Files

And specifically about PDFtoPNG in this other 5-minute EE video Micro Tutorial:
Xpdf - PDFtoPNG - Command Line Utility to Convert a Multi-page PDF File into Separate PNG Files

Other tools that can do it are IrfanView (with its Plugins, which are required for PDF support), ImageMagick, and GraphicsMagick. This EE article is not about the conversion of PDF to other image formats, but it discusses how to download and install it, and explains its numerous editions:
Reduce the file size of many JPG files in many folders via an automated, mass, batch compression method

These other EE articles give you more information on how to use GraphicsMagick, and all have to do with PDF files and other image formats:
Create a PDF file with Contact Sheets (montage of thumbnails) for all JPG files in a folder and each of its subfolders using an automated, batch method

Create an image (BMP, GIF, JPG, PNG, TIF, etc.) from a multi-page PDF

Convert a multi-page PDF file into multiple image files

The last one is especially relevant for your question. Regards, Joe
Avatar of Richard Korts

ASKER

Paul MacDonald,

The problem with Print Screen is the resultant image is too small.

I opened the pdf in Acrobat reader. Is there a way to rotate it to show it in landscape; then maybe big enough?

This whole problem occurs because I had to have my computer repaired & the VERY OLD graphics package I had is now gone, I don;t want to have to learn a new one, I don't know where the install disk is.

Just trying to shortcut a pain in the ass.

Thanks
"The problem with Print Screen is the resultant image is too small."
It should be as big as the window you have the PDF open in.  You could always make the image larger in an editing program.
ASKER CERTIFIED SOLUTION
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Joe, sounds real good, I will try it.

Richard
OK, Richard, let me know if you have any problems...I doubt it, but if you do, I can probably help you through it. Regards, Joe
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Joe,

I downloaded it, unzipped, trying to copy to a folder at the root of C, won't allow.

See attached. This is a newer version of Windows 10, never saw anything like this before. When I right click the item (pdftopng.exe), I cannot copy, it gives me "Copy to", which I selected, tell it where, does nothing.

Maybe try at command prompt?

???
cant_copy.JPG
> won't allow

That's a W10/permissions issue. Copy it wherever W10 will let you copy it and run it from there in a command prompt.

Leaving my office now for an hour or two. Will check back in to see how you're doing as soon as I return. Regards, Joe
Joe, Julian

Cannot see it anywhere. Crazy.

Used Julian's, works, will NOT let me open it in Paint, opens in that stupid mountain thing.

Finally tricked the mountain thing, opened it in Paint. Cannot resize. Could earlier.

I will open separate question on that.

Ohhhhhhh, I hope I can find that CD.

Terribly frustrating
You answered the question, but since I cannot resize, it's useless.
I found my old graphics software!

To show you how old it is, you just put the CD in & it installs; no key needed.

It's from back in the day, I'd guess early 2000's.

There are a lot of bright lights on EE; Joe & Julian, you are two of them.

I am always happy when one of you chips in on a question. I know I got a lotta knowledge behind me.

Thanks
Hi Richard,
Just got back to my office and see that you're sorted — glad to hear it. Thanks for the kind words — much appreciated! Regards, Joe
As always you are most welcome.