Hi,
I am using Aspose latest version for document conversion. I have attached the document with this post. After conversion i cant able to see the top margin for the header. Is there any Api available ?
Thanks,
Anbu
Hi,
Hi Anbu,
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Section currentSection = builder.getCurrentSection();
PageSetup pageSetup = currentSection.getPageSetup();
pageSetup.setHeaderDistance(2 72);
pageSetup.setFooterDistance(0.5 72);
builder.moveToHeaderFooter(HeaderFooterType.HEADER_PRIMARY);
builder.write(“Header”);
doc.save(“C:\temp\out.docx”);