eu.livotov.tpt.gui.vdv.formats
Class PdfDocument
java.lang.Object
eu.livotov.tpt.gui.vdv.formats.PdfDocument
- All Implemented Interfaces:
- DocumentRasterProvider
public class PdfDocument
- extends java.lang.Object
- implements DocumentRasterProvider
- Author:
- dlivotov
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
documentFile
private java.io.File documentFile
documentId
private java.lang.String documentId
pagePropertiesMap
private java.util.Map<java.lang.String,RasterizedPageProperties> pagePropertiesMap
ROTATION_STEP
public static final float ROTATION_STEP
- See Also:
- Constant Field Values
pdfDocument
private org.icepdf.core.pobjects.Document pdfDocument
zoom
private float zoom
pagesCount
private int pagesCount
pageSize
private org.icepdf.core.pobjects.PDimension pageSize
fileCacheFolder
private java.io.File fileCacheFolder
icePdfPresent
private boolean icePdfPresent
PdfDocument
public PdfDocument(java.io.File pdf)
getDocumentId
public java.lang.String getDocumentId()
- Specified by:
getDocumentId
in interface DocumentRasterProvider
getPagesCount
public int getPagesCount()
- Specified by:
getPagesCount
in interface DocumentRasterProvider
hasFacingPage
public boolean hasFacingPage()
getPageData
public java.io.InputStream getPageData(int pageNumber,
float zoomLevel,
int rotationLevel)
- Specified by:
getPageData
in interface DocumentRasterProvider
getPageProperties
public RasterizedPageProperties getPageProperties(int pageNumber,
float zoomLevel,
int rotationLevel)
- Specified by:
getPageProperties
in interface DocumentRasterProvider
closeDocument
public void closeDocument()
- Specified by:
closeDocument
in interface DocumentRasterProvider
getPageSize
protected java.awt.Dimension getPageSize(int page,
float zoom)
openDocument
protected void openDocument()
throws org.icepdf.core.exceptions.PDFException,
java.io.IOException,
org.icepdf.core.exceptions.PDFSecurityException
- Throws:
org.icepdf.core.exceptions.PDFException
java.io.IOException
org.icepdf.core.exceptions.PDFSecurityException
getPageImage
private java.awt.Image getPageImage(int page,
float zoom)
invalidate
public void invalidate()
getPageStream
public java.io.InputStream getPageStream(int page,
float zoom)
generatePageId
private java.io.File generatePageId(int page,
float zoom)
updatePageImageCache
private java.io.File updatePageImageCache(int page,
float zoom)
finalize
protected void finalize()
throws java.lang.Throwable
- Overrides:
finalize
in class java.lang.Object
- Throws:
java.lang.Throwable