when having field FileName in header of the document it is not saved in resulting pdf. But same field does appear in body of the document.
See screenshot.PNG (9.8 KB)
Notice the page field working as expected in header.
Code snippet used to save doc as pdf:
InputStream is = new FileInputStream(path);
OutputStream os = new FileOutputStream(path + “.pdf”);
com.aspose.words.Document doc = new com.aspose.words.Document(is); doc.save(os, com.aspose.words.SaveFormat.PDF); }
Sampl doc: field_in_header.zip (15.4 KB)