Modifier and Type | Field and Description |
---|---|
static int |
ENCRYPT_AES_128 |
static int |
ENCRYPT_NONE |
static int |
ENCRYPT_RC4_128 |
static int |
ENCRYPT_RC4_128M |
static int |
ENCRYPT_RC4_40 |
Constructor and Description |
---|
PDFUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
concat(PDFDocument[] docs,
OutputStream os,
boolean keepBookmark,
boolean removePages,
boolean stopOnError,
char version) |
static void |
encrypt(PDFDocument doc,
OutputStream os,
String newUserPassword,
String newOwnerPassword,
int permissions,
int encryption) |
static Object |
extractText(PDFDocument doc,
Set<Integer> pageNumbers) |
static HashMap |
generateGoToBookMark(String title,
int page) |
static HashMap |
generateGoToBookMark(String title,
int page,
int x,
int y) |
static void |
parsePageDefinition(Set<Integer> pages,
String strPages) |
static Set |
parsePageDefinition(String strPages) |
static void |
setChildBookmarks(Map parent,
List children) |
static Image |
toImage(byte[] input,
int page) |
static com.lowagie.text.pdf.PdfReader |
toPdfReader(PageContext pc,
Object value,
String password) |
static int |
toPermission(String strPermission)
convert a string defintion of a permision in a integer Constant (PdfWriter.ALLOW_XXX)
|
static int |
toPermissions(String strPermissions)
convert a string list of permission
|
static void |
writeImages(byte[] input,
Set pages,
Resource outputDirectory,
String prefix,
String format,
int scale,
boolean overwrite,
boolean goodQuality,
boolean transparent) |
public static final int ENCRYPT_RC4_40
public static final int ENCRYPT_RC4_128
public static final int ENCRYPT_RC4_128M
public static final int ENCRYPT_AES_128
public static final int ENCRYPT_NONE
public PDFUtil()
public static int toPermissions(String strPermissions) throws PageException
strPermissions
- PageException
public static int toPermission(String strPermission) throws ApplicationException
strPermission
- ApplicationException
public static void concat(PDFDocument[] docs, OutputStream os, boolean keepBookmark, boolean removePages, boolean stopOnError, char version) throws PageException, IOException, com.lowagie.text.DocumentException
docs
- os
- removePages
- if true, pages defined in PDFDocument will be removed, otherwise all other pages will be removedversion
- PageException
IOException
com.lowagie.text.DocumentException
public static Set parsePageDefinition(String strPages) throws PageException
PageException
public static void parsePageDefinition(Set<Integer> pages, String strPages) throws PageException
PageException
public static void encrypt(PDFDocument doc, OutputStream os, String newUserPassword, String newOwnerPassword, int permissions, int encryption) throws ApplicationException, com.lowagie.text.DocumentException, IOException
ApplicationException
com.lowagie.text.DocumentException
IOException
public static HashMap generateGoToBookMark(String title, int page)
public static HashMap generateGoToBookMark(String title, int page, int x, int y)
public static void setChildBookmarks(Map parent, List children)
public static com.lowagie.text.pdf.PdfReader toPdfReader(PageContext pc, Object value, String password) throws IOException, PageException
IOException
PageException
public static Image toImage(byte[] input, int page) throws PageException, IOException
PageException
IOException
public static void writeImages(byte[] input, Set pages, Resource outputDirectory, String prefix, String format, int scale, boolean overwrite, boolean goodQuality, boolean transparent) throws PageException, IOException
PageException
IOException
public static Object extractText(PDFDocument doc, Set<Integer> pageNumbers) throws IOException, org.pdfbox.exceptions.CryptographyException, org.pdfbox.exceptions.InvalidPasswordException
IOException
org.pdfbox.exceptions.CryptographyException
org.pdfbox.exceptions.InvalidPasswordException
Copyright © 2015 Lucee