public class PDFErrorHandling extends Object
Modifier and Type | Field and Description |
---|---|
static int |
EH_ABORT_RENDERING
Abort the entire rendering operation and throw an exception to the host application.
|
static int |
EH_SHOW_ERROR_AND_CONTINUE
Display the error in the rendering of the page and continue rendering other pages.
|
Constructor and Description |
---|
PDFErrorHandling() |
Modifier and Type | Method and Description |
---|---|
static void |
addError(RenderError error)
Add an error to the list of errors accumulated.
|
static void |
addError(Throwable t,
String prefixMsg)
Add an error to the list of errors accumulated.
|
static void |
checkForErrors_UsePDFException(String errorMsg)
This is a convenience method that gets called by the library after a rendering.
|
static void |
checkForErrors_UsePrinterException(String errorMsg)
This is a convenience method that gets called by the library after printing a page.
|
static void |
clearErrors()
Clear any errors that have accumulated from previous pages.
|
static int |
getErrorHandling()
Returns the current value of the error handling flag.
|
static Vector |
getErrors()
Gets a list of errors in the last rendering.
|
static boolean |
isThrowXFADynamicException()
Returns the value of the flag that controls whether or not an exception is thrown when trying to build a
document with an AcroForm that has Adobe XML Forms Architecture (XFA) data, and is a Dynamic Form.
|
static boolean |
isUseSubstituteFont()
Returns the value of the flag that controls font handling errors.
|
static void |
setErrorHandling(int errorHandling)
Sets the value of the error handling flag.
|
static void |
setThrowXFADynamicException(boolean throwDynamicXFAException)
When the flag is set to true (the default), the library will throw an error if the document being built
has an AcroForm that has Adobe XML Forms Architecture (XFA) data, and is a Dynamic Form.
|
static void |
setUseSubstituteFont(boolean useSubstituteFont)
Use substitute fonts when there is an error.
|
public static final int EH_SHOW_ERROR_AND_CONTINUE
public static final int EH_ABORT_RENDERING
public static void clearErrors()
public static void addError(RenderError error)
error
- The error.public static void addError(Throwable t, String prefixMsg)
t
- The exception that was thrown.prefixMsg
- A message to prefix to error string.public static Vector getErrors()
public static void checkForErrors_UsePrinterException(String errorMsg) throws PrinterException
errorMsg
- The error message to use in the PrinterException.PrinterException
public static void checkForErrors_UsePDFException(String errorMsg) throws PDFException
errorMsg
- The error message to use in the PDFException.PDFException
public static int getErrorHandling()
public static void setErrorHandling(int errorHandling)
errorHandling
- The new value of the error handling flag.public static boolean isUseSubstituteFont()
public static void setUseSubstituteFont(boolean useSubstituteFont)
useSubstituteFont
- The new value of the flag.public static boolean isThrowXFADynamicException()
public static void setThrowXFADynamicException(boolean throwDynamicXFAException)
throwDynamicXFAException
- The new value of the flag.