Java Source Code Examples
JPedal includes a large number of example PDF applications written in Java for you to use and customise. Each one is described below along with a link to code and any related items.
PDF Extraction tools
- Clipped Image extraction - fully automated extraction of PDF page images as tif, png or jpeg with ability to define output dimensions and image quality. Created to help a large catalogue company put images online.
- ExtractPagesAsThumbnails - fully automated program to rasterize PDF pages as images and optionally scale.
- HiResThumbnailExtraction - extract PDF pages at the best possible quality. If the images are larger than the page, it scales up the page rather than scaling down the image.
- PDF to image conversion very simple example - just the minimum code needed for PDF to image conversion
Viewers
- SimpleViewer is a very comprehensive java PDF viewer. Shows off the full power of the library.
- MultiViewer adds the ability to open multiple PDF files in separate panes to the SimpleViewer.
- JPanelDemo is a very simple java PDF viewer with minimal functionality.
- AppletViewer provides a version of SimpleViewer running as an Applet.
Printing
- SilentPrinting provides an example on how to print PDF files automatically from Java.
Extraction
- ExtractFormDataAsObject extracts raw PDF form data from a PDF file.
- ExtractImages extracts and saves images from a PDF file. Extracts the raw images so also consider Clipped Image extraction.
- ExtractStructuredContent extracts any Structured content (text with additional metatags to preserve structure).
- ExtractTextInRectangle extracts text in any rectangular area.
- ExtractTextInRectangleAsTable extracts text in any rectangular area of a PDF page and attempt to add tabular structure.
- ExtractTextAsWordlist will generate a list of words on the PDF page with co-ordinates.
- ExtractOutline will extract the outline from a PDF file.
Search
- FindTextInRectangle will find locations of word on the PDF page.
JavaFX
- ExtractPagesAsJavaFX - fully automated program to convert PDF pages to JavaFX files.
Rich Internet Applications
We have a number of examples and a special version using the UltraLight Client from Canoo to provide a RIA client. Please contact us for more details.
Other
- PageCount gives the number of pages in the PDF file.
- ShowDocumentProperties display the metadata attached to the PDF file.
- ShowPageSize displays the size of all PDF pages in pixels, centimetres and inches.
- ShowIfEmbeddedFontsUsed demonstrates how to find out if the PDF file contains embedded fonts.
Return to main PDF support section
Click here for the main PDF support area with lots of java examples, PDF tutorials and useful information to get the most out of the JPedal PDF library




