Please choose a menu option
Visit the IDRsolutions WebSite

JVM Options

JPedal includes a number of flags which can be added to the java command line to alter the way it operates. These are listed in the tables below. The values are all lower case.

For example, the command:

java -Dorg.jpedal.jai=true -cp jpedal.jar org/jpedal/examples/simpleviewer/SimpleViewer

will run JPedal using JAI (if available) to speed-up image scaling operations.

You can also set the values using System.setProperties() in Java but you must do this before accessing JPedal.


General JVM flags in JPedal

FlagDescription of JVM functionExample usage
org.jpedal.fontdirs
Tells JPedal to register fonts on these directories and use fonts for unembedded fonts in PDF. It expects a comma separated list (directories do not need to exist so it is useful for cross-platform settings).
-Dorg.jpedal.fontdirs= "C:/win/fonts, /usr/etc/X11/fonts/"
org.jpedal. useTTFontHinting
(Added in 4.20) Tells JPedal to use Truetype font hinting. Default is false as some fonts contain instructions on which Apple has a patent.
-Dorg.jpedal.useTTFontHinting= "true"
org.jpedal.memory
Downsamples images to save memory.
-Dorg.jpedal.memory =true
org.jpedal.hires
Maintains images at highest resolution.
-Dorg.jpedal.hires =true
org.jpedal.jai
Instructs JPedal to use JAI library if on classpath.
-Dorg.jpedal.jai =true
JAI itself has a flag to turn off hardware acceleration (removing the time-consuming check) com.sun.media.jai.disableMediaLib
org.jpedal. securityprovider
Instructs JPedal to use an alternative Security library for encryption.
-Dorg.jpedal. securityprovider= "org.bouncycastle.jce. provider. BouncyCastleProvider"
org.jpedal. CMYKprofile
Instructs JPedal to use a different ICC profile (file ends .icm) from default for CMYK .
-Dorg.jpedal.CMYKprofile= "C:/altProfile.icm"
org.jpedal. RGBprofile
Instructs JPedal to use a different ICC profile (file ends .icm) from default for sRGB .
-Dorg.jpedal.RGBprofile= "C:/altProfile.icm"
org.jpedal. downsample
New downsampling class org.jpedal.images.SamplingFactory offers several options to improve memory usage and speed on PDFs with large images.  This value can also be set programmatically.
-Dorg.jpedal.downsample= "high"
org.jpedal. noURLaccess
Stop any URL from opening in browser. It also disables any tooltips. Settings are true, false or any message to display (which also stops access)
-Dorg.jpedal.noURLaccess = "We have disabled URL links"
org.jpedal. fasterPNG
Remove safety checks and write out as Indexed PNG.
-Dorg.jpedal.fasterPNG=true
org.jpedal.flattenForm
Flattens out all the Forms, putting them on the page display, but No interactivity.
-Dorg.jpedal.flattenForm=true

Extra flags in examples

Flag ExampleDescription of UsageExample Use
org.jpedal. logging
ExtractClippedImages
Write to logfile
-Dorg.jpedal. logging =true
org.jpedal. compress_jpeg
HiResThumbnailExtractor, ExtractPagesAsThumbnails
(Added in 3.90) If JAI available, use it to write out JPeg files with user setting for JPEG compression quality (0= very samll, poor files, 1= very large files with no compression)
-Dorg.jpedal. compress_jpeg =0.5
org.jpedal. compress_tiff
ExtractClippedImages, ExtractImages, ExtractPagesAsThumbnails
If JAI available, use it to write out Tiff files compressed
-Dorg.jpedal. compress_tiff =true
org.jpedal.
multipage_tiff

ExtractPagesAsThumbnails
If JAI available, use it to write out all images to one Tiff file
-Dorg.jpedal.multipage_tiff=true
org.jpedal. jpeg_dpiExtractClippedImages, ExtractImages, ExtractPagesAsThumbnailsIf JAI available, use it to write out Tiff files compressed-Dorg.jpedal. jpeg_dpi =true
org.jpedal. opi
ExtractImages
Include OPI metadata in XML information with images
-Dorg.jpedal.opi =true
org.jpedal. listenforms
SimpleViewer
Enable custom example listener on forms components
-Dorg.jpedal. listenforms =true
org.jpedal. startWindowSizeSimpleViewer(From 3.77b28) the startup size of the Viewer can be set on startup with value width x height-Dorg.jpedal. startWindowSize= 400x300
org.jpedal. page
SimpleViewer
Page number to open document, if valid.
-Dorg.jpedal. page =4
org.jpedal. bookmark
SimpleViewer
Location to open document, if valid.
-Dorg.jpedal. bookmark =into
org.jpedal. thumbnail
SimpleViewer
Flag to disable thumbnails. Default is on.
-Dorg.jpedal.thumbnail=false
org.jpedal. configureViewer
SimpleViewer
Flag to disable menu options from config file. See this link for details.
-Dorg.jpedal. configureViewer=config.txt
org.jpedal. password
(Added in 4.14b26)

SimpleViewer
Password to open file - set to null if not needed
-Dorg.jpedal. password ="mypassword"
org.jpedal. SimpleViewer.Prefs
SimpleViewer
Location of Properties file to be used when opening SimpleViewer
-Dorg.jpedal. SimpleViewer.Prefs ="C:\prop.xml"
org.jpedal. defaultViewerScalingSimpleViewerFlag to enable user to startup with a specific scaling value (ie Fit Width, 25, 100, Fit Height). Value must be on scaling list or will be ignored.-Dorg.jpedal.defaultViewerScaling ="Fit Width"
org.jpedal. suppressViewerPopupsSimpleViewerFlag to enable user to suppress all popups at start.-Dorg.jpedal.suppressViewerPopups =true
org.jpedal.pageSizeHiResThumbnailExtractor Set pagesize to scale up to (preserving aspect ratio). Values are width x height-Dorg.jpedal. pageSize ="1000x800" 
org.jpedal. pageMaxScalingHiResThumbnailExtractorSet maximum scaling allowed so rogue image does not cause hugh images-Dorg.jpedal. pageMaxScaling =4
org.jpedal. pageSizeOverrides

HiResThumbnailExtractorSet whether pageSize or image scaling takes priority-Dorg.jpedal. pageSizeOverrides ="true"
org.jpedal. defaultPrinter

PrintPanelSet default printer to be used by JPedal-Dorg.jpedal. defaultPrinter ="Adobe PDF"
org.jpedal. printPaperSize

PrintPanelSet default paper size to print on-Dorg.jpedal. printPaperSize ="A4 (borderless)"
org.jpedal. separation

HiResThumbnailExtractor/ ExtractPagesAsThumbnails(From 4.20) Create multiple images with separate image, text and Vector content on each. Click here for tutorial.-Dorg.jpedal. separation ="all"
org.jpedal. faster_color_decoding

AllUse faster but more memory intensive and less accurate color conversion for Shading-Dorg.jpedal. faster_color_decoding =true
org.jpedal. imageType

HiResThumbnailExtractor/ ExtractPagesAsThumbnailsSet color type and color depth of the image to be saved out using a TYPE variable from a awt BufferedImage.-Dorg.jpedal. imageType =2

 

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

 


PDF viewer