Fop
  1. Fop
  2. FOP-1100

iText, Bookmarks and Document Info

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 0.20.5
    • Fix Version/s: None
    • Component/s: documentation
    • Labels:
      None
    • Environment:
      Operating System: other
      Platform: Other
    • External issue ID:
      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.

        Activity

        Hide
        Jeremias Maerki added a comment -

        (In reply to comment #0)
        > 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();

        Thanks for the info. I'll integrate it into the website.

        > 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.

        We could do a lot of things. But someone has to have the time and motivation to
        actually do it. You've got access to the source code. Patches are welcome!!!

        BTW, FOP Trunk/0.90alpha1 supports setting all the above through the
        FOUserAgent. Granted, it's not the same as setting these values through the FO
        input and we don't support XMP metadata, yet. But everyone is invited to help
        improve.

        Show
        Jeremias Maerki added a comment - (In reply to comment #0) > 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(); Thanks for the info. I'll integrate it into the website. > 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. We could do a lot of things. But someone has to have the time and motivation to actually do it. You've got access to the source code. Patches are welcome!!! BTW, FOP Trunk/0.90alpha1 supports setting all the above through the FOUserAgent. Granted, it's not the same as setting these values through the FO input and we don't support XMP metadata, yet. But everyone is invited to help improve.
        Hide
        Jeremias Maerki added a comment -

        I've added your tip to the website sources. Thanks!
        http://svn.apache.org/viewcvs?rev=348211&view=rev

        Show
        Jeremias Maerki added a comment - I've added your tip to the website sources. Thanks! http://svn.apache.org/viewcvs?rev=348211&view=rev
        Hide
        Glenn Adams added a comment -

        batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

        Show
        Glenn Adams added a comment - batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

          People

          • Assignee:
            fop-dev
            Reporter:
            Jens Stanstrup
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development