Please choose a menu option

RSS feed? News:

01 Mar 10 Version 4.01 build 15 released Turn pages from all corners, First implemetation of Java3D, Linearized PDF detection and more ...

04 Feb 10 Major new version New look, new page turning mode, enhanced search, code tidy up and much more...

15 Jan 10 Version 3.92 build 40 released Improvements to PageFlow mode and bug fixes for client issues. More Info...

8 Dec 09 Version 3.91 build 80 released Speed enhancements to image printing, optimisations for PDFs reusing XObjects and general improvements. More Info...

20 Nov 09 Version 3.91 build 60 released Enhancements to PageFlow mode, Applet regression fixed and improvements to non embedded text rendering. Read More ...

05 Nov 09 Version 3.91 build 15 released Enhancements to PageFlow viewing mode including reflection effect, improvements to Viewer configuration and general bug fixes. Read More ...

23 Sep 09 PDF Java Ebook Solution IDRsolutions is pleased to announce a new free service which embeds PDF's inside our viewer. A must for e-book authors and distributors. Read More ...

Draw additional objects in SimpleViewer

Sometimes you may wish to overlay a display page with additional text or annotations (for example a copyright notice) but not have them as part of the PDF. Because JPedal provides a standard JPanel component you can manipulate it directly - the advantage of this method is JPedal takes care of all scaling and rendering issues.

Adding objects to a displayed page

The method org.jpedal.PdfDecoder.drawAdditionalObjectsOverPage(...) makes this possible. This function is best explained with example code, so there is a documented example in org.jpedal.examples.simpleviewer.gui.SwingGUI. This is a good starting point for experimenting with this feature.

If you wish to print across a page range, this really needs to be setup first. For this reason, from 3.40b15, print is handled separately. The method org.jpedal.PdfDecoder.printAdditionalObjectsOverPage(...) makes this possible. This function is best explained with example code, so there is a documented example in org.jpedal.examples.simpleviewer.gui.SwingGUI, below the draw code.

Removing objects from a displayed page

The method org.jpedal.PdfDecoder.flushAdditionalObjectsOnPage() makes this possible. This function is best explained with example code, so there is a documented example in org.jpedal.examples.simpleviewer.gui.SwingGUI. This feature is avalible from 3.45b32.

Custom objects

From version 3.40 you can also add custom objects which implement the interface org.jpedal.external.JPedalCustomDrawObject
to give you total control over drawing. It also includes methods to control visibility and a separate method for printing. An inner class example is located here.

Note: In certain cases a PDF file can have a clip set on it, in which case some custom objects may not be visible. We suggest setting the clip to null before any additional objects are drawn.

Important note on printing

From version 3.40b17, you can either create separate objects for each page or create a global set for all pages. This is done by using printAdditionalObjectsOverAllPages() method. For an example click here

 

PDF viewer


PDF viewer