Basics
 
     

You can add images into your PDF by using the Doc.AddImage method.

ABCpdf embeds images into the PDF at their original resolution. Images may be displayed at different sizes but the underlying image is exactly the same. If your image looks grainy when you print you'll need to find a higher resolution (bigger) image.

Suppose you have an image 300 pixels wide by 600 pixels high. There are approximately 75 points in an inch so if you want this image to print well at 300 dpi then you would need to add it into a rectangle no more than 1 inch by 2 inches. If you wanted to view it at a screen resolution of 75 dpi you could place it into a rectangle up to 4 inches by 8 inches.

 

   
Modes
 
     

You can present images to ABCpdf in one of two ways. You can operate in pass-through mode and add an image directly into your Doc object. Alternatively you can operate in indirect mode and draw your data into an Image object before adding the Image object to your document.

In general you will want to add JPEG images in pass-through mode and all other types of images in indirect mode.

Indirect mode has a number of advantages over pass-through mode.

Because each image is fully decoded when it is presented to the Image object, image corruption can be caught at this stage. Corrupt images are not uncommon and if you don't detect the corruption before the data is inserted you may end up with a corrupt PDF.

The Image object can apply color correction to images as they are decoded. So images are inserted into the PDF fully color corrected ensuring that they always display correctly.

Pass-through mode has advantages for some types of images.

Because the image may not have to be decompressed and re-compressed, using pass-through mode can be much faster than indirect mode. This is particularly true for scanned TIFF images.

Because the original image compression is maintained there is no possibility of expansion due to re-compression. This is the reason you will typically want to embed JPEG images using pass-through mode.

 

   
Comp
 
     

So what types of compression does the Image object use?

The Image object generally uses Flate compression. This is the same compression type as is used for PNG images. It is a lossless method which ensures that the quality of your original image is maintained.

However if your source image is black and white then ABCpdf will use CCITT G4 fax compression as this typically results in reduced file sizes for this type of image.

 

   

 

Browser Based Help. Published by chm2web software.