Hi,
I am using the following code to add the page footer.
TextFragment textFragment = new TextFragment("Testing Footer Page Number 1");
textFragment.getTextState().setFont(new com.aspose.pdf.FontRepository().findFont("Helvetica"));
textFragment.getTextState().setFontSize(8f);
com.aspose.pdf.HeaderFooter footer= new com.aspose.pdf.HeaderFooter();
MarginInfo marginInfo = new MarginInfo();
marginInfo.setBottom(20.00);
footer.setMargin(marginInfo);
Paragraphs paragraphs = new Paragraphs();
paragraphs.add(textFragment);
footer.setParagraphs(paragraphs);
pdfDocument.getPages().get_Item(1).setFooter(header);
The above code does not place a footer on the page, but if I comment the Margin Info it works fine. Is there an issue with using Margin Info. I want the footer to be placed at a particular location from the bottom.
Regards,
Rajeev Mathur
I am using the following code to add the page footer.
TextFragment textFragment = new TextFragment("Testing Footer Page Number 1");
textFragment.getTextState().setFont(new com.aspose.pdf.FontRepository().findFont("Helvetica"));
textFragment.getTextState().setFontSize(8f);
com.aspose.pdf.HeaderFooter footer= new com.aspose.pdf.HeaderFooter();
MarginInfo marginInfo = new MarginInfo();
marginInfo.setBottom(20.00);
footer.setMargin(marginInfo);
Paragraphs paragraphs = new Paragraphs();
paragraphs.add(textFragment);
footer.setParagraphs(paragraphs);
pdfDocument.getPages().get_Item(1).setFooter(header);
The above code does not place a footer on the page, but if I comment the Margin Info it works fine. Is there an issue with using Margin Info. I want the footer to be placed at a particular location from the bottom.
Regards,
Rajeev Mathur