public class PdfContentReaderTool
extends java.lang.Object
Constructor | Description |
---|---|
PdfContentReaderTool() |
Modifier and Type | Method | Description |
---|---|---|
static java.lang.String |
getDictionaryDetail(PdfDictionary dic) |
Shows the detail of a dictionary.
|
static java.lang.String |
getDictionaryDetail(PdfDictionary dic,
int depth) |
Shows the detail of a dictionary.
|
static java.lang.String |
getXObjectDetail(PdfDictionary resourceDic) |
Displays a summary of the entries in the XObject dictionary for the stream
|
static void |
listContentStream(java.io.File pdfFile,
int pageNum,
java.io.PrintWriter out) |
Writes information about the specified page in a PDF file to the specified output stream.
|
static void |
listContentStream(java.io.File pdfFile,
java.io.PrintWriter out) |
Writes information about each page in a PDF file to the specified output stream.
|
static void |
listContentStreamForPage(PdfReader reader,
int pageNum,
java.io.PrintWriter out) |
Writes information about a specific page from PdfReader to the specified output stream.
|
static void |
main(java.lang.String[] args) |
Writes information about each page in a PDF file to the specified file, or System.out.
|
public static java.lang.String getDictionaryDetail(PdfDictionary dic)
dic
- the dictionary of which you want the detailpublic static java.lang.String getDictionaryDetail(PdfDictionary dic, int depth)
dic
- the dictionary of which you want the detaildepth
- the depth of the current dictionary (for nested dictionaries)public static java.lang.String getXObjectDetail(PdfDictionary resourceDic) throws java.io.IOException
resourceDic
- the resource dictionary for the streamjava.io.IOException
public static void listContentStreamForPage(PdfReader reader, int pageNum, java.io.PrintWriter out) throws java.io.IOException
reader
- the PdfReader to read the page content frompageNum
- the page number to readout
- the output stream to send the content tojava.io.IOException
public static void listContentStream(java.io.File pdfFile, java.io.PrintWriter out) throws java.io.IOException
pdfFile
- a File instance referring to a PDF fileout
- the output stream to send the content tojava.io.IOException
public static void listContentStream(java.io.File pdfFile, int pageNum, java.io.PrintWriter out) throws java.io.IOException
pdfFile
- a File instance referring to a PDF filepageNum
- the page number to readout
- the output stream to send the content tojava.io.IOException
public static void main(java.lang.String[] args)
args
- Copyright © 1998–2018. All rights reserved.