Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-1100

iText, Bookmarks and Document Info

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 0.20.5
    • None
    • documentation
    • None
    • Operating System: other
      Platform: Other
    • 37589

    Description

      On the website, it is stated that iText swallows bookmarks. If you instead of
      using PDFWriter, uses PDFStamper then itext does not swallow bookmarks.

      The PDFInfo class mentioned her is the one enclosed in FOP, but with creatation
      date predefined and an number of other methods defined to set the different
      parameters.

      PDFInfo info = new PDFInfo();

      PdfReader reader = new PdfReader(fi);

      info.setTitle(title);
      info.setSubject("A subject");

      info.setCreator("A Creator " + ver);
      info.setAuthor("This Working Group");

      PdfStamper stamp = new PdfStamper(reader, new FileOutputStream(fo));
      stamp.setMoreInfo(info.toMap());

      stamp.close();

      BTW. How come you have not created a fop extension for the document properties.

      Eg.you should enable elements such as fox:author, fox:title etc.

      Attachments

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            js@nw3.dk Jens Stanstrup
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: