public class PdfboxDocumentWrapper extends Object implements com.frojasg1.libpdf.api.PdfDocumentWrapper
Modifier and Type | Field and Description |
---|---|
protected int |
_currentPageNumber |
protected static float |
_dpi_of_pdf_page_to_show_factor_1 |
protected String |
_fileName |
protected org.apache.pdfbox.pdmodel.PDPage |
_page |
protected org.apache.pdfbox.pdmodel.PDDocument |
_pdfDocument |
protected MyPDFRenderer |
_pdfRendererDoNotShowText |
protected MyPDFRenderer |
_pdfRendererShowText |
Constructor and Description |
---|
PdfboxDocumentWrapper() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected MyPDFRenderer |
createRenderer() |
float |
getDpi(double factor) |
String |
getFileName() |
List<com.frojasg1.libpdf.api.GlyphWrapper> |
getGlyphsOfPage(int pageIndex) |
List<com.frojasg1.libpdf.api.GlyphWrapper> |
getGlyphsOfPageRenderer(int pageIndex) |
List<com.frojasg1.libpdf.api.GlyphWrapper> |
getGlyphsOfPageStripper(int pageIndex) |
List<com.frojasg1.libpdf.api.ImageWrapper> |
getImagesFromPage(org.apache.pdfbox.pdmodel.PDPage page) |
List<com.frojasg1.libpdf.api.ImageWrapper> |
getImagesOfPage(int pageIndex) |
int |
getNumberOfPages() |
BufferedImage |
getPage(int numberOfPage,
double factor) |
protected org.apache.pdfbox.pdmodel.PDPage |
getPDPage(int pageIndex) |
Dimension |
getSizeOfPage(int pageIndex) |
String |
getTextOfPage(int pageIndex,
List<Rectangle> segments) |
void |
loadPdf(String fileName) |
BufferedImage |
renderImageWithDPI(int pageIndex,
float dpi) |
BufferedImage |
renderImageWithDPIForBackground(int pageIndex,
float dpi) |
protected static final float _dpi_of_pdf_page_to_show_factor_1
protected org.apache.pdfbox.pdmodel.PDDocument _pdfDocument
protected org.apache.pdfbox.pdmodel.PDPage _page
protected int _currentPageNumber
protected MyPDFRenderer _pdfRendererShowText
protected MyPDFRenderer _pdfRendererDoNotShowText
protected String _fileName
public String getFileName()
getFileName
in interface com.frojasg1.libpdf.api.PdfDocumentWrapper
public float getDpi(double factor)
getDpi
in interface com.frojasg1.libpdf.api.PdfDocumentWrapper
public void loadPdf(String fileName) throws IOException
loadPdf
in interface com.frojasg1.libpdf.api.PdfDocumentWrapper
IOException
protected MyPDFRenderer createRenderer()
public int getNumberOfPages()
getNumberOfPages
in interface com.frojasg1.libpdf.api.PdfDocumentWrapper
public BufferedImage renderImageWithDPI(int pageIndex, float dpi)
renderImageWithDPI
in interface com.frojasg1.libpdf.api.PdfDocumentWrapper
public BufferedImage renderImageWithDPIForBackground(int pageIndex, float dpi)
renderImageWithDPIForBackground
in interface com.frojasg1.libpdf.api.PdfDocumentWrapper
protected org.apache.pdfbox.pdmodel.PDPage getPDPage(int pageIndex)
public Dimension getSizeOfPage(int pageIndex)
getSizeOfPage
in interface com.frojasg1.libpdf.api.PdfDocumentWrapper
public String getTextOfPage(int pageIndex, List<Rectangle> segments) throws IOException
getTextOfPage
in interface com.frojasg1.libpdf.api.PdfDocumentWrapper
IOException
public List<com.frojasg1.libpdf.api.ImageWrapper> getImagesOfPage(int pageIndex) throws IOException
getImagesOfPage
in interface com.frojasg1.libpdf.api.PdfDocumentWrapper
IOException
public void close() throws IOException
close
in interface com.frojasg1.libpdf.api.PdfDocumentWrapper
IOException
public BufferedImage getPage(int numberOfPage, double factor)
getPage
in interface com.frojasg1.libpdf.api.PDFownerInterface
public List<com.frojasg1.libpdf.api.GlyphWrapper> getGlyphsOfPage(int pageIndex) throws IOException
getGlyphsOfPage
in interface com.frojasg1.libpdf.api.PdfDocumentWrapper
IOException
public List<com.frojasg1.libpdf.api.GlyphWrapper> getGlyphsOfPageRenderer(int pageIndex) throws IOException
IOException
public List<com.frojasg1.libpdf.api.GlyphWrapper> getGlyphsOfPageStripper(int pageIndex) throws IOException
IOException
public List<com.frojasg1.libpdf.api.ImageWrapper> getImagesFromPage(org.apache.pdfbox.pdmodel.PDPage page) throws IOException
IOException
Copyright © 2020 Fran Rojas. All rights reserved.