Document content is shifted to the next page in generated PDF

Hi,

We use Aspose.Total for Java and have the follow issue:
1. Transform MS Word document to PDF document:
- Document content is shifted to the next page in PDF document
- Footer is not visible in PDF document
2. Transform MS Word document to Word as add new footer to the document:
- Document content is shifted to the next page in Word document

Attach files for reproducing the problem, transformed Word and PDF files which are broken.
- files.zip - document content is shifted to the next page in PDF and Word documents.
- files2.zip - document content is shifted to the next page in PDF and Word documents. Footer is not visible in PDF document
- files3.zip - document content is shifted to the next page in PDF document.

Thanks

Hi Ginka,

Thanks for your inquiry. I have managed to reproduce the same issues with output Pdf files at my side. I have logged this issue as follow:

WORDSNET-7872 : Document contents are shifted to the next page in PDF document
WORDSNET-7873 : Table overlap the footer in output PDF file (Footer is not visible in PDF document)

I have linked this forum thread to the same issues and you will be notified via this forum thread once these issues are resolved. We apologize for your inconvenience.
ginka:
2. Transform MS Word document to Word as add new footer to the document:
- Document content is shifted to the next page in Word document
Could you please share the following details for further investigation?

What environment are you running on?
  • OS (Windows Version or Linux Version)
  • Architecture (32 / 64 bit)
  • Please supply us with the code that you have used to add footer in Word document.

As soon as you get these pieces of information to us we'll start our investigation into your issue.

Hi Ginka,


Thanks for sharing the code.

Please note that MS Word document is a flow document and it does not contain any information about its layout into lines and pages. So it is possible that contents of document may change their position after adding/editing document’s contents.

I have worked with your documents and code. I suggest a little modification in your code (see method addWordFooterWithTabStop). Please add Paragraph break after inserting line as shown in following code snippet. This will solve your problem. Hope this answers your query. Please let us know if you have any more queries.

<span style=“font-size:
10.0pt;font-family:“Courier New”;color:#2B91AF;mso-no-proof:yes”>Shape<span style=“font-size:10.0pt;font-family:“Courier New”;mso-no-proof:yes”> line = new Shape(doc, ShapeType.LINE);<o:p></o:p>

line.setHeight(0);

double pageWidth = pageSetup.getPageWidth();

double rightMargin = pageSetup.getRightMargin();

double leftMargin = pageSetup.getLeftMargin();

pageWidth = pageWidth - rightMargin - leftMargin;

line.setWidth(pageWidth);

builder.getCurrentParagraph().appendChild(line);

builder.getCurrentParagraph().getParagraphFormat().setNoSpaceBetweenParagraphsOfSameStyle(true);

builder.insertBreak(BreakType.PARAGRAPH_BREAK);

builder.getFont().setName("Arial");

builder.getFont().setBold(false);

builder.getFont().setSize(9);

builder.write("This document is ");



Hi Ginka,

Thanks for your patience. I have received response from our development team over following issue.

WORDSNET-7872 : Document contents are shifted to the next page in PDF document

This issue is related to WORDSNET-7866. Due to WORDSNET-7866, the page contents are moved to next page. Please check my answer about WORDSNET-7866 from here:

Please set the Shape.WrapSide to WrapSide.Both to solve this issue.

Document doc = new Document(MyDir + "case3-original.doc");

Shape image = (Shape)doc.GetChild(NodeType.Shape, 1, true);

image.WrapSide = WrapSide.Both;

doc.Save(MyDir + "Out.pdf");


The issues you have found earlier (filed as WORDSNET-7873) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.