Package io.scanbot.pdf.model
Class PdfConfig
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class PdfConfig implements Parcelable
Represents the PDF configuration which will be used for the PDF file creation.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Integer
DEFAULT_PDF_DPI
public final static Integer
DEFAULT_JPEG_QUALITY
private final PdfAttributes
pdfAttributes
private final PageSize
pageSize
private final PageDirection
pageDirection
private final PageFit
pageFit
private final Integer
dpi
private final Integer
jpegQuality
private final ResamplingMethod
resamplingMethod
-
Constructor Summary
Constructors Constructor Description PdfConfig(PdfAttributes pdfAttributes, PageSize pageSize, PageDirection pageDirection, PageFit pageFit, Integer dpi, Integer jpegQuality, ResamplingMethod resamplingMethod)
-
Method Summary
Modifier and Type Method Description final PdfAttributes
getPdfAttributes()
final PageSize
getPageSize()
final PageDirection
getPageDirection()
final PageFit
getPageFit()
final Integer
getDpi()
final Integer
getJpegQuality()
final ResamplingMethod
getResamplingMethod()
final static PdfConfig
defaultConfig()
Returns the default PDF configuration. -
-
Constructor Detail
-
PdfConfig
PdfConfig(PdfAttributes pdfAttributes, PageSize pageSize, PageDirection pageDirection, PageFit pageFit, Integer dpi, Integer jpegQuality, ResamplingMethod resamplingMethod)
- Parameters:
pdfAttributes
- The PDF attributes (document metadata - author, creator, title, etc.).pageSize
- Physical size of the page (A4, A5, LETTER, etc.).pageDirection
- The page direction of the PDF file (PORTRAIT, LANDSCAPE, AUTO).pageFit
- How to fit the image into the page (FIT_IN, FILL_IN, STRETCH, NONE).dpi
- Thedpi
parameter has two different meanings depending on the value ofpageSize
andpageFit
.jpegQuality
- JPEG quality for images.resamplingMethod
- if NONE: always geometrically rescale the image to fit the page if necessary.
-
-
Method Detail
-
getPdfAttributes
final PdfAttributes getPdfAttributes()
-
getPageSize
final PageSize getPageSize()
-
getPageDirection
final PageDirection getPageDirection()
-
getPageFit
final PageFit getPageFit()
-
getJpegQuality
final Integer getJpegQuality()
-
getResamplingMethod
final ResamplingMethod getResamplingMethod()
-
defaultConfig
final static PdfConfig defaultConfig()
Returns the default PDF configuration.
-
-
-
-