Convert PDF to image file (PNG, JPG or TIFF)

dwg101

Member
Messages
12
Reaction score
0
I'm trying to convert PDF files into image files so I can view them easily with a Photo Viewer.

The PDF files are typically black and white drawings. The size ranges from 5MB to 200kB. Typically they are vector format printed from some CAD software.

The issue is that the size of the image files is quite large compared to the PDF file (in order to get reasonable clarity). One thing I noticed is that converting a PDF of size 5MB gives the same size image file as the 200kB PDF file.

I tried converting to JPEG, PNG and TIFF. I also tried converting to a smaller page size (say from A2 to A4) but no relief. I think maybe if it was a raster PDF it may be a different story.

Most of the discussion on the web seems to be for Image-to-PDF conversion but similar comments are made for the converted file size.

My question is: What's the main reason this happens?

Next question: Is there any converter software which is sensitive to the issue described?


Note: I can't attach the PDF files as it's a copyright issue.
 
I'm trying to convert PDF files into image files so I can view them easily with a Photo Viewer.

The PDF files are typically black and white drawings. The size ranges from 5MB to 200kB. Typically they are vector format printed from some CAD software.
It sounds like they are PDF files in which the data is stored as vectors, which is much more efficient at storage than JPEG images which are stored as individual pixels. So, when the PDF file is converted into an image, the amount of data expands considerably. The higher the resolution you want, the larger the amount of data.

For example, a single straight line in PDF is stored as two points (the ends of the line), but converted to an image file it can become thousands of pixels (depending on how many pixels it takes to draw the line).

So a high-resolution image file can be much larger than the PDF file used to generate the image. The higher the resolution, the larger it will be.
I hope this is helpful.
 
I'm trying to convert PDF files into image files so I can view them easily with a Photo Viewer.

The PDF files are typically black and white drawings. The size ranges from 5MB to 200kB. Typically they are vector format printed from some CAD software.
CAD software is vector based, and the files were not "printed" but Exported to a PDF still in vector format (the preferred format for PDFs usually). These files will be small.
The issue is that the size of the image files is quite large compared to the PDF file (in order to get reasonable clarity). One thing I noticed is that converting a PDF of size 5MB gives the same size image file as the 200kB PDF file.
As Tom said in his reply, the vector information has to be converted into a full page bitmap image (huge) and usually compressed to something smaller (depending on detail/colors), but will almost always be larger than the original vector drawing.
I tried converting to JPEG, PNG and TIFF. I also tried converting to a smaller page size (say from A2 to A4) but no relief. I think maybe if it was a raster PDF it may be a different story.
A PDF file with raster data will be as large as the converted output (assuming the same compression level). For example, a color image saved in a PDF file is usually compressed in JPG format, so if it's converted to a standalone JPG file using the same compression level as the original it will be the same size.
Most of the discussion on the web seems to be for Image-to-PDF conversion but similar comments are made for the converted file size.

My question is: What's the main reason this happens?

Next question: Is there any converter software which is sensitive to the issue described?


Note: I can't attach the PDF files as it's a copyright issue.
It's not the software that needs to be sensitive to the issue, but instead the user needs to be. Bitmap images are huge when not compressed, can still be very large when compressed, and the user needs to be aware of that and choose settings during the conversion that best meets their needs.
 
I'm trying to convert PDF files into image files so I can view them easily with a Photo Viewer.

The PDF files are typically black and white drawings. The size ranges from 5MB to 200kB. Typically they are vector format printed from some CAD software.

The issue is that the size of the image files is quite large compared to the PDF file (in order to get reasonable clarity). One thing I noticed is that converting a PDF of size 5MB gives the same size image file as the 200kB PDF file.

I tried converting to JPEG, PNG and TIFF. I also tried converting to a smaller page size (say from A2 to A4) but no relief. I think maybe if it was a raster PDF it may be a different story.

Most of the discussion on the web seems to be for Image-to-PDF conversion but similar comments are made for the converted file size.

My question is: What's the main reason this happens?

Next question: Is there any converter software which is sensitive to the issue described?


Note: I can't attach the PDF files as it's a copyright issue.
You want to convert to a bitmap high resolution file, or a medium resolution greyscale file.

Use PNG with non-JPEG compression. or TIFF with non-JPEG compression.

JPEG compression is not ideal for computer generated drawings (it doesn't deal well with the sharp edges).
 
Get a different viewer, one that shows PDFs. Converting to a bitmap is an abomination.
 
Thanks for the responses.

(1) With the explanation of data stored as vectors (a line as 2 points):

I remember reading something about TIFF files being able to carry vector data. Is this right? If so, which software can do this?

(2) With the instructions:
"You want to convert to a bitmap high resolution file, or a medium resolution greyscale file. Use PNG with non-JPEG compression. or TIFF with non-JPEG compression."

Which software would have these options? The bitmap conversion is much, much larger, do you mean convert to bitmap and then convert the bitmap into PNG or TIFF?

(3) For a different viewer, the only viewer I came across which deals with PDFs and images (as some of the drawings are images as well), is Irfanview. But it takes a long time to process the PDF files.
 
Thanks for the responses.

(1) With the explanation of data stored as vectors (a line as 2 points):

I remember reading something about TIFF files being able to carry vector data. Is this right? If so, which software can do this?

(2) With the instructions:
"You want to convert to a bitmap high resolution file, or a medium resolution greyscale file. Use PNG with non-JPEG compression. or TIFF with non-JPEG compression."

Which software would have these options? The bitmap conversion is much, much larger, do you mean convert to bitmap and then convert the bitmap into PNG or TIFF?
Photoshop can do this.

A "BitMap" file has one bit per pixel. Each bit is either black or white. Vector artwork rendered as a bitmap should compress reasonably well (as long as you are not using JPEG compression).

Similarly, vector artwork rendered as a greyscale image will be "aliased", which means they will look good, even at a slightly lower resolution.

Again, these files will be big unless compressed. Most lossless compression algorithms should work well.
(3) For a different viewer, the only viewer I came across which deals with PDFs and images (as some of the drawings are images as well), is Irfanview. But it takes a long time to process the PDF files.
The bottom line is that a "photo viewer" is probably not the best choice for viewing PDF files containing vector diagrams.

It's hard to recommend software without knowing your platform. However, Adobe Acrobat reader should be available for Windows, Mac, iOS, android, and likely others.

The Mac and iOS come with built-in PDF viewers. I assume Windows does as well.

If you are on a Mac, the finder should show you thumbnail previews of your PDFs, allowing you to select which ones you want to view.
 
Extracting vector graphics from PDF files and viewing in a dedicated image viewer is a rather specialist task - should try on Adobe or CAD forums.
 
Last edited:
Depending on your images, you could always save to JPG and then experiment with reducing resolution and adding compression. You may be able to reduce size and still maintain sufficient detail.
 
Depending on your images, you could always save to JPG and then experiment with reducing resolution and adding compression. You may be able to reduce size and still maintain sufficient detail.
Vector drawings tend to have a lot of very contrasty edges (we would call them "lines"). JPEG compression does not to well on this, and tends to blur them out. JPEG is really designed for the sorts of natural images captured by cameras.

ZIP, RLE, LZW, and other lossless compression algorithms do much better on these sorts of images.

If the original vector art consists of black lines on a white background, you don't need RGB images (which use 24 bits per pixel). You may not even need greyscale images (at 8 bits per pixel). You may be able to get by with bitmap images at 1 bit per pixel. That's a 96% size savings of the uncompressed image.

PNG or GIF are reasonably common file formats that can work well here.
 
Extracting vector graphics from PDF files and viewing in a dedicated image viewer is a rather specialist task - should try on Adobe or CAD forums.
Viewing vector graphics from a PDF is fairly easy. The three basic elements found in PDF files are vector graphics, text (which is a specialized for of vector graphics) and sampled images.

Any reasonable PDF viewer should have no trouble whatsoever with vector graphics in a PDF file.

Adobe Illustrator, or Afinity Designer are both good programs for editing PDF files.

Adobe Illustrator, Afinity Designer, Photoshop or Afinity Photo are programs for converting PDF files to image files.

However, if the goal is merely to view PDF files, I would recommend one of the many PDF viewer programs, rather than trying to convert the PDF to an image file, and then using a photo viewer. Converting to images is more work, and a lower quality result.
 
Why do you want to use a photo viewer? That’s the wrong tool for the job.
 
Thanks for the responses.

To clarify some of the questions:

1. I want to use an image viewer because of speed. At the same time I'm trying to reduce the converted image size to reduce disk space. Typically the converted image files can be anywhere between 2x or 50x the size of the PDF file for the ones I've tried to convert.

2. I don't know of any program other than an image viewer that can view both images and PDFs by scrolling (either by middle mouse wheel or by pressing the up/down arrow keys). The one I'm using is Irfanview. As suggested before, once I get to a PDF file, it gets much slower.

3. I think the responses here have been quite detailed and would guess that asking at a CAD or PDF forum may not be as detailed. I'll try the suggestions and then if it doesn't work, I'll ask on a PDF forum.
 
The suggestion about the 1 compared to the 24 (bit per pixel):

I tried this on PDF-XChange Editor Pro and got a smaller file. This is for TIFF.

One question I have. There is a halo effect around lines and text as seen in the second image (the one I converted). The first image is by Others and has sharp squares. I actually prefer this and would guess it may be a smaller size too.

The settings in PDF ... Image type = 1 (black and white), Photometric = min value is black, Dither - Yes, Compression = LZW, DPI = 300.

80e90d4667264320951642bf1a64cfa3.jpg.png
 
Last edited:
Thanks for the responses.

To clarify some of the questions:

1. I want to use an image viewer because of speed. At the same time I'm trying to reduce the converted image size to reduce disk space. Typically the converted image files can be anywhere between 2x or 50x the size of the PDF file for the ones I've tried to convert.
If the PDF is very complicated, it can be slow to view. Of course, it will also be slow to render to an image.

The advantage of a PDF is that you retain detail as you zoom the file.

With an image file, you determine the level of detail when you render to an image file. Zooming the image past that level will yield a pixelated view, not more detail.

Vector PDFs can be much smaller than the rendered image. Imagine a page with a big "X" on it. The vector PDF may contain an instruction to draw a line from the lower to the upper right, and a second line from the upper left to the lower right. The rendered image contains a list of every pixel on the page, and the associated color. For a letter sized sheet of paper at 300 pixels per inch, that's 8.4 million pixels. If the file is in color, you have 3 bytes of information per pixel. That's about 25 million bytes of data. If you want 600 pixels per inch, that's about 100 megabytes of information for a rendered file, vs. perhaps 100 bytes for the vector PDF of the X.

Your challenge is that image files really are not a great solution for these kind of drawings.

2. I don't know of any program other than an image viewer that can view both images and PDFs by scrolling (either by middle mouse wheel or by pressing the up/down arrow keys). The one I'm using is Irfanview. As suggested before, once I get to a PDF file, it gets much slower.
Adobe Acrobat and Apple's Preview both allow you to scroll the image.

Apple's Preview will display both PDFs and images. It's quite fast on Apple's new M1 based Macs.

3. I think the responses here have been quite detailed and would guess that asking at a CAD or PDF forum may not be as detailed. I'll try the suggestions and then if it doesn't work, I'll ask on a PDF forum.
I think the advice you will get in those forums is not to convert to rendered image files.
 
The suggestion about the 1 compared to the 24 (bit per pixel):

I tried this on PDF-XChange Editor Pro and got a smaller file. This is for TIFF.

One question I have. There is a halo effect around lines and text as seen in the second image (the one I converted). The first image is by Others and has sharp squares. I actually prefer this and would guess it may be a smaller size too.

The settings in PDF ... Image type = 1 (black and white), Photometric = min value is black, Dither - Yes, Compression = LZW, DPI = 300.

80e90d4667264320951642bf1a64cfa3.jpg.png
The "halo" effect you see can be caused by the "dither" setting or by JPEG compression. I suggest turning off dither.
 
Thank you for responding again.

With respect to the dither, I thought it may have been this but did not see a difference when I tested, but I will look into it again.

I understand the recommendations not to convert the PDF files but I still want to continue with this because of the speed factor. As well, I'm not sure if I mentioned but some files are PDF and some are images (as produced by others). I doubt that Adobe Acrobat will be able to handle both PDFs and images at the same time, and if it does I think it will be slower than Irfanview. So this is the reason I've chosen to go with images. Irfanview has an option what to view, so I can skip PDFs, but it can still be in the background if I need to go into more detail. The suggestion about using 1 bit per pixel instead of 24 bits per pixel has helped a lot and for this reason I want to continue with this.

I will ask a follow up question on another post with regard to conversion software.
 
Last edited:
Thanks for the responses.

To clarify some of the questions:

1. I want to use an image viewer because of speed. At the same time I'm trying to reduce the converted image size to reduce disk space. Typically the converted image files can be anywhere between 2x or 50x the size of the PDF file for the ones I've tried to convert.

2. I don't know of any program other than an image viewer that can view both images and PDFs by scrolling (either by middle mouse wheel or by pressing the up/down arrow keys). The one I'm using is Irfanview. As suggested before, once I get to a PDF file, it gets much slower.

3. I think the responses here have been quite detailed and would guess that asking at a CAD or PDF forum may not be as detailed. I'll try the suggestions and then if it doesn't work, I'll ask on a PDF forum.
A PDF viewer is what many of us have suggested. NOT a JPG from PDF viewer. It's fast, and the original PDFs are probably as small a file as you'll get. I don't have any big PDFs on hand, but it goes about as fast as I can hit keys.

But hey, Adobe Bridge can view either PDFs or JPEGs or TIFFs. Just arrow key through them as fast as you want. It even goes page by page through PDFs.

But good luck; I'm afraid I still don't understand the why.
 
Last edited:

Keyboard shortcuts

Back
Top