allows external helper classes to be added to JPedal to alter default functionality -
not part of the API and should be used in conjunction with IDRsolutions only
if Options.FormsActionHandler is the type then the newHandler should be
of the form org.jpedal.objects.acroforms.ActionHandler
put debugging info for grouping onscreen
to aid in developing and debugging merging algorithms used by Storypad -
(NOT PART OF API and subject to change)
This routine allows the user to add truetype,
type1 or type1C fonts which will be used to disalay the fonts in PDF
rendering and substitution as if the fonts were embedded in the PDF
This is very useful for clients looking to keep down the size of PDFs
transmitted and control display quality -
Thanks to Peter for the idea/code -
How to set it up -
JPedal will look for the existence of the directory fontPath (ie
com/myCompany/Fonts) -
If this exists, Jpedal will look for 3 possible directories (tt,t1c,t1)
and make a note of any fonts if these directories exist -
When fonts are resolved, this option will be tested first and if a font
if found, it will be used to display the font (the effect will be the
same as if the font was embedded) -
If the enforceMapping is true, JPedal assumes there must be a match and
will throw a PdfFontException -
Otherwise Jpedal will look in the java font path for a match or
approximate with Lucida -
The Format is defined as follows: -
fontname = filename
Type1/Type1C Font names exclude any prefix so /OEGPNB+FGHeavyItalic is
resolved to FGHeavyItalic -
Each font have the same name as the font it replaces (so Arial will
require a font file such as Arial.ttf) and it must be unique (there
cannot be an Arial font in each sub-directory) -
So to use this functionality, place the fonts in a jar or add to the
JPedal jar and call this method after instancing PdfDecoder - JPedal will
do the rest
allow user to set own icons for annotation hotspots to display in
renderer - pass user selection of hotspots as an array of format
Image[number][page] where number is Annot number on page and page is
current page -1 (ie 0 is page 1).
save raw CMYK data by converting to RGB using algorithm method -
pdfsages supplied the C source and I have converted -
This works very well on most colours but not dark shades which are
all rolled into black
This is what xpdf seems to use -
Note we store the output data in our input queue to reduce memory
usage - we have seen raw 2000 * 2000 images and having input and output
buffers is a LOT of memory -
I have kept the doubles in as I just rewrote Leonard's code -
I haven't really looked at optimisation beyond memory issues
save raw CMYK data by converting to RGB using algorithm method -
pdfsages supplied the C source and I have converted -
This works very well on most colours but not dark shades which are
all rolled into black
set of static methods to save/load objects to convert images between
different colorspaces -
Several methods are very similar and I should recode my code to use a common
method for the RGB conversion
LogWriter is JPedal logging class
Example client application to extract text and image from any rectangular area
on page using JPedal (for example ad extraction)
(Assumes content is in single column)
Notes: currentGUI.getFrame() example uses some "unofficial" classes inside the library which may alter in function
slightly contrived but very effective way to convert CMYK CMAP to RGB -
I've treated the CMAP as an image and converted the values
Default is CMYK, but I am trying to allow for other ColorSpaces
copies cmyk raw data from cmyk temp dir to target directory
Converted to avoid threading issues, if this causes any problems,
please raise them in our forums, http://www.jpedal.org/phpBB2/index.php
count -
Variable in class org.jpedal.examples.tablezoning.TableZoner
allow user to add grapical content on top of page - for display ONLY
Additional calls will overwrite current settings on page
ONLY works in SINGLE VIEW displaymode
Sample code providing a workflow which extracts clipped images and places versions
scaled to specific heights
It is run using the format
java -cp libraries_needed org/jpedal/examples/ ExtractClippedImages $inputDir $processedDir $logFile h1 dir1 h2 dir2 ...
Sample code showing how jpedal library can be used with
pdf files to extract structed text from a PDF
Debugging tip: Set verbose=true in LogWriter to see what is going on.
calls various low level merging routines on merge -
isCSV sets if output is XHTML or CSV format -
XHTML also has options to include font tags (keepFontInfo),
preserve widths (keepWidthInfo), try to preserve alignment
(keepAlignmentInfo), and set a table border width (borderWidth)
- AddCustomTags should always be set to false
algorithm to place data into an object for each page - hardcoded into
program -
Co-ordinates are x1,y1 (top left hand corner), x2,y2(bottom right) -
If the co-ordinates are not valid a PdfException is thrown -
Returns a Vector with the words and co-ordinates (all values are Strings)
algorithm to place data into an object for each page - hardcoded into
program
Co-ordinates are x1,y1 (top left hand corner), x2,y2(bottom right)
If the co-ordinates are not valid a PdfException is thrown
routine to remove all objects from temp store
Converted to avoid threading issues, if this causes any problems,
please raise them in our forums, http://www.jpedal.org/phpBB2/index.php
allows user to replace whole forms action Handling code
- needs to implement ActionHandler
It is recommended you look at Options.ExpressionEngine and Options.LinkHandler for
most purposes
FORMSIG -
Static variable in class org.jpedal.objects.acroforms.formData.FormObject
FORMTEXT -
Static variable in class org.jpedal.objects.acroforms.formData.FormObject
forward -
Variable in class org.jpedal.examples.simpleviewer.gui.GUI
nav buttons - global so accessible to ContentExtractor
FORWARDPAGE -
Static variable in class org.jpedal.examples.simpleviewer.Commands