Class PdfUADocument

  • All Implemented Interfaces:
    IEventDispatcher, java.io.Closeable, java.lang.AutoCloseable

    public class PdfUADocument
    extends PdfDocument
    Creates a Pdf/UA document. This class is an extension of PdfDocument and adds the necessary configuration for PDF/UA conformance. It will add necessary validation to guide the user to create a PDF/UA compliant document.
    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • warnedOnPageFlush

        private boolean warnedOnPageFlush
    • Constructor Detail

      • PdfUADocument

        public PdfUADocument​(PdfWriter writer,
                             PdfUAConfig config)
        Creates a PdfUADocument instance.
        Parameters:
        writer - The writer to write the PDF document.
        config - The configuration for the PDF/UA document.
      • PdfUADocument

        public PdfUADocument​(PdfWriter writer,
                             DocumentProperties properties,
                             PdfUAConfig config)
        Creates a PdfUADocument instance.
        Parameters:
        writer - The writer to write the PDF document.
        properties - The properties for the PDF document.
        config - The configuration for the PDF/UA document.
      • PdfUADocument

        public PdfUADocument​(PdfReader reader,
                             PdfWriter writer,
                             PdfUAConfig config)
        Creates a PdfUADocument instance.
        Parameters:
        reader - The reader to read the PDF document.
        writer - The writer to write the PDF document.
        config - The configuration for the PDF/UA document.
      • PdfUADocument

        public PdfUADocument​(PdfReader reader,
                             PdfWriter writer,
                             StampingProperties properties,
                             PdfUAConfig config)
        Creates a PdfUADocument instance.
        Parameters:
        reader - The reader to read the PDF document.
        writer - The writer to write the PDF document.
        properties - The properties for the PDF document.
        config - The configuration for the PDF/UA document.
    • Method Detail

      • isClosing

        boolean isClosing()
        Returns if the document is in the closing state.
        Returns:
        true if the document is closing, false otherwise.
      • warnOnPageFlush

        void warnOnPageFlush()
        Warns the user that the page is being flushed. Will only warn once.
      • disablePageFlushingWarning

        public void disablePageFlushingWarning()
        Disables the warning for page flushing.
      • setupUAConfiguration

        private void setupUAConfiguration​(PdfUAConfig config)
      • configureWriterProperties

        private static PdfWriter configureWriterProperties​(PdfWriter writer)