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

Free Support Forum - aspose.com

FIELD behaviour differing between WORD and PDF output

Hi,

I’m trying to generate a document from a template with the following field in the footer:

{= {PAGE} - {PAGEREF “Section{SECTION}”} + 1}



It works fine when saving the document to DOCX I get the correct number appearing in the footer, but when I save the document as PDF I get “!Syntax Error”.



On further review the issue appears to be with {PAGEREF “Section{SECTION}”} which it finds in the WORD output but returns “Error! Bookmark not defined.”



As stated previously both are generated from the same word template.



I’ve attached a sample of the word template for reference.



Any help would be greatly appreciated

Hi there,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input template Word document
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.
  • Please manually create your expected Word document using Microsoft Word and attach it here for our reference.

As soon as you get these pieces of information ready, we'll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click 'Reply' button that will bring you to the 'reply page' and there at the bottom you can include any attachments with that post by clicking the 'Add/Update' button.