public final class PdfObjectSizeCalculationUtil extends Object
PdfObject
in bytes, which it will take in PDF.Modifier and Type | Method and Description |
---|---|
static long |
calculateImageStreamLengthInBytes(com.itextpdf.kernel.pdf.xobject.PdfImageXObject imageXObject,
com.itextpdf.kernel.pdf.PdfDocument pdfDocument)
Calculates the length of an
PdfImageXObject stream in bytes, which it will take in PDF. |
public static long calculateImageStreamLengthInBytes(com.itextpdf.kernel.pdf.xobject.PdfImageXObject imageXObject, com.itextpdf.kernel.pdf.PdfDocument pdfDocument)
PdfImageXObject
stream in bytes, which it will take in PDF.
Some important notes:
PdfImageXObject
which passed to this
method, because a copy is being created.
PdfImageXObject
stream is calculated without taking into account
internal fields.
imageXObject
- an image whose stream length in bytes will be calculatedpdfDocument
- the PDF document into which, as a result, the original imageXObject will be writtenCopyright © 1998–2024 iText Group NV. All rights reserved.