Package com.evopdf

Class PdfDocumentOptions

java.lang.Object
com.evopdf.PdfDocumentOptions

public class PdfDocumentOptions extends Object
This class encapsulates the options to control the PDF document rendering process. The HtmlToPdfConverter class define a reference to an object of this type.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addEndDocument(byte[] pdfData)
    Adds a PDF document from the given stream after the result of HTML to PDF conversion.
    void
    addEndDocument(byte[] pdfData, boolean enableHeaderAndFooter, boolean drawHeaderOnFirstPage, boolean drawFooterOnFirstPage)
    Adds a PDF document from the given stream after the result of HTML to PDF conversion
    void
    Adds a PDF document from the given file after the result of HTML to PDF conversion.The header and footer are not applied to the PDF documents added by this method.
    void
    addEndDocument(String pdfFile, boolean enableHeaderAndFooter, boolean drawHeaderOnFirstPage, boolean drawFooterOnFirstPage)
    Adds a PDF document from the given file after the result of HTML to PDF conversion
    void
    addStartDocument(byte[] pdfData)
    Adds a PDF document from the given stream before the result of HTML to PDF conversion.
    void
    addStartDocument(byte[] pdfData, boolean enableHeaderAndFooter, boolean drawHeaderOnFirstPage, boolean drawFooterOnFirstPage)
    Adds a PDF document from the given stream before the result of HTML to PDF conversion
    void
    Adds a PDF document from the given file before the result of HTML to PDF conversion.
    void
    addStartDocument(String pdfFile, boolean enableHeaderAndFooter, boolean drawHeaderOnFirstPage, boolean drawFooterOnFirstPage)
    Adds a PDF document from the given file before the result of HTML to PDF conversion
    boolean
    Gets the flag indicating if the HTML to PDF converter will automatically calculate the PDF page size such that all the HTML content will be visible in the resulted PDF document.
    Gets the CSS selectors of the HTML elements to not be broken between PDF pages if possible.
    boolean
    Gets the flag indicating if the HTML to PDF converter will try to avoid cutting off the images between PDF pages.
    boolean
    Gets the flag indicating if the HTML to PDF converter will try to avoid cutting off the text between PDF pages.
    Gets the PDF pages background color
    float
    Gets the rendered PDF document bottom margin in points.
    float
    Gets the space in points to introduce at the bottom of PDF pages where the HTML is rendered.
    Gets the color profile of the PDF document generated by the HTML to PDF converter.
    Gets the color space of the PDF document generated by the HTML to PDF converter.
    boolean
    Gets the flag indicating if the cross-reference table and the trailer of the PDF document generated by the HTML to PDF converter in compressed cross-reference streams to reduce the PDF file size.
    boolean
    Gets the flag indicating if the HTML to PDF converter will embed all the true type fonts in the PDF document generated by the HTML to PDF converter.
    boolean
    Gets the flag indicating the PDF graphics are rendered at the best quality in the PDF document generated by the HTML to PDF converter.
    boolean
    Gets the fag indicating if the HTML content will be resized if necessary to fit the available height in PDF page of the PDF document generated by the HTML to PDF converter.
    boolean
    Gets the fag indicating if the HTML content will be resized if necessary to fit the available width in PDF page of the PDF document generated by the HTML to PDF converter.
    float
    Gets the height in points of the destination rectangle in PDF page where the HTML content is rendered.
    boolean
    Gets the flag indicating if the images scaling is allowed in the PDF document generated by the HTML to PDF converter.
    boolean
    Gets the flag indicating if the interactive features are enabled for hidden HTML elements.
    boolean
    Gets the flag indicating if the HTML to PDF converter to convert the internal HTML links (links with anchors) to internal PDF links in the PDF document generated by the HTML to PDF converter.
    boolean
    Gets the flag indicating if the JPEG compression is enabled or not for the images in the PDF document created by the HTML to PDF converter.
    int
    Gets the compression level of images in the PDF document generated by the HTML to PDF converter as an integer value between 0 and 100.
    float
    Gets the rendered PDF document left margin in points.
    boolean
    Gets the flag indicating if the HTML to PDF converter will convert the external links from HTML to PDF links in the PDF document generated by the HTML to PDF converter.
    boolean
    Gets the flag indicating if the hidden elements are rendered in the PDF document generated by the HTML to PDF converter.
    Gets the CSS selectors of the HTML elements after which to force a page break in PDF document
    Gets the CSS selectors of the HTML elements before which to force a page break in PDF document
    Gets the compression level of the PDF document created by the HTML to PDF converter.
    Gets the page orientation of the pages of the PDF document generated by the HTML to PDF converter.
    Gets the page size of the PDF document generated by the HTML to PDF converter.
    Gets the PDF subset used by the PDF document generated by the HTML to PDF converter.
    float
    Gets the rendered PDF document right margin in points.
    void
    setAutoSizePdfPage(boolean autoSizePdfPage)
    Sets the flag indicating if the HTML to PDF converter will automatically calculate the PDF page size such that all the HTML content will be visible in the resulted PDF document.
    void
    Sets the CSS selectors of the HTML elements to not be broken between PDF pages if possible.
    void
    setAvoidImageBreak(boolean avoidImageBreak)
    Sets the flag indicating if the HTML to PDF converter will try to avoid cutting off the images between PDF pages.
    void
    setAvoidTextBreak(boolean avoidTextBreak)
    Sets the flag indicating if the HTML to PDF converter will try to avoid cutting off the text between PDF pages.
    void
    Sets the PDF pages background color
    void
    setBottomMargin(float bottomMargin)
    Sets the rendered PDF document bottom margin in points.
    void
    setBottomSpacing(float bottomSpacing)
    Sets the space in points to introduce at the bottom of PDF pages where the HTML is rendered.
    void
    Sets the color profile of the PDF document generated by the HTML to PDF converter.
    void
    Sets the color space of the PDF document generated by the HTML to PDF converter.
    void
    setCompressCrossReference(boolean compress)
    Sets the flag indicating if the cross-reference table and the trailer of the PDF document generated by the HTML to PDF converter in compressed cross-reference streams to reduce the PDF file size.
    void
    setEmbedFonts(boolean embedFonts)
    Sets the flag indicating if the HTML to PDF converter will embed all the true type fonts in the PDF document generated by the HTML to PDF converter.
    void
    setEnhancedGraphicsQuality(boolean enabled)
    Sets the flag indicating the PDF graphics are rendered at the best quality in the PDF document generated by the HTML to PDF converter.
    void
    setFitHeight(boolean fitHeight)
    Sets the fag indicating if the HTML content will be resized if necessary to fit the available height in PDF page of the PDF document generated by the HTML to PDF converter.
    void
    setFitWidth(boolean fitWidth)
    Sets the fag indicating if the HTML content will be resized if necessary to fit the available width in PDF page of the PDF document generated by the HTML to PDF converter.
    void
    setHeight(float height)
    Sets the height in points of the destination rectangle in PDF page where the HTML content is rendered.
    void
    setImagesScalingEnabled(boolean enabled)
    Sets flag indicating if the images scaling is allowed in the PDF document generated by the HTML to PDF converter.
    void
    Sets the flag indicating if the interactive features are enabled for hidden HTML elements.
    void
    setInternalLinksEnabled(boolean enabled)
    Sets the flag indicating if the HTML to PDF converter to convert the internal HTML links (links with anchors) to internal PDF links in the PDF document generated by the HTML to PDF converter.
    void
    setJpegCompressionEnabled(boolean enabled)
    Sets the flag indicating if the JPEG compression is enabled or not for the images in the PDF document created by the HTML to PDF converter.
    void
    Sets the compression level of images in the PDF document generated by the HTML to PDF converter as an integer value between 0 and 100.
    void
    setLeftMargin(float leftMargin)
    Sets the rendered PDF document left margin in points.
    void
    setLiveUrlsEnabled(boolean enabled)
    Sets the flag indicating if the HTML to PDF converter will convert the external links from HTML to PDF links in the PDF document generated by the HTML to PDF converter.
    void
    setNoSizeElementsEnabled(boolean enabled)
    Sets flag indicating if the hidden elements are rendered in the PDF document generated by the HTML to PDF converter.
    void
    Sets the CSS selectors of the HTML elements after which to force a page break in PDF document
    void
    Sets the CSS selectors of the HTML elements before which to force a page break in PDF document
    void
    Sets the compression level of the PDF document created by the HTML to PDF converter.
    void
    Sets the page orientation of the pages of the PDF document generated by the HTML to PDF converter.
    void
    Sets the page size of the PDF document generated by the HTML to PDF converter.
    void
    Sets the PDF subset used by the PDF document generated by the HTML to PDF converter.
    void
    setRightMargin(float rightMargin)
    Sets the rendered PDF document right margin in points.
    void
    setShowFooter(boolean showFooter)
    Sets the flag indicating if the footer is visible in the PDF document generated by the HTML to PDF converter.
    void
    setShowHeader(boolean showHeader)
    Sets the flag indicating if the header is visible in the PDF document generated by the HTML to PDF converter.
    void
    setSinglePage(boolean singlePage)
    Sets the flag indicating if the HTML to PDF converter will generate a single PDF page with a custom size calculated to display the whole HTML content and any specified header and footer.
    void
    setStackRepeatedTableFooters(boolean stackTableFooters)
    Gets or sets a flag indicating if the repeated HTML table footers are stacked at the bottom of the PDF page when multiple HTML tables have repeated footers on that PDF page.
    void
    setStackRepeatedTableHeaders(boolean stackTableHeaders)
    Sets the flag indicating if the repeated HTML table headers are stacked at the top of the PDF page when multiple HTML tables have repeated headers on that PDF page.
    void
    setStretchToFit(boolean stretchToFit)
    Sets the value of the flag indicating if the HTML content will be stretched if necessary to fit the available width in PDF page.
    void
    setTableFooterRepeatEnabled(boolean enabled)
    Sets the flag indicating if the repeating of the HTML table footer in PDF pages is enabled in the PDF document generated by the HTML to PDF converter.
    void
    setTableHeaderRepeatEnabled(boolean enabled)
    Sets the flag indicating if the repeating of the HTML table header in PDF pages is enabled in the PDF document generated by the HTML to PDF converter.
    void
    setTopMargin(float topMargin)
    Sets the rendered PDF document top margin in points.
    void
    setTopSpacing(float topSpacig)
    Sets the space in points to introduce at the top of PDF pages where the HTML is rendered.
    void
    setTransparencyEnabled(boolean enabled)
    Sets the flag indicating if the transparency is enabled in the PDF document generated by the HTML to PDF converter.
    void
    setTransparentImagesEnabled(boolean enabled)
    Sets flag indicating if the converter uses transparency information of the images in the PDF document generated by the HTML to PDF converter.
    void
    setWidth(float width)
    Sets the width in points of the destination rectangle in PDF page where the HTML content is rendered.
    void
    setX(float x)
    Sets the X coordinate in points where to start HTML rendering in first page.
    void
    setY(float y)
    Sets the Y coordinate in points where to start HTML rendering in first page.
    boolean
    Gets the flag indicating if the footer is visible in the PDF document generated by the HTML to PDF converter.
    boolean
    Gets the flag indicating if the header is visible in the PDF document generated by the HTML to PDF converter.
    boolean
    Gets the flag indicating if the HTML to PDF converter will generate a single PDF page with a custom size calculated to display the whole HTML content and any specified header and footer.
    boolean
    Gets the flag indicating if the repeated HTML table footers are stacked at the bottom of the PDF page when multiple HTML tables have repeated footers on that PDF page.
    boolean
    Gets the flag indicating if the repeated HTML table headers are stacked at the top of the PDF page when multiple HTML tables have repeated headers on that PDF page.
    boolean
    Gets the value of the flag indicating if the HTML content will be stretched if necessary to fit the available width in PDF page.
    boolean
    Gets the flag indicating if the repeating of the HTML table footer in PDF pages is enabled in the PDF document generated by the HTML to PDF converter.
    boolean
    Gets the flag indicating if the repeating of the HTML table header in PDF pages is enabled in the PDF document generated by the HTML to PDF converter.
    boolean
    Gets the flag indicating if rendering of HTML document is tiled in the PDF document generated by the HTML to PDF converter.
    void
    tiledRenderingEnabled(boolean enabled)
    Sets the flag indicating if rendering of HTML document is tiled in the PDF document generated by the HTML to PDF converter.
    float
    Gets the rendered PDF document top margin in points.
    float
    Gets the space in points to introduce at the top of PDF pages where the HTML is rendered.
    boolean
    Gets the flag indicating if the transparency is enabled in the PDF document generated by the HTML to PDF converter.
    boolean
    Gets the flag indicating if the converter uses transparency information of the images in the PDF document generated by the HTML to PDF converter.
    float
    Gets the width in points of the destination rectangle in PDF page where the HTML content is rendered.
    float
    x()
    Gets the X coordinate in points where to start HTML rendering in first page.
    float
    y()
    Gets the Y coordinate in points where to start HTML rendering in first page.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PdfDocumentOptions

      public PdfDocumentOptions()
  • Method Details

    • addStartDocument

      public void addStartDocument(String pdfFile, boolean enableHeaderAndFooter, boolean drawHeaderOnFirstPage, boolean drawFooterOnFirstPage) throws Exception
      Adds a PDF document from the given file before the result of HTML to PDF conversion
      Parameters:
      pdfFile - the full path of the PDF file to be inserted before conversion result
      enableHeaderAndFooter - a flag indicating if the header and footer can be applied to the added document. If this parameter is true then the interactive features like links and bookmarks are disabled in the added PDF document
      drawHeaderOnFirstPage - a flag indicating if the header is drawn on first page of the appended document
      drawFooterOnFirstPage - a flag indicating if the footer is drawn in first page of the appended document
      Throws:
      Exception - throws an exception if the PDF file cannot be opened
    • addStartDocument

      public void addStartDocument(byte[] pdfData, boolean enableHeaderAndFooter, boolean drawHeaderOnFirstPage, boolean drawFooterOnFirstPage)
      Adds a PDF document from the given stream before the result of HTML to PDF conversion
      Parameters:
      pdfData - the binary data of the PDF document to be inserted before conversion result
      enableHeaderAndFooter - a flag indicating if the header and footer can be applied to the added document. If this parameter is true then the interactive features like links and bookmarks are disabled in the added PDF document
      drawHeaderOnFirstPage - a flag indicating if the header is drawn on first page of the appended document
      drawFooterOnFirstPage - a flag indicating if the footer is drawn in first page of the appended document
    • addEndDocument

      public void addEndDocument(String pdfFile, boolean enableHeaderAndFooter, boolean drawHeaderOnFirstPage, boolean drawFooterOnFirstPage) throws Exception
      Adds a PDF document from the given file after the result of HTML to PDF conversion
      Parameters:
      pdfFile - the full path of the PDF file to be inserted after conversion result
      enableHeaderAndFooter - a flag indicating if the header and footer can be applied to the added document. If this parameter is true then the interactive features like links and bookmarks are disabled in the added PDF document
      drawHeaderOnFirstPage - a flag indicating if the header is drawn on first page of the appended document
      drawFooterOnFirstPage - a flag indicating if the footer is drawn in first page of the appended document
      Throws:
      Exception - throws an exception if the PDF file cannot be opened
    • addEndDocument

      public void addEndDocument(byte[] pdfData, boolean enableHeaderAndFooter, boolean drawHeaderOnFirstPage, boolean drawFooterOnFirstPage)
      Adds a PDF document from the given stream after the result of HTML to PDF conversion
      Parameters:
      pdfData - the binary data of the PDF document to be inserted before conversion result
      enableHeaderAndFooter - a flag indicating if the header and footer can be applied to the added document. If this parameter is true then the interactive features like links and bookmarks are disabled in the added PDF document
      drawHeaderOnFirstPage - a flag indicating if the header is drawn on first page of the appended document
      drawFooterOnFirstPage - a flag indicating if the footer is drawn in first page of the appended document
    • addStartDocument

      public void addStartDocument(String pdfFile) throws Exception
      Adds a PDF document from the given file before the result of HTML to PDF conversion. The header and footer are not applied to the PDF documents added by this method. If you want to enable the header and footer in the added PDF document use the addStartDocument(String, boolean, boolean, boolean)
      Parameters:
      pdfFile - the full path of the PDF file to be inserted before conversion result
      Throws:
      Exception - throws an exception if the PDF file cannot be opened
    • addStartDocument

      public void addStartDocument(byte[] pdfData)
      Adds a PDF document from the given stream before the result of HTML to PDF conversion. The header and footer are not applied to the PDF documents added by this method. If you want to enable the header and footer in the added PDF document use the addStartDocument(byte[], boolean, boolean, boolean)
      Parameters:
      pdfData - the binary data of the PDF document to be inserted before conversion result
    • addEndDocument

      public void addEndDocument(String pdfFile) throws Exception
      Adds a PDF document from the given file after the result of HTML to PDF conversion.The header and footer are not applied to the PDF documents added by this method. If you want to enable the header and footer in the added PDF document use the addEndDocument(String, boolean, boolean, boolean)
      Parameters:
      pdfFile - the full path of the PDF file to be inserted after conversion result
      Throws:
      Exception - throws an exception if the PDF file cannot be opened
    • addEndDocument

      public void addEndDocument(byte[] pdfData)
      Adds a PDF document from the given stream after the result of HTML to PDF conversion. The header and footer are not applied to the PDF documents added by this method. If you want to enable the header and footer in the added PDF document use the addEndDocument(byte[], boolean, boolean, boolean)
      Parameters:
      pdfData - the binary data of the PDF document to be inserted before conversion result
    • leftMargin

      public float leftMargin()
      Gets the rendered PDF document left margin in points. 1 point is 1/72 inch.
      Returns:
      the PDF document left margin in points
    • setLeftMargin

      public void setLeftMargin(float leftMargin)
      Sets the rendered PDF document left margin in points. 1 point is 1/72 inch. By default the left margin is 0.
      Parameters:
      leftMargin - the PDF document left margin in points
    • rightMargin

      public float rightMargin()
      Gets the rendered PDF document right margin in points. 1 point is 1/72 inch.
      Returns:
      the PDF document right margin in points
    • setRightMargin

      public void setRightMargin(float rightMargin)
      Sets the rendered PDF document right margin in points. 1 point is 1/72 inch. By default the right margin is 0.
      Parameters:
      rightMargin - the PDF document right margin in points
    • topMargin

      public float topMargin()
      Gets the rendered PDF document top margin in points. 1 point is 1/72 inch.
      Returns:
      the PDF document top margin in points
    • setTopMargin

      public void setTopMargin(float topMargin)
      Sets the rendered PDF document top margin in points. 1 point is 1/72 inch. By default the top margin is 0.
      Parameters:
      topMargin - the PDF document top margin in points
    • bottomMargin

      public float bottomMargin()
      Gets the rendered PDF document bottom margin in points. 1 point is 1/72 inch.
      Returns:
      the PDF document bottom margin in points
    • setBottomMargin

      public void setBottomMargin(float bottomMargin)
      Sets the rendered PDF document bottom margin in points. 1 point is 1/72 inch. By default the bottom margin is 0.
      Parameters:
      bottomMargin - the PDF document bottom margin in points
    • x

      public float x()
      Gets the X coordinate in points where to start HTML rendering in first page.
      Returns:
      the X coordinate
    • setX

      public void setX(float x)
      Sets the X coordinate in points where to start HTML rendering in first page. By default the left location is 0.
      Parameters:
      x - the X coordinate
    • y

      public float y()
      Gets the Y coordinate in points where to start HTML rendering in first page. By default the top location is 0.
      Returns:
      the Y coordinate
    • setY

      public void setY(float y)
      Sets the Y coordinate in points where to start HTML rendering in first page. By default the top location is 0.
      Parameters:
      y - the Y coordinate
    • width

      public float width()
      Gets the width in points of the destination rectangle in PDF page where the HTML content is rendered.
      Returns:
      the width in points of the destination rectangle
    • setWidth

      public void setWidth(float width)
      Sets the width in points of the destination rectangle in PDF page where the HTML content is rendered. By default the destination width is the available width in PDF page
      Parameters:
      width - the width in points of the destination rectangle
    • height

      public float height()
      Gets the height in points of the destination rectangle in PDF page where the HTML content is rendered.
      Returns:
      the height in points of the destination rectangle
    • setHeight

      public void setHeight(float height)
      Sets the height in points of the destination rectangle in PDF page where the HTML content is rendered. By default the destination height is automatically calculated to render the whole HTML content
      Parameters:
      height - the height in points of the destination rectangle
    • topSpacing

      public float topSpacing()
      Gets the space in points to introduce at the top of PDF pages where the HTML is rendered. 1 point is 1/72 inch.
      Returns:
      the space in points to introduce at the top of PDF pages
    • setTopSpacing

      public void setTopSpacing(float topSpacig)
      Sets the space in points to introduce at the top of PDF pages where the HTML is rendered. 1 point is 1/72 inch. By default the top spacing is 0.
      Parameters:
      topSpacig - the space in points to introduce at the top of PDF pages
    • bottomSpacing

      public float bottomSpacing()
      Gets the space in points to introduce at the bottom of PDF pages where the HTML is rendered. 1 point is 1/72 inch. By default the bottom spacing is 0.
      Returns:
      the space in points to introduce at the bottom of PDF pages
    • setBottomSpacing

      public void setBottomSpacing(float bottomSpacing)
      Sets the space in points to introduce at the bottom of PDF pages where the HTML is rendered. 1 point is 1/72 inch. By default the bottom spacing is 0.
      Parameters:
      bottomSpacing - the space in points to introduce at the bottom of PDF pages
    • backColor

      public RgbColor backColor()
      Gets the PDF pages background color
      Returns:
      the PDF pages background color
    • setBackColor

      public void setBackColor(RgbColor backColor)
      Sets the PDF pages background color
      Parameters:
      backColor - the PDF pages background color
    • pdfCompressionLevel

      public PdfCompressionLevel pdfCompressionLevel()
      Gets the compression level of the PDF document created by the HTML to PDF converter.
      Returns:
      the compression level of the PDF document
    • setPdfCompressionLevel

      public void setPdfCompressionLevel(PdfCompressionLevel compressionLevel)
      Sets the compression level of the PDF document created by the HTML to PDF converter.
      Parameters:
      compressionLevel - the compression level of the PDF document
    • jpegCompressionEnabled

      public boolean jpegCompressionEnabled()
      Gets the flag indicating if the JPEG compression is enabled or not for the images in the PDF document created by the HTML to PDF converter.
      Returns:
      the flag indicating if the JPEG compression is enabled or not
    • setJpegCompressionEnabled

      public void setJpegCompressionEnabled(boolean enabled)
      Sets the flag indicating if the JPEG compression is enabled or not for the images in the PDF document created by the HTML to PDF converter. By default the JPEG compression is enabled to reduce the size of the generated PDF. When the JPEG compression is enabled the quality of the images in the generated PDF is lower than the quality of the original images in the HTML document, function of the jpegCompressionLevel() parameter. When the jpegCompressionLevel() is increased, the quality of the images in PDF decreases.
      Parameters:
      enabled - the flag value to set
    • jpegCompressionLevel

      public int jpegCompressionLevel()
      Gets the compression level of images in the PDF document generated by the HTML to PDF converter as an integer value between 0 and 100.
      Returns:
      the compression level of images in the generated PDF document
    • setJpegCompressionLevel

      public void setJpegCompressionLevel(int level)
      Sets the compression level of images in the PDF document generated by the HTML to PDF converter as an integer value between 0 and 100. This property has effect only when the jpegCompressionEnabled() is true. When the jpegCompressionLevel() is 0, the compression rate is the lowest and the quality of the images is the best. When the jpegCompressionLevel() is 100, the compression rate is the highest and quality of the images in PDF is the worst. The default JPEG compression level is 10, which should offer a good balance between the compression rate and the quality of the images in PDF.
      Parameters:
      level - the compression level of images
    • compressCrossReference

      public boolean compressCrossReference()
      Gets the flag indicating if the cross-reference table and the trailer of the PDF document generated by the HTML to PDF converter in compressed cross-reference streams to reduce the PDF file size.
      Returns:
      the flag value
    • setCompressCrossReference

      public void setCompressCrossReference(boolean compress)
      Sets the flag indicating if the cross-reference table and the trailer of the PDF document generated by the HTML to PDF converter in compressed cross-reference streams to reduce the PDF file size. The default value is false
      Parameters:
      compress - the flag value to set
    • pdfPageSize

      public PdfPageSize pdfPageSize()
      Gets the page size of the PDF document generated by the HTML to PDF converter.
      Returns:
      the PDF page size
    • setPdfPageSize

      public void setPdfPageSize(PdfPageSize size)
      Sets the page size of the PDF document generated by the HTML to PDF converter. The default size of the PDF document page is A4.
      Parameters:
      size - the PDF page size
    • pdfStandardSubset

      public PdfStandardSubset pdfStandardSubset()
      Gets the PDF subset used by the PDF document generated by the HTML to PDF converter.
      Returns:
      the PDF subset used by the generated PDF document
    • setPdfStandardSubset

      public void setPdfStandardSubset(PdfStandardSubset subset)
      Sets the PDF subset used by the PDF document generated by the HTML to PDF converter. The default value is Full. This property can be used to instruct the converter to generate PDF/A or PDF/X compliant documents.
      Parameters:
      subset - the PDF subset to be used by the generated PDF document
    • colorSpace

      public ColorSpace colorSpace()
      Gets the color space of the PDF document generated by the HTML to PDF converter.
      Returns:
      the color space of the generated PDF document
    • setColorSpace

      public void setColorSpace(ColorSpace colorSpace)
      Sets the color space of the PDF document generated by the HTML to PDF converter. The possible values are RGB, CMYK or Gray Scale. The default color space is RGB.
      Parameters:
      colorSpace - the color space of the generated PDF document
    • colorProfile

      public ColorProfile colorProfile()
      Gets the color profile of the PDF document generated by the HTML to PDF converter.
      Returns:
      the color profile of the generated PDF document
    • setColorProfile

      public void setColorProfile(ColorProfile colorProfile)
      Sets the color profile of the PDF document generated by the HTML to PDF converter.
      Parameters:
      colorProfile - the color profile to set
    • fitWidth

      public boolean fitWidth()
      Gets the fag indicating if the HTML content will be resized if necessary to fit the available width in PDF page of the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • setFitWidth

      public void setFitWidth(boolean fitWidth)
      Sets the fag indicating if the HTML content will be resized if necessary to fit the available width in PDF page of the PDF document generated by the HTML to PDF converter. By default this property is true and the content will be resized if necessary to fit the available width in PDF page. When this property is false the HTML content is not resized (is rendered at the real size) and therefore it could be cut off at the right size if the PDF page is not enough wide to display the whole HTML content. In this case the autoSizePdfPage() property can be set on true to automatically resize the PDF page width to display the whole content.
      Parameters:
      fitWidth - the flag value to set
    • fitHeight

      public boolean fitHeight()
      Gets the fag indicating if the HTML content will be resized if necessary to fit the available height in PDF page of the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • setFitHeight

      public void setFitHeight(boolean fitHeight)
      Sets the fag indicating if the HTML content will be resized if necessary to fit the available height in PDF page of the PDF document generated by the HTML to PDF converter. By default this property is false.
      Parameters:
      fitHeight - the flag value to set
    • stretchToFit

      public boolean stretchToFit()
      Gets the value of the flag indicating if the HTML content will be stretched if necessary to fit the available width in PDF page.
      Returns:
      the flag value
    • setStretchToFit

      public void setStretchToFit(boolean stretchToFit)
      Sets the value of the flag indicating if the HTML content will be stretched if necessary to fit the available width in PDF page. This property has effect in HTML to PDF converter only when fitWidth() property is true. When fitWidth() is true and this property is true the HTML content will be stretched if necessary to fit the available width in PDF page. By default this property is false and the content will not be stretched to fit the available width in PDF page.
      Parameters:
      stretchToFit - the flag value to set
    • singlePage

      public boolean singlePage()
      Gets the flag indicating if the HTML to PDF converter will generate a single PDF page with a custom size calculated to display the whole HTML content and any specified header and footer.
      Returns:
      the flag value
    • setSinglePage

      public void setSinglePage(boolean singlePage)
      Sets the flag indicating if the HTML to PDF converter will generate a single PDF page with a custom size calculated to display the whole HTML content and any specified header and footer. If the fitWidth() property is true the specified PDF page width will be preserved, otherwise the PDF page width is automatically calculated by the converter to display the whole HTML content at real size.
      Parameters:
      singlePage - the flag value to set
    • autoSizePdfPage

      public boolean autoSizePdfPage()
      Gets the flag indicating if the HTML to PDF converter will automatically calculate the PDF page size such that all the HTML content will be visible in the resulted PDF document.
      Returns:
      the flag value
    • setAutoSizePdfPage

      public void setAutoSizePdfPage(boolean autoSizePdfPage)
      Sets the flag indicating if the HTML to PDF converter will automatically calculate the PDF page size such that all the HTML content will be visible in the resulted PDF document. This property has effect only when the fitWidth() and fitHeight() properties are false. When the FitWidth property is false (the HTML content is rendered at real size) and the autoSizePdfPage() is false the rendered HTML content could be cut off at the right of the generated PDF document if the PDF page is not wide enough to display the whole content. This property is true by default
      Parameters:
      autoSizePdfPage - the flag value to set
    • avoidTextBreak

      public boolean avoidTextBreak()
      Gets the flag indicating if the HTML to PDF converter will try to avoid cutting off the text between PDF pages.
      Returns:
      the flag value
    • setAvoidTextBreak

      public void setAvoidTextBreak(boolean avoidTextBreak)
      Sets the flag indicating if the HTML to PDF converter will try to avoid cutting off the text between PDF pages. By default this property is true.
      Parameters:
      avoidTextBreak - the flag value to set
    • avoidImageBreak

      public boolean avoidImageBreak()
      Gets the flag indicating if the HTML to PDF converter will try to avoid cutting off the images between PDF pages.
      Returns:
      the flag value
    • setAvoidImageBreak

      public void setAvoidImageBreak(boolean avoidImageBreak)
      Sets the flag indicating if the HTML to PDF converter will try to avoid cutting off the images between PDF pages.
      Parameters:
      avoidImageBreak - the flag value
    • avoidHtmlElementsBreakSelectors

      public String[] avoidHtmlElementsBreakSelectors()
      Gets the CSS selectors of the HTML elements to not be broken between PDF pages if possible.
      Returns:
      the CSS selectors
    • setAvoidHtmlElementsBreakSelectors

      public void setAvoidHtmlElementsBreakSelectors(String[] selectors)
      Sets the CSS selectors of the HTML elements to not be broken between PDF pages if possible.
      Parameters:
      selectors - the CSS selectors to set
    • pageBreakBeforeHtmlElementsSelectors

      public String[] pageBreakBeforeHtmlElementsSelectors()
      Gets the CSS selectors of the HTML elements before which to force a page break in PDF document
      Returns:
      the CSS selectors
    • setPageBreakBeforeHtmlElementsSelectors

      public void setPageBreakBeforeHtmlElementsSelectors(String[] selectors)
      Sets the CSS selectors of the HTML elements before which to force a page break in PDF document
      Parameters:
      selectors - the CSS selectors to set
    • pageBreakAfterHtmlElementsSelectors

      public String[] pageBreakAfterHtmlElementsSelectors()
      Gets the CSS selectors of the HTML elements after which to force a page break in PDF document
      Returns:
      the CSS selectors
    • setPageBreakAfterHtmlElementsSelectors

      public void setPageBreakAfterHtmlElementsSelectors(String[] selectors)
      Sets the CSS selectors of the HTML elements after which to force a page break in PDF document
      Parameters:
      selectors - the CSS selectors to set
    • pdfPageOrientation

      public PdfPageOrientation pdfPageOrientation()
      Gets the page orientation of the pages of the PDF document generated by the HTML to PDF converter.
      Returns:
      the PDF pages orientation
    • setPdfPageOrientation

      public void setPdfPageOrientation(PdfPageOrientation orientation)
      Sets the page orientation of the pages of the PDF document generated by the HTML to PDF converter. The default orientation is PdfPageOrientation.Portrait.
      Parameters:
      orientation - the PDF pages orientation to set
    • showHeader

      public boolean showHeader()
      Gets the flag indicating if the header is visible in the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • setShowHeader

      public void setShowHeader(boolean showHeader)
      Sets the flag indicating if the header is visible in the PDF document generated by the HTML to PDF converter. The header properties can be further customized by setting the properties of the PdfHeaderOptions object exposed by the HtmlToPdfConverter class through HtmlToPdfConverter.pdfHeaderOptions() property. The default value of this property is false.
      Parameters:
      showHeader - the flag value to set
    • showFooter

      public boolean showFooter()
      Gets the flag indicating if the footer is visible in the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • setShowFooter

      public void setShowFooter(boolean showFooter)
      Sets the flag indicating if the footer is visible in the PDF document generated by the HTML to PDF converter. The footer properties can be further customized by setting the properties of the PdfFooterOptions object exposed by the HtmlToPdfConverter class through HtmlToPdfConverter.pdfFooterOptions() property. The default value of this property is false.
      Parameters:
      showFooter - the flag value to set
    • embedFonts

      public boolean embedFonts()
      Gets the flag indicating if the HTML to PDF converter will embed all the true type fonts in the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • setEmbedFonts

      public void setEmbedFonts(boolean embedFonts)
      Sets the flag indicating if the HTML to PDF converter will embed all the true type fonts in the PDF document generated by the HTML to PDF converter. The default value of this property is true.
      Parameters:
      embedFonts - the flag value to set
    • liveUrlsEnabled

      public boolean liveUrlsEnabled()
      Gets the flag indicating if the HTML to PDF converter will convert the external links from HTML to PDF links in the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • setLiveUrlsEnabled

      public void setLiveUrlsEnabled(boolean enabled)
      Sets the flag indicating if the HTML to PDF converter will convert the external links from HTML to PDF links in the PDF document generated by the HTML to PDF converter. The default value is true.
      Parameters:
      enabled - the flag value to set
    • interactiveHiddenElements

      public boolean interactiveHiddenElements()
      Gets the flag indicating if the interactive features are enabled for hidden HTML elements.
      Returns:
      the flag value
    • setInteractiveHiddenElements

      public void setInteractiveHiddenElements(boolean enabled)
      Sets the flag indicating if the interactive features are enabled for hidden HTML elements. This property is false by default.
      Parameters:
      enabled - the flag value to set
    • internalLinksEnabled

      public boolean internalLinksEnabled()
      Gets the flag indicating if the HTML to PDF converter to convert the internal HTML links (links with anchors) to internal PDF links in the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • setInternalLinksEnabled

      public void setInternalLinksEnabled(boolean enabled)
      Sets the flag indicating if the HTML to PDF converter to convert the internal HTML links (links with anchors) to internal PDF links in the PDF document generated by the HTML to PDF converter. The default value is true.
      Parameters:
      enabled - the flag value to set
    • tiledRenderingEnabled

      public boolean tiledRenderingEnabled()
      Gets the flag indicating if rendering of HTML document is tiled in the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • tiledRenderingEnabled

      public void tiledRenderingEnabled(boolean enabled)
      Sets the flag indicating if rendering of HTML document is tiled in the PDF document generated by the HTML to PDF converter. This property is true by default
      Parameters:
      enabled - the flag value to set
    • enhancedGraphicsQuality

      public boolean enhancedGraphicsQuality()
      Gets the flag indicating the PDF graphics are rendered at the best quality in the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • setEnhancedGraphicsQuality

      public void setEnhancedGraphicsQuality(boolean enabled)
      Sets the flag indicating the PDF graphics are rendered at the best quality in the PDF document generated by the HTML to PDF converter. The default property value is true.
      Parameters:
      enabled - the flag value to set
    • transparentImagesEnabled

      public boolean transparentImagesEnabled()
      Gets the flag indicating if the converter uses transparency information of the images in the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • setTransparentImagesEnabled

      public void setTransparentImagesEnabled(boolean enabled)
      Sets flag indicating if the converter uses transparency information of the images in the PDF document generated by the HTML to PDF converter. The default property value is true
      Parameters:
      enabled - the flag value to set
    • imagesScalingEnabled

      public boolean imagesScalingEnabled()
      Gets the flag indicating if the images scaling is allowed in the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • setImagesScalingEnabled

      public void setImagesScalingEnabled(boolean enabled)
      Sets flag indicating if the images scaling is allowed in the PDF document generated by the HTML to PDF converter. The default property value is false
      Parameters:
      enabled - the flag value to set
    • noSizeElementsEnabled

      public boolean noSizeElementsEnabled()
      Gets the flag indicating if the hidden elements are rendered in the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • setNoSizeElementsEnabled

      public void setNoSizeElementsEnabled(boolean enabled)
      Sets flag indicating if the hidden elements are rendered in the PDF document generated by the HTML to PDF converter. The default property value is false
      Parameters:
      enabled - the flag value to set
    • transparencyEnabled

      public boolean transparencyEnabled()
      Gets the flag indicating if the transparency is enabled in the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • setTransparencyEnabled

      public void setTransparencyEnabled(boolean enabled)
      Sets the flag indicating if the transparency is enabled in the PDF document generated by the HTML to PDF converter. Default value is true. This property can be set to false to eliminate the additional flattening time when the document is sent to the printer from Adobe Reader viewer.
      Parameters:
      enabled - the flag value to set
    • tableHeaderRepeatEnabled

      public boolean tableHeaderRepeatEnabled()
      Gets the flag indicating if the repeating of the HTML table header in PDF pages is enabled in the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • setTableHeaderRepeatEnabled

      public void setTableHeaderRepeatEnabled(boolean enabled)
      Sets the flag indicating if the repeating of the HTML table header in PDF pages is enabled in the PDF document generated by the HTML to PDF converter. Default value is true
      Parameters:
      enabled - the flag value to set
    • tableFooterRepeatEnabled

      public boolean tableFooterRepeatEnabled()
      Gets the flag indicating if the repeating of the HTML table footer in PDF pages is enabled in the PDF document generated by the HTML to PDF converter.
      Returns:
      the flag value
    • setTableFooterRepeatEnabled

      public void setTableFooterRepeatEnabled(boolean enabled)
      Sets the flag indicating if the repeating of the HTML table footer in PDF pages is enabled in the PDF document generated by the HTML to PDF converter. Default value is true.
      Parameters:
      enabled - the flag value to set
    • stackRepeatedTableHeaders

      public boolean stackRepeatedTableHeaders()
      Gets the flag indicating if the repeated HTML table headers are stacked at the top of the PDF page when multiple HTML tables have repeated headers on that PDF page.
      Returns:
      the flag value
    • setStackRepeatedTableHeaders

      public void setStackRepeatedTableHeaders(boolean stackTableHeaders)
      Sets the flag indicating if the repeated HTML table headers are stacked at the top of the PDF page when multiple HTML tables have repeated headers on that PDF page. Default value is true.
      Parameters:
      stackTableHeaders - the flag value to set
    • stackRepeatedTableFooters

      public boolean stackRepeatedTableFooters()
      Gets the flag indicating if the repeated HTML table footers are stacked at the bottom of the PDF page when multiple HTML tables have repeated footers on that PDF page.
      Returns:
      the flag value
    • setStackRepeatedTableFooters

      public void setStackRepeatedTableFooters(boolean stackTableFooters)
      Gets or sets a flag indicating if the repeated HTML table footers are stacked at the bottom of the PDF page when multiple HTML tables have repeated footers on that PDF page. Default value is true.
      Parameters:
      stackTableFooters - the flag value to set