Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-810

Problem in extracting roman page numbers [PDPageLabels.java]

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.1
    • Component/s: PDModel
    • Labels:
      None

      Description

      Hi all ,

      • I am very long time user of PDFBOX from 0.7.3 version.
      • Current I am using the latest version(1.2.1).
      • While using i came across the problem while extracting PDFPageLabels for PDF with roman numbers .
      • For example if the label is "xi" PDFBOX output is "xxi" and it is correct for pagenumber less than ten.
      • I made a small correction in the code PDPageLabels.java and found that it seems to work fine .

      ORIGINAL CODE IN PDPageLabels.java

      private static final String[][] ROMANS = new String[][]
      {

      { "", "i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix" },
      { "x", "xx", "xxx", "xl", "l", "lx", "lxx", "lxxx", "xc" },
      { "c", "cc", "ccc", "cd", "d", "dc", "dcc", "dccc", "cm" }, };


      MODIFIED CODE IN PDPageLabels.java


      private static final String[][] ROMANS = new String[][]
      {
      { "", "i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix" }

      ,

      { "", "x", "xx", "xxx", "xl", "l", "lx", "lxx", "lxxx", "xc" }

      ,

      { "", "c", "cc", "ccc", "cd", "d", "dc", "dcc", "dccc", "cm" }

      , };

      *Please advice me whether the above change is correct and incorporate in my PDFBox.

      Thank You very much

      Regards

      Karthick . G

        Attachments

          Activity

            People

            • Assignee:
              jukkaz Jukka Zitting
              Reporter:
              javakarthick karthick
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: