Adobe PDF Library

Displaying PDF files in an Image Viewer

ImageDisplay

View Sample Code

ImageDisplay makes a rasterized image of the first page of a PDF file and displays it in a special window on your computer. The program defines an optional input document. The entire first page is converted to a graphic for display.

ImageDisplayByteArray

View Sample Code

Like ImageDisplay, ImageDisplayByteArray makes a rasterized image of the first page of a PDF file and displays it in on your computer.  The program defines an optional input document. The entire first page is converted to a graphic for display.

These two Java ImageDisplay programs produce the same result, but the source code differs.  This program builds the image using a ByteArray, a Java feature.

A Byte Array is a contiguous section of memory, expressed as raw data, a series of bytes.

This sample program takes the content for the first page of a PDF file and stores it in a Byte Array, and then from that Byte Array exports the content to the display viewer.