Convert PDF to DOC/DOCX via Aspose.PDF for C++ - Text Flow Mode

Hi,
I was trying to convert pdf to word with Aspose.PDF.Cpp.19.11
But the output doc file is very different from the pdf file.

How to remove the rectangle of docx?

The stamp is not transparent, and the text above is disappered.

Here are my test files.
aspose.pdf.err.zip (9.3 MB)

Thanks.

@kngstr

Thank you for contacting support.

Please check RecognitionMode enumeration, it seems you are using TextBox so it converts PDF to DOCX in form of text boxes to preserve maximum formatting. Please use Flow in your code which keeps the flow of original document. If you still face any problem then please share SSCCE code so that we may investigate further.

@Farhan.Raza
Here is my test code

void testConvert() {
printf(“start\n”);
auto doc = MakeObject(u".\Pdfs\input.pdf");
doc->Save(u"savepdfxxx.docx", SaveFormat::DocX);
printf(“end\n”);
}

And this is the docx should be

@kngstr

We have logged a ticket with ID PDFCPP-1148 in our issue management system for further investigations. We will let you know as soon as any significant update will be available in this regard.

@Farhan.Raza

Thanks. Waiting for your good news.

@Farhan.Raza
I tested Flow mode. I’s exactly what I want.
But the output docx file have more blank pages.
Any help?
Thanks.

@kngstr

Thank you for your kind feedback.

Please share the generated document as ZIP for our reference. Also include updated code which you have used to generate it.

@Farhan.Raza

File was already uploaded before.
Here is my test code

void testConvert() {
auto doc = MakeObject(u"Example1.pdf");
SharedPtr options = MakeObject();
options->set_Format(DocSaveOptions::DocFormat::DocX);
options->set_Mode(DocSaveOptions::RecognitionMode::Flow);
doc->Save(u"Example15.docx", options);
}

@kngstr

Thank you for the code.

We have recorded your concerns with logged ticket and will let you know once any update will be available in this regard.

@Farhan.Raza
Thanks.

@kngstr

We are investigating the issue that has been logged. However, would you please provide following information about rectangle in .docx?

  1. Which page of document contains that rectangle?
  2. Does rectangle appear only when text fragment is selected or it is displayed permanently?

Hi,

I tried for flow mode. It works fine.

Thanks.

@kngstr

It is good to know that your issue has been resolved. Please keep using our API and in case you need further assistance, please feel free to let us know.

@asad.ali

Thanks.