You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by karthick g <ik...@gmail.com> on 2010/09/01 14:06:15 UTC

Problem in extracting roman page numbers [PDPageLabels.java]

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

Re: Problem in extracting roman page numbers [PDPageLabels.java]

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Wed, Sep 1, 2010 at 2:06 PM, karthick g <ik...@gmail.com> wrote:
> *Please advice me whether the above change is correct and incorporate in my
> PDFBox.

Looks correct to me. Thanks for spotting the problem! Could you file a
bug report in the issue tracker [1] for this?

[1] https://issues.apache.org/jira/browse/PDFBOX

BR,

Jukka Zitting