Free Support Forum - aspose.com

Convert PDF to WORD using Aspose.PDF for C++ - output file is not well formatted

Hi,

I’m try to convert this file to word with PDF FOR C++.
But it failed like the screenshot.
Any helps?
Thanks.

test.zip (2.4 MB)
图片.png (66.7 KB)

@kngstr

Would you please share complete sample code snippet that you are using to perform the conversion. We will test the scenario in our environment and address it accordingly.

@asad.ali

Just simple code.

`

auto lic = System::MakeObject<Aspose::Pdf::License>();
lic->SetLicense("J:\\Works\\AsposeSDK\\Bin\\Aspose.Total.C++.lic");

auto options = System::MakeObject<Aspose::Pdf::DocSaveOptions>();
options->set_Format(Aspose::Pdf::DocSaveOptions::DocFormat::DocX);
options->set_Mode(Aspose::Pdf::DocSaveOptions::RecognitionMode::Textbox);

auto doc = System::MakeObject<Aspose::Pdf::Document>(u"testpdf.pdf");
doc->Save("testpdf-save.docx", options);

`

I tried Flow and Textbox. Flow mode is a little bit better.

@kngstr

We have logged an issue as PDFCPP-1372 in our issue tracking system for the sake of correction and will surely look into reasons behind it. We will inform you as soon as it resolved. Please spare us some time.

We are sorry for the inconvenience.

@asad.ali

Another file which not well formated.

东光县第二水厂改扩建项目二标段设备安装(工程量清单).zip (1.2 MB)
key-error-and-bad-format.jpg (185.3 KB)

@kngstr

We have logged another issue as PDFCPP-1409 in our issue tracking system for your this file. We will also look into this and inform you as soon as it is resolved. Please give us some time.

We apologize for the inconvenience.

@asad.ali

Another file which is not well formated.

关于印发《本钢集团有限公司安全生产专项整治三年行动实施方案》的通知.zip (431.2 KB)
图片.jpg (477.5 KB)

Found that the file is formated well in Win10.
My testing machine: Win7 x64

@kngstr

We have also observed the formatting issue in our environment and found that the issue exists in Aspose.PDF for .NET too. So, we logged a separate ticket as PDFNET-48781 in our issue tracking system for it. We will inform you as soon as it is resolved. Please give us some time.

We apologize for the inconvenience.

@asad.ali

Another file which is not well formated.
In this file text is converted to image.
G217线K979-K987段干线公路.zip (3.7 MB)

@kngstr

We have logged an issue as PDFCPP-1413 in our issue tracking system for your recently shared file. We will inform you as soon as it is resolved. Please give us some time.

We are sorry for your inconvenience.