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

Reply via email to