public class AcroRenderer extends Object
| Modifier and Type | Field and Description |
|---|---|
GUIData |
compData
holder for all data (implementations to support Swing and ULC)
|
FormFactory |
formFactory
creates all GUI components from raw data in PDF and stores in GUIData instance
|
static boolean |
FROM_JPDF2FORMS |
| Constructor and Description |
|---|
AcroRenderer()
used to create version without XFA support in XFA version.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
alwaysuseXFA() |
void |
alwaysuseXFA(boolean alwaysUseXFA) |
void |
createDisplayComponentsForPage(int page,
PdfStreamDecoder current)
build forms display using standard swing components
|
BufferedImage |
decode(PdfObject pdfObject,
PdfObjectReader currentPdfFile,
PdfObject XObject,
int subtype,
int width,
int height,
int offsetImage,
float pageScaling) |
void |
displayComponentsOnscreen(int startPage,
int endPage)
display widgets on screen for range (inclusive)
|
void |
dispose() |
boolean |
formsRasterizedForDisplay() |
ActionHandler |
getActionHandler() |
PdfArrayIterator |
getAnnotsOnPage(int page)
Deprecated.
- getFormComponents(String objectName, ReturnValues value,int pageNumber) recommended
as much more flexible
|
GUIData |
getCompData()
get GUIData object with all widgets
|
Object[] |
getFormComponents(String objectName,
ReturnValues value,
int pageNumber)
If possible we recommend you work with the Form Objects rather than
resolve GUI components
|
FormFactory |
getFormFactory() |
FormFlattener |
getFormFlattener() |
FormObject |
getFormObject(String ref)
get FormObject
|
Object[] |
getFormResources() |
HashMap |
getPageMapXFA() |
Enum<FormTypes> |
getPDFformType()
Allow user to get ENUM to show type of form
FormTypes (XFA_LEGACY, XFA_DYNAMIC, NON_XFA)
|
Iterator<FormObject> |
getSignatureObjects()
return Signature as iterator with one or more objects or null
|
PdfStreamDecoder |
getStreamDecoder(PdfObjectReader currentPdfFile,
PdfLayerList layer,
boolean isFirst) |
PrintStreamDecoder |
getStreamDecoderForPrinting(PdfObjectReader currentPdfFile,
PdfLayerList pdfLayerList) |
byte[] |
getXMLContentAsBytes(int dataType) |
boolean |
hasFormsOnPage(int page) |
boolean |
ignoreForms() |
void |
init(SwingFormCreator formCreator) |
static boolean |
isAnnotation(FormObject formObject)
Utility method to ensure formObject is actually an annotation before we continue
|
boolean |
isXFA()
returns false if not XFA (or XFA in Legacy mode)
and true if XFA using XFA data
|
int |
openFile(int pageCount,
int insetW,
int insetH,
PdfPageData pageData,
PdfObjectReader currentPdfFile,
PdfObject acroObj)
initialise holders and variables, data structures and get a handle on data object
|
void |
outputJavascriptXFA(String path,
String name) |
void |
removeDisplayComponentsFromScreen()
make all components invisible on all pages by removing from Display
|
void |
resetAnnotData(int insetW,
int insetH,
PdfPageData pageData,
int page,
PdfObjectReader currentPdfFile,
byte[][] currentAnnotList)
initialise holders and variables and get a handle on data object
Complicated as Annotations stored on a PAGE basis whereas FORMS stored on a file basis |
protected void |
resetContainers(boolean resetToEmpty)
flush or resize data containers
|
void |
resetHandler(ActionHandler formsActionHandler,
float dpi,
Javascript javascript)
reset handler (must be called Before page opened)
- null Object resets to default
|
void |
setFormFactory(FormFactory newFormFactory)
setup object which creates all GUI objects
|
void |
setIgnoreForms(boolean ignoreForms) |
void |
setInsets(int width,
int height) |
boolean |
showFormWarningMessage(int page) |
boolean |
useXFA() |
void |
useXFAIfAvailable(boolean useXFA) |
public static boolean FROM_JPDF2FORMS
public FormFactory formFactory
public GUIData compData
public AcroRenderer()
public void useXFAIfAvailable(boolean useXFA)
public void resetHandler(ActionHandler formsActionHandler, float dpi, Javascript javascript)
public void removeDisplayComponentsFromScreen()
public int openFile(int pageCount,
int insetW,
int insetH,
PdfPageData pageData,
PdfObjectReader currentPdfFile,
PdfObject acroObj)
public void resetAnnotData(int insetW,
int insetH,
PdfPageData pageData,
int page,
PdfObjectReader currentPdfFile,
byte[][] currentAnnotList)
protected void resetContainers(boolean resetToEmpty)
public void createDisplayComponentsForPage(int page,
PdfStreamDecoder current)
public static boolean isAnnotation(FormObject formObject)
public void displayComponentsOnscreen(int startPage,
int endPage)
public Object[] getFormComponents(String objectName, ReturnValues value, int pageNumber)
null key will return all values
if pageNumber is -1 it will process whole document, otherwise just that page
For a full example of usage please see http://files.idrsolutions.com/samplecode/org/jpedal/examples/acroform/ExtractFormDataAsObject.java.html
Object[] will vary depending on what ReturnValues enum is passed in and could contain String (Names), FormObject or Component
public void setFormFactory(FormFactory newFormFactory)
public GUIData getCompData()
public Iterator<FormObject> getSignatureObjects()
public ActionHandler getActionHandler()
public FormFactory getFormFactory()
public void setIgnoreForms(boolean ignoreForms)
public boolean ignoreForms()
public void dispose()
@Deprecated public PdfArrayIterator getAnnotsOnPage(int page)
public boolean isXFA()
public boolean useXFA()
public boolean hasFormsOnPage(int page)
public Object[] getFormResources()
public boolean formsRasterizedForDisplay()
public FormObject getFormObject(String ref)
ref - public void setInsets(int width,
int height)
public Enum<FormTypes> getPDFformType()
public void alwaysuseXFA(boolean alwaysUseXFA)
public boolean alwaysuseXFA()
public void init(SwingFormCreator formCreator)
public PdfStreamDecoder getStreamDecoder(PdfObjectReader currentPdfFile, PdfLayerList layer, boolean isFirst)
public boolean showFormWarningMessage(int page)
public HashMap getPageMapXFA()
public byte[] getXMLContentAsBytes(int dataType)
public PrintStreamDecoder getStreamDecoderForPrinting(PdfObjectReader currentPdfFile, PdfLayerList pdfLayerList)
public BufferedImage decode(PdfObject pdfObject, PdfObjectReader currentPdfFile, PdfObject XObject, int subtype, int width, int height, int offsetImage, float pageScaling)
public FormFlattener getFormFlattener()
Copyright © 2017. All rights reserved.