Quantcast
Viewing all articles
Browse latest Browse all 3131

Page numbers are not showing in footer - PDF

Hi,

Issue here is:
When I convert document from HTML to PDF (using download option), page numbers are not showing.

I don't create page numbers in footer, just converting from HTML to PDF.

Html for footer is:
<div style="-aw-headerfooter-type:footer-primary"> 
 <div style="-aw-sdt-tag:''"> 
  <p style="margin-top:0pt; margin-bottom:0pt; text-align:right; font-size:11pt"><span style="-aw-field-start:true"></span><span style="-aw-field-code:' PAGE   \\* MERGEFORMAT '"></span><span style="-aw-field-separator:true"></span><span style="font-family:Calibri">1</span><span style="-aw-field-end:true"></span></p> 
 </div> 
 <p style="margin-top:0pt; margin-bottom:0pt; font-size:11pt"><span style="font-family:Calibri">&nbsp;</span></p> 
</div>

Code for converting HTML to PDF:
input = new ByteArrayInputStream(documentDomain.getHtmlContent().getBytes("UTF-8"));
com.aspose.pdf.Document doc = new com.aspose.pdf.Document(input);
out = new ByteArrayOutputStream();
doc.save(out, com.aspose.words.SaveFormat.PDF);

If I create page numbers everything works fine, but I don't want to create page numbers in footer if it already exists.

Do you know what is a problem here?

This is working for Word but for PDF not.
I attached both Word and PDF.

Regards

Viewing all articles
Browse latest Browse all 3131

Trending Articles