Class PdfPipelineOutput
java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
com.northconcepts.datapipeline.foundations.core.FoundationObject
com.northconcepts.datapipeline.foundations.pipeline.PipelineObject
com.northconcepts.datapipeline.foundations.pipeline.PipelineOutput
com.northconcepts.datapipeline.foundations.pipeline.output.FileSinkPipelineOutput
com.northconcepts.datapipeline.pdf.output.PdfPipelineOutput
- All Implemented Interfaces:
DataExceptionContributor,JsonSerializable,RecordSerializable,XmlSerializable,DataWriterFactory,JavaCodeGenerator,Serializable
- See Also:
-
Field Summary
Fields inherited from class com.northconcepts.datapipeline.foundations.core.FoundationObject
internalId, internalName, log, TIMESTAMP_FORMATFields inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
SERIALIZED_CLASS_NAME, TYPEFields inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
XML_SERIALIZED_CLASS_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromRecord(Record source) Loads this instance's state from a record and returnsthis(for fluid API call chaining).fromXmlElement(Element pipelineOutputElement) voidAppends Java source code representing this object to the given builder.Returns the custom CSS style applied to the PDF document (defaultnull).getName()Returns a display name for this output, such as the destination's name followed by its format.Returns the page orientation for the PDF document (defaultPdfWriter.PageOrientation.PORTRAIT).Returns the page size for the PDF document (defaultPdfWriter.PageSize.LETTER).setCustomStyle(String customStyle) Specifies a custom CSS style to be applied to the PDF document (defaultnull).setFileSink(FileSink fileSink) setPageOrientation(PdfWriter.PageOrientation pageOrientation) Specifies the page orientation for the PDF document (defaultPdfWriter.PageOrientation.PORTRAIT).setPageSize(PdfWriter.IPageSize pageSize) Specifies the page size for the PDF document.setPageSize(String pageSize) Specifies the page size for the PDF document using a CSSpage/sizestring value.toRecord()Converts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.toXmlElement(Document document) Returns an element, created withdocument, describing this object; the default implementation throws aDataException.Methods inherited from class com.northconcepts.datapipeline.foundations.pipeline.output.FileSinkPipelineOutput
generateSaveCodeMethods inherited from class com.northconcepts.datapipeline.foundations.pipeline.PipelineOutput
getNestedPipelineOutput, getPipelineOutput, getRootPipelineOutputMethods inherited from class com.northconcepts.datapipeline.foundations.core.FoundationObject
addExceptionProperties, assertValid, assertValid, clone, exception, exception, exception, getInternalId, getInternalName, resetInternalIdMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.DataExceptionContributor
addExceptionProperties
-
Constructor Details
-
PdfPipelineOutput
public PdfPipelineOutput()
-
-
Method Details
-
getName
Description copied from class:PipelineOutputReturns a display name for this output, such as the destination's name followed by its format.- Overrides:
getNamein classFileSinkPipelineOutput
-
getFileSink
- Specified by:
getFileSinkin classFileSinkPipelineOutput
-
setFileSink
- Specified by:
setFileSinkin classFileSinkPipelineOutput
-
createDataWriter
-
getPageSize
Returns the page size for the PDF document (defaultPdfWriter.PageSize.LETTER). -
setPageSize
Specifies the page size for the PDF document. You can provide a predefined size using thePdfWriter.PageSizeenum (e.g.,PdfWriter.PageSize.A4,PdfWriter.PageSize.LETTER), or you can create a customPdfWriter.IPageSizeimplementation for any valid CSSpage/sizevalue, such as"10in 15in". The default page size isPdfWriter.PageSize.LETTER.- See Also:
-
setPageSize
Specifies the page size for the PDF document using a CSSpage/sizestring value.This method allows you to define a custom page size using any valid CSS
page/sizestring, such as10in 15in.The default page size is
letter.- See Also:
-
getPageOrientation
Returns the page orientation for the PDF document (defaultPdfWriter.PageOrientation.PORTRAIT). -
setPageOrientation
Specifies the page orientation for the PDF document (defaultPdfWriter.PageOrientation.PORTRAIT). -
getCustomStyle
Returns the custom CSS style applied to the PDF document (defaultnull). -
setCustomStyle
Specifies a custom CSS style to be applied to the PDF document (defaultnull).This style will be included in the generated PDF and can be used to customize the appearance of the content, such as table styles, fonts, colors, etc.
You can provide a styling for the following HTML table structure:<!DOCTYPE html> <html lang='en-US' dir='ltr'> <head> </head> <body> <table> <thead> <tr> <th class='col-0'>Field1</th> <th class='col-1'>Field2</th> </tr> </thead> <tbody> <tr> <td class='col-0'>Value1</td> <td class='col-1'>Value2</td> </tr> </tbody> </table> </body> </html> -
generateJavaCode
Description copied from interface:JavaCodeGeneratorAppends Java source code representing this object to the given builder. -
fromRecord
Description copied from interface:RecordSerializableLoads this instance's state from a record and returnsthis(for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.- Specified by:
fromRecordin interfaceRecordSerializable- Overrides:
fromRecordin classPipelineOutput- Parameters:
source-- Returns:
- this instance.
-
toRecord
Description copied from interface:RecordSerializableConverts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.- Specified by:
toRecordin interfaceRecordSerializable- Overrides:
toRecordin classBean
-
toXmlElement
Description copied from interface:XmlSerializableReturns an element, created withdocument, describing this object; the default implementation throws aDataException.- Specified by:
toXmlElementin interfaceXmlSerializable- Overrides:
toXmlElementin classPipelineOutput
-
fromXmlElement
-