Class PDFEmbedder


  • public class PDFEmbedder
    extends Embedder
    A class which may be used as a starting point for rendering "interactive" graphs (i.e those containing actions like hyperlinks) to PDF.
    • Constructor Detail

      • PDFEmbedder

        public PDFEmbedder()
        Create a new PDFEmbedder
    • Method Detail

      • setPDFFont

        public void setPDFFont​(String fontname,
                               PDFFont font)
        Map the specified fontname, which may appear in the XML, to the specified PDF font
      • getPDFFont

        public PDFFont getPDFFont​(String fontname)
        Return the PDF font that is mapped to the specified font name.
      • getCanvas

        public PDFCanvas getCanvas()
        Return the PDFCanvas that was generated by the XML. This object has no interactivity (it's not possible for PDFCanvas)
      • getPDF

        public PDF getPDF()
        Return a single page PDF that contains the Graph, as returned by getCanvas(). The page may also have annotations which will reflect any interactivity specified in the XML, for example it will have AnnotationLink objects for any "href" attributes.
      • parseHREF

        public PDFAction parseHREF​(String url)
        Return a PDFAction for the specified URL. By default this method returns PDFAction.goToURL(url), but this can be overridden to convert special URLs into a particular PDFAction