Incorrect output while Converting PDF to Word using C++

Hi,

I’m using Aspose.PDF for C++.
The out put docx is incorrect.

Test file:

Detail:

@kngstr

While testing the scenario in our environment, we obtained the attached Word file. Please check it and let us know what issue does it have in it? 80p-45.docx (59.9 KB)

@asad.ali

This docx was converted by pdf.
As the words group said, this docx is incorrect.

Test file: 工程项目施工的成本控制 80p-45.pdf
Output file: 工程项目施工的成本控制 80p-45.docx

@kngstr

Please share some more details. Are you trying to process the output Word file using Aspose.Words and facing an error? OR opening this file in MS Word at your side gives an error? We need complete use case information in order to further proceed accordingly.

@asad.ali

All I need is:
First, convert this pdf to word.
Second, merge the output file with the other word files

@kngstr

An investigation ticket as PDFCPP-1746 has been logged in our issue management system to further analyze this case. We will look into its details and keep you posted with the status of ticket resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.

@asad.ali

The ouput docx is still bad.
The output file can not be loaded with Aspose.words for .net 24.3.

Tested OSs were Win7 and Win10
.NET target platform is .net 6.0
Using SDK: Aspose.PDF for .Net 24.3

Testing code

void ConvertPDFtoWordDocAdvanced(string filename)
{
    var pdfFile = filename;
    var docFile = filename + ".docx";
    Document pdfDocument = new Document(pdfFile);
    DocSaveOptions saveOptions = new DocSaveOptions
    {
        Format = DocSaveOptions.DocFormat.DocX,
        // Set the recognition mode as Flow
        Mode = DocSaveOptions.RecognitionMode.Flow,
    };
    pdfDocument.Save(docFile, saveOptions);
}

It seems RecognitionMode.Textbox works well.

@kngstr

Can you please share the sample PDF with us and the error that you are facing in Aspose.Words for .NET while reading the output file?

@asad.ali
The file was uploaded before in this topic.

Aspose.Words for .net 24.4 got the same exception as before:
System.InvalidOperationException:“More than 63 cells per row is not supported for this file format.”

System.InvalidOperationException
  HResult=0x80131509
  Message=More than 63 cells per row is not supported for this file format.
  Source=Aspose.Words
  StackTrace:
   在 oC4.d(Row d)
   在 Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
   在 Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
   在 Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
   在 Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
   在 Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
   在 Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
   在 Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
   在 Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
   在 Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
   在 LC4.d(OCK d)
   在 Aspose.Words.Document.d(Stream d, String v, SaveOptions c)
   在 Program.<Main>$(String[] args) 在 C:\.NET\ConsoleApp.Words\ConsoleApp.Words\Program.cs 中: 第 5 行

Testing code:

using Aspose.Words;

Document doc = new Document("工程项目施工的成本控制 80p-45.pdf.docx");
doc.Save("工程项目施工的成本控制 80p-45.pdf.docx");