We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Word2pdf margin issue

I use this code(.net vs2010,freamwork 4.0):

Aspose.Words.Document doc = new Aspose.Words.Document(filePath);
DocumentBuilder mybuilder = new DocumentBuilder(doc);
PageSetup pageSetup = mybuilder.PageSetup;
float a = 100;
pageSetup.TopMargin += a;
doc.Save(resultFile, SaveFormat.Pdf);

When I change a’s value,It’s always move down.
It shows same when i set a = -100 or a=100;


Thanks for your inquiry. Please call Document.UpdatePageLayout method before saving the document. Hope this helps you. If you still face problem, please ZIP and attach your input Word document here for testing. We will investigate the issue on our side and provide you more information.