Sign UpSign Up   Sign InSign In Welcome Guest,
Live Chat Live Chat

Header & footer page number

Last post 11-12-2008, 9:18 PM by forever. 5 replies.
Sort Posts: Previous Next
  •  08-22-2008, 2:43 AM 140877

    Header & footer page number

    Hi support,

    As far as I can see, the method setIsPageNumber of the HeaderFooter object does not have any effect on the output.

    Please confirm,
    Milan
     
  •  08-22-2008, 4:58 AM 140897 in reply to 140877

    Re: Header & footer page number

    Hello Milan,

    I have tested the issue, but I am unable to reproduce the problem. I have tested it using following code snippet.

    Pdf pdf = new Pdf();
    Section sec1 = pdf.getSections().add();
    Text text1 = new Text(sec1,"HeaderFooter example with page number info");
    HeaderFooter head = new HeaderFooter(sec1);
    sec1.getParagraphs().add(text1);

    sec1.setOddHeader(head);
    sec1.setOddFooter(head);
    head.setIsPageNumber(true);
    head.getParagraphs().add(text1);

    pdf.save(new FileOutputStream(new File("C:/Temp/PageBorders.pdf")));

    In case if does not resolve your issue, please share your code with us, so that we can test it at our end.


    Nayyer Shahbaz
    Support Developer, Aspose Sialkot Team
    About Us
    Contact Us

    Keep in touch! We're on Twitter and Facebook
     
  •  08-22-2008, 6:54 AM 140914 in reply to 140897

    Re: Header & footer page number

    Attachment: Present (inaccessible)

    Hi Nayyer,

    I've tested the code from you entry, and I've attached the output. There is no page number in the header or footer. I have the jar provided by support at 19.08.2008, when you added a fix for autofit table to window : http://www.aspose.com/community/forums/thread/140309/autofit-table-to-contents.aspx .

    I didn't modify the name of the file, it remained PageBorders.pdf, as you named it.

    Regards,
    Milan

     
  •  08-22-2008, 8:46 AM 140929 in reply to 140914

    Re: Header & footer page number

    Hello Milan,

    I have tested the issue and I’m able to reproduce the same problem, using the hotfix provided on 08-19-2008. In fact its a regression bug. Where as, setIsPageNumber is working fine in Aspose.Pdf for Java release of 06-24-2008.

    I have logged it in our issue tracking system as PDFJAVA-5804. We will investigate this issue in detail and will keep you updated on the status of a correction. We apologize for your inconvenience.


    Nayyer Shahbaz
    Support Developer, Aspose Sialkot Team
    About Us
    Contact Us

    Keep in touch! We're on Twitter and Facebook
     
  •  08-25-2008, 8:54 AM 141124 in reply to 140914

    Re: Header & footer page number

    Hello milan,

    We have rewritten the HeaderFooter class in the hotfix I provide you. In the new hotfix, set page number is much more convenient. You get what you want via the following code:

    HeaderFooter foot = new HeaderFooter(sec1);
    Text text = new Text(sec1, "page $p .");
    foot.getParagraphs().add(text);
    sec1.setOddFooter(foot);
    sec1.setEvenFooter(foot);

    To the symbol $p, you can refer to the document:
    http://www.aspose.com/documentation/file-format-components/aspose.pdf-for-.net-and-java/symbols-list-and-purpose.html. But at present, only "$p, #$NL, #$TAB" are supported at present.

    Thank you for using our product.



    Sandy.Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  11-12-2008, 9:18 PM 152309 in reply to 140877

    Updated component version is available

    The issues you have found earlier (filed as 5804) have been fixed in this update.


    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
View as RSS news feed in XML