Package com.storedobject.pdf
Class CombinedPDFReport
java.lang.Object
com.storedobject.pdf.PDF
com.storedobject.pdf.PDFReport
com.storedobject.pdf.CombinedPDFReport
- All Implemented Interfaces:
Executable,ContentProducer,ContentType,RequiresTransactionManager,Closeable,AutoCloseable,Runnable
A class that allows you to combine multiple other reports into a single report. Any number of other contents can
be added using one of the "addContent" methods.
- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.pdf.PDF
PDF.ObjectFormTable<T extends StoredObject>, PDF.ObjectTable<T extends StoredObject>, PDF.PDFContent, PDF.Text -
Field Summary
Fields inherited from class com.storedobject.pdf.PDF
ORIENTATION_LANDSCAPE, ORIENTATION_PORTRAIT, pageSizes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContent(ContentProducer externalPDF) Add content from a "content producer".voidaddContent(ContentProducer externalPDF, int startingPage, int endingPage, int... pagesToSkip) Add content from a "content producer".voidaddContent(FileData externalPDF) Add content from "file data".voidaddContent(FileData externalPDF, int startingPage, int endingPage, int... pagesToSkip) Add content from "file data".voidaddContent(StreamData externalPDF) Add content from "stream data".voidaddContent(StreamData externalPDF, int startingPage, int endingPage, int... pagesToSkip) Add content from "stream data".voidaddContent(InputStream externalPDF) Add content from an "input stream".voidaddContent(InputStream externalPDF, int startingPage, int endingPage, int... pagesToSkip) Add content from an "input stream".final intGet the current value of the scale percentage (SeesetScalePercentage(int)).voidsetOrientation(int orientation) Set the orientation to be used when the next content is added.final voidsetScalePercentage(int scalePercentage) Set the percentage scaling to be done when the next content is added.Methods inherited from class com.storedobject.pdf.PDFReport
createTitleTable, createTitleTable, createTitleTable, createTitleTable, execute, execute, extractContent, getDevice, getLogo, getLogoName, getLogoPosition, getProductLogo, getProductLogoName, getTitle, getTitleTable, getTitleText, getUser, setTitleText, viewMethods inherited from class com.storedobject.pdf.PDF
aboutToAddExternalContent, add, add, add, add, addBlankRow, addBlankRow, addBlankRow, addBlankRow, addBlankRow, addBlankRow, addCentered, addContent, addContent, addContent, addContent, addContent, addContent, addContent, addContent, addContent, addContent, addGap, addHTML, addHTML, addHTML, addHTML, addHTML, addHTML, addImage, addImage, addImage, addingExternalContent, addTitles, addTitles, addTitles, addTitles, addTitles, addTitles, addToTable, addToTable, addToTable, addToTable, addToTable, addToTable, addToTable, addToTable, addToTableCentered, addToTableCentered, chainTo, close, createCell, createCell, createCell, createCell, createCell, createCell, createCell, createCell, createCenteredCell, createCenteredCell, createGraphics, createGraphics, createImage, createImage, createImage, createImage, createImage, createImage, createImage, createImage, createImage, createImageFromHTML, createImageFromHTML, createImageFromHTML, createImageFromHTML, createImageFromSVG, createImageFromSVG, createTable, createTable, createText, createText, createText, createTitleText, createTitleText, createTitleText, drawTable, drawTable, drawTable, dumpError, generateContent, getBottomMargin, getContent, getContentType, getEntity, getEntityLocation, getEntityName, getFileExtension, getFileName, getFontSize, getFooter, getHeight, getLeftMargin, getPageNumber, getPageOrientation, getPageSize, getPageSize, getPageSizeIndex, getReportFormat, getReportStage, getRightMargin, getTopMargin, getTransactionManager, getWaterMark, getWidth, getY, getY, log, newPage, newReportStage, newReportStage, open, pageCompleted, pageStarted, printAuditTrail, printLetterHeadOnEveryPage, printLetterHeadOnEveryPage, printPageNumber, printPageNumber, printTotalPageNumber, printTotalPageNumber, produce, readContent, setDefaultCellCustomizer, setEntity, setError, setFontSize, setLanguage, setLanguage, setLogo, setLogo, setPageNumber, setPageSizeIndex, setPassword, setReportFormat, setTransactionManager, setWaterMark, showText, toCharCountMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.core.ContentProducer
abort, getError, getStreamData, getStreamDataProvider, getSystemEntity, ready, saveTo, saveTo, saveTo, saveToMethods inherited from interface com.storedobject.core.ContentType
getLink, getMimeType, isAudio, isHTML, isImage, isLink, isMedia, isPDF, isText, isVideoMethods inherited from interface com.storedobject.common.Executable
act, run
-
Constructor Details
-
CombinedPDFReport
Constructor.- Parameters:
device- Device on which the output will be rendered when viewing.
-
-
Method Details
-
addContent
Add content from a "content producer".- Parameters:
externalPDF- Another content producer. (If if the content-type is not PDF, it will be converted to PDF if possible).- Throws:
Exception- Raises if any error occurs.
-
addContent
public void addContent(ContentProducer externalPDF, int startingPage, int endingPage, int... pagesToSkip) throws Exception Add content from a "content producer".- Parameters:
externalPDF- Another content producer. (If if the content-type is not PDF, it will be converted to PDF if possible).startingPage- Starting page from which content will be added. (Page numbering starts from 1).endingPage- Ending page up to which content will be added (Passing -1 will add up to the last page).pagesToSkip- Pages to skip. These pages will not be added.- Throws:
Exception- Raises if any error occurs.
-
addContent
-
addContent
public void addContent(FileData externalPDF, int startingPage, int endingPage, int... pagesToSkip) throws Exception Add content from "file data".- Parameters:
externalPDF- Content from "file data". (If if the content-type is not PDF, it will be converted to PDF if possible).startingPage- Starting page from which content will be added. (Page numbering starts from 1).endingPage- Ending page up to which content will be added (Passing -1 will add up to the last page).pagesToSkip- Pages to skip. These pages will not be added.- Throws:
Exception- Raises if any error occurs.
-
addContent
Add content from an "input stream".- Parameters:
externalPDF- Content from a stream. (If if the content-type is not PDF, it will be converted to PDF if possible).- Throws:
Exception- Raises if any error occurs.
-
addContent
public void addContent(InputStream externalPDF, int startingPage, int endingPage, int... pagesToSkip) throws Exception Add content from an "input stream".- Parameters:
externalPDF- Content from a stream. (If if the content-type is not PDF, it will be converted to PDF if possible).startingPage- Starting page from which content will be added. (Page numbering starts from 1).endingPage- Ending page up to which content will be added (Passing -1 will add up to the last page).pagesToSkip- Pages to skip. These pages will not be added.- Throws:
Exception- Raises if any error occurs.
-
addContent
Add content from "stream data".- Parameters:
externalPDF- Stream-data content. (If if the content-type is not PDF, it will be converted to PDF if possible).- Throws:
Exception- Raises if any error occurs.
-
addContent
public void addContent(StreamData externalPDF, int startingPage, int endingPage, int... pagesToSkip) throws Exception Add content from "stream data".- Parameters:
externalPDF- Stream-data content. (If if the content-type is not PDF, it will be converted to PDF if possible).startingPage- Starting page from which content will be added. (Page numbering starts from 1).endingPage- Ending page up to which content will be added (Passing -1 will add up to the last page).pagesToSkip- Pages to skip. These pages will not be added.- Throws:
Exception- Raises if any error occurs.
-
setOrientation
public void setOrientation(int orientation) Set the orientation to be used when the next content is added.- Parameters:
orientation- Orientation value. (PDF.ORIENTATION_PORTRAITorPDF.ORIENTATION_LANDSCAPE).
-
getScalePercentage
public final int getScalePercentage()Get the current value of the scale percentage (SeesetScalePercentage(int)).- Returns:
- Current value of the scale percentage.
-
setScalePercentage
public final void setScalePercentage(int scalePercentage) Set the percentage scaling to be done when the next content is added.- Parameters:
scalePercentage- Percentage value (1 to 100).
-