public class PDFRenderHints extends Object
Modifier and Type | Field and Description |
---|---|
static int |
CHINESE_SANSSERIF |
static int |
CHINESE_SERIF |
static int |
CHINESE_SIMPLIFIED |
static int |
JAPANESE_SANSSERIF |
static int |
JAPANESE_SERIF |
static int |
KOREAN_SANSSERIF |
static int |
KOREAN_SERIF |
Constructor and Description |
---|
PDFRenderHints() |
Modifier and Type | Method and Description |
---|---|
static void |
addSubstituteFont(String fontName,
Font subFont)
Registers a substitute font to use when a font in a PDF file is not embedded
in the file and the font is not registered with the operating system.
|
static String |
getCJKSystemFontName(int cjkFontType)
Get the name of the system font that will be used to render non-embedded instances of the CJK font type indicated by cjkFontType
|
static boolean |
getImageSmoothReduction()
Returns the value of the image reduction hint.
|
static Object |
getRenderingHint(RenderingHints.Key key)
Gets one rendering hint.
|
static RenderingHints |
getRenderingHints()
Gets a copy of the rendering hints.
|
static Font |
getSubstituteFont(String fontName)
Returns a substitute font, if one has been registered, for the given font name.
|
static boolean |
isImageSmoothReduction()
Returns the value of the smooth image reduction hingt.
|
static boolean |
isRenderComments()
Returns the value of the render comments flag.
|
static boolean |
renderSignatureTag()
This method returns the value of the flag that controls rendering of the signature
tag on empty fields.
|
static boolean |
renderSignatureVerify()
This method returns the value of the flag that controls whether signature verification
will be rendered.
|
static void |
setCJKSystemFontName(int cjkFontType,
String systemFontName)
Set the local system font systemFontName to use for a particular CJK font type cjkFontType
|
static void |
setCMYKProfile(ICC_Profile cmykProfile)
Sets a custom CMYK profile to use when reading any CMYK color information.
|
static void |
setImageSmoothReduction(boolean imageSmoothReduction)
This rendering hint tells the library whether to use a smooth image
rescaling algorithm when reducing sizes.
|
static void |
setRenderComments(boolean renderComments)
Sets a flag to tell the library to render annotations.
|
static void |
setRenderingHint(RenderingHints.Key key,
Object value)
Sets one rendering hint.
|
static void |
setRenderingHints(RenderingHints hints)
Sets the rendering hints.
|
static void |
setRenderSignatureTag(boolean renderSignatureTag)
This method sets the value of the flag that controls whether the signature
tag ("Sign Here") is rendered for empty signature fields.
|
static void |
setRenderSignatureVerification(boolean renderSignatureVerify)
This method sets the value of the flag that controls whether signature verification
will be rendered.
|
static void |
setUseSubstituteFont(boolean useSubstitute)
Tells the rendering engine to use a substitute font when a font in the PDF cannot be created for any reasons.
|
public static final int JAPANESE_SERIF
public static final int JAPANESE_SANSSERIF
public static final int CHINESE_SERIF
public static final int CHINESE_SANSSERIF
public static final int CHINESE_SIMPLIFIED
public static final int KOREAN_SERIF
public static final int KOREAN_SANSSERIF
public static void setRenderingHints(RenderingHints hints)
hints
- The new rendering hints.public static RenderingHints getRenderingHints()
public static void setRenderingHint(RenderingHints.Key key, Object value)
key
- The rendering hint key.value
- The new value of the rendering hint.public static Object getRenderingHint(RenderingHints.Key key)
key
- The rendering hint key.public static boolean isImageSmoothReduction()
public static void setImageSmoothReduction(boolean imageSmoothReduction)
imageSmoothReduction
- true to use smooth rescaling, false to use
standard rescaling.public static boolean getImageSmoothReduction()
public static void setCMYKProfile(ICC_Profile cmykProfile)
cmykProfile
- The new profile to use for CMYK color conversionpublic static void addSubstituteFont(String fontName, Font subFont)
fontName
- The name of the font in the PDF file.subFont
- The substitute font to use when the font is not present in the PDF file
or in the OS.public static Font getSubstituteFont(String fontName)
fontName
- The name of the fontpublic static void setUseSubstituteFont(boolean useSubstitute)
useSubstitute
- Flag indicating whether a substitute font should be used.public static boolean renderSignatureVerify()
public static void setRenderSignatureVerification(boolean renderSignatureVerify)
renderSignatureVerify
- The new value of the flagpublic static void setRenderSignatureTag(boolean renderSignatureTag)
renderSignatureTag
- The new value of the flag.public static boolean renderSignatureTag()
public static void setRenderComments(boolean renderComments)
renderComments
- New value of the flag.public static boolean isRenderComments()
public static void setCJKSystemFontName(int cjkFontType, String systemFontName)
cjkFontType
- the integer code for a particular CJK font type, e.g. Chinese SerifsystemFontName
- should either match one of the font names returned by GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames()
or else it should be null. If systemFontName matches a system font family name, then that font will be used to render non-embedded instances of cjkFontType.
If systemFontName is null, then that resets the font for cjkFontType to the default value, which may be none on some systems.
If systemFontName is any other value, then the call has no affect.public static String getCJKSystemFontName(int cjkFontType)
cjkFontType
- the integer code for a particular CJK font type, e.g. Chinese Serif