DOCX to PDF convertion with table

Hello,

Please help us word to pdf conversion issue.

We have table content and footnote in the word document refer pg no 3 of file “15-RR-ETH-17557-NR04_Ethiopia_RCHC.Report.docx”. And while converting to the pdf table overlap with footnote(converted pdf file refer page no 3 of file “15-RR-ETH-17557-NR04_Ethiopia_RCHC.Report.pdf”).

Sample code :

string licenseFileLocation = string.Empty;
licenseFileLocation = "SiteAssets/Aspose.Words.lic";
FileStream fileStreamRead = new FileStream(@"D:\Work\Balmukund\15-RR-ETH-17557-NR04_Ethiopia_RCHC.Report.docx", FileMode.Open, FileAccess.Read);
FileStream fileStreamWrite = new FileStream(@"D:\Work\Balmukund\15-RR-ETH-17557-NR04_Ethiopia_RCHC.Report.pdf", FileMode.Create, FileAccess.Write);
SPFile licenseFile = web.GetFile(licenseFileLocation);
Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense(licenseFile.OpenBinaryStream());
Document wordDocument = new Document(fileStreamRead);
using (MemoryStream msPDFFile = new MemoryStream())
{
    // wordDocument.UpdateTableLayout();
    // NodeCollection tables = wordDocument.GetChildNodes(NodeType.Table, true);
    //for (int i = 0; i < tables.Count; i++)
    //{
    // Aspose.Words.Tables.Table table = (Aspose.Words.Tables.Table)tables[i];
    // fitTableToPageWidth(table);
    //}
    wordDocument.Save(msPDFFile, SaveFormat.Pdf);
    // wordDocument.Save(@"D:\Work\Balmukund\15-RR-ETH-17557-NR04_Ethiopia_RCHC.pdf",Aspose.Words.Saving.SaveOptions.CreateSaveOptions(SaveFormat.Pdf));
    msPDFFile.WriteTo(fileStreamWrite);
}

Attached sample docx file and converted pdf file for your reference.

Please provide the solution earliest. Its production issue.

Thank you…

Regards,

Balmukund

9920055607

Hi Balmukund,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-14150. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hello Team,

We are awaiting for your valuable response. Please do the needful asap as its production issue.

Thank you…

Regards,

Balmukud Shrivastava

9920055607

Hi Balmukud,

Unfortunately, your issue is not resolved yet. Our product team has completed the initial analysis of this issue. The issue occurs because a floating table is currently not re-broken by Aspose.Words after footnotes are added to the page. You may make the problematic table inline as a workaround. We will inform you via this thread as soon as this issue is resolved. We apologize for any inconvenience.

Best regards,

Hello Team,

Thanks for the response and many thanks that you are working on this issue. Can you please explain the workaround suggested by you “You may make the problematic table inline as a workaround”.

Please let us know what we need to do for the workaround of this issue as this is production issue.

Thank you.

Regards,

Balmukund Shrivastava

9920055607

Hi Balmukud,

Thanks for your inquiry. Please use following code example as a workaround of this issue. Hope this helps you.

Document doc = new Document(MyDir + "15-RR-ETH-17557-NR04_Ethiopia_RCHC.Report.docx");
foreach (Table table in doc.GetChildNodes(NodeType.Table, true))
{
    table.TextWrapping = TextWrapping.None;
}
doc.Save(MyDir + "Out v16.8.0.pdf");

Hi Manzoor,

Thank you for the workaround. As of now its fine.

Request to provide fix for this issue soon.

Thank you…

Regards,

Balmukund S

9920055607

Hi Balmukud,

Thanks for your inquiry. We try our best to deal with every customer request in a timely fashion, we unfortunately cannot guarantee a delivery date to every customer issue. Our developers work on issues on a first come, first served basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

We will update you via this forum thread once this issue is resolved. Thanks for your patience and understanding.