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
| Flag | Description of JVM function | Example 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. useICC | Instructs JPedal to use slower ICC colorspace mapping when changing CMYK jpegs into sRGB. Default is to use fast formula conversion which can make some colours darker. User needs to supply YCC and CMY profiles which can be found on the Internet, in many application or in Sun's JAICMM package. We have found best results with the files CMY.pf and YCC601.pf | -Dorg.jpedal.useICC= "YCC=C:/profiles/YCC601.pf, CMY=C:/profiles/CMY.pf" |
| org.jpedal. profile | Instructs JPedal to use a different ICC profile (file ends .icm) from default for CMYK to sRGB conversion. | -Dorg.jpedal.profile= "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" |
Extra flags in examples
| Flag | Example | Description of Usage | Example 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_dpi | ExtractClippedImages, ExtractImages, ExtractPagesAsThumbnails | If 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. startWindowSize | SimpleViewer | (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. defaultViewerScaling | SimpleViewer | Flag 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. suppressViewerPopups | SimpleViewer | Flag to enable user to suppress all popups at start. | -Dorg.jpedal.suppressViewerPopups =true |
| org.jpedal.pageSize | HiResThumbnailExtractor | Set pagesize to scale up to (preserving aspect ratio). Values are width x height | -Dorg.jpedal. pageSize ="1000x800" |
| org.jpedal. pageMaxScaling | HiResThumbnailExtractor | Set maximum scaling allowed so rogue image does not cause hugh images | -Dorg.jpedal. pageMaxScaling =4 |
| org.jpedal. pageSizeOverrides | HiResThumbnailExtractor | Set whether pageSize or image scaling takes priority | -Dorg.jpedal. pageSizeOverrides ="true" |
| org.jpedal. defaultPrinter | PrintPanel | Set default printer to be used by JPedal | -Dorg.jpedal. defaultPrinter ="Adobe PDF" |
| org.jpedal. printPaperSize | PrintPanel | Set 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 | All | Use faster but more memory intensive and less accurate color conversion for Shading | -Dorg.jpedal. faster_color_decoding =true |
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



