Hi,
we have a Document “TestDocument.docx” which was created with Aspose. If we save the file as pdf you can see that the header is too wide. Save as docx is all okay.
If we edit the TestDocument.docx (see TestDocumentWithHello.docx) and save this document as pdf, it is all okay.
We are using Aspose.Words 16.5.0
2x Windows 10 64 Bit 1x Windows 7 64 Bit
Word 2013
Here is a Test Project:
<pre style=“font-family: “Courier New”; background-color: rgb(255, 255, 255);”>import com.aspose.words.*;
/**
* Created by Alexander.Joerg on 28.06.2016.
*/
public class AsposeTest {
public static void main(String[] args) {
try {
Document document = new Document(“C:\temp\testDocument.docx”);
document.save(“C:\temp\testDocument1.docx”);
document.save(“C:\temp\testDocument1.pdf”);
Document document1 = new Document(“C:\temp\testDocumentWithHello.docx”);
document1.save(“C:\temp\testDocumentWithHello1.docx”);
document1.save(“C:\temp\testDocumentWithHello1.pdf”);
} catch (Exception e) {
e.printStackTrace();
}
}
}
/**
* Created by Alexander.Joerg on 28.06.2016.
*/
public class AsposeTest {
public static void main(String[] args) {
try {
Document document = new Document(“C:\temp\testDocument.docx”);
document.save(“C:\temp\testDocument1.docx”);
document.save(“C:\temp\testDocument1.pdf”);
Document document1 = new Document(“C:\temp\testDocumentWithHello.docx”);
document1.save(“C:\temp\testDocumentWithHello1.docx”);
document1.save(“C:\temp\testDocumentWithHello1.pdf”);
} catch (Exception e) {
e.printStackTrace();
}
}
}