We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

When I try merge the pdf into word the pdf content corrupted

Dear ,
I have a dynamic word document and I’ll merge it with a dynamic pdf file
after merged the content of the pdf file is corrupted

var doc = new Document(steamDoc);
ImportFormatOptions options = new ImportFormatOptions { KeepSourceNumbering = true };
DocumentsHelper.RemoveTableOfContents(doc, 0);
Aspose.Words.DocumentBuilder _builder = new Aspose.Words.DocumentBuilder(finalDocument);
if (i == 1) _builder.MoveToBookmark("attachment");
if (i > 1) _builder.MoveToBookmark(attachmentBookMarkName);
if (i != 0)
{
    _builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading3;
    _builder.Writeln(file.DocumentName);
    _builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.BodyText3;
    _builder.InsertBreak(BreakType.LineBreak);
}
finalDocument.AppendDocument(doc, ImportFormatMode.UseDestinationStyles, options);
MemoryStream outputStream = new MemoryStream();
finalDocument.Save(outputStream, SaveFormat.Pdf);

Currpted_2.png (95.0 KB)
Currpted1.png (64.0 KB)
Sampel_1.png (50.8 KB)
sampel2_1.png (82.2 KB)
Please advice

@JassarMahmoud Could you please attach the sample documents which you are merging? We will check it and provide you more information.

Sprint 5[7252].pdf (140.5 KB)
خدمات تقييم متعاقد تقنية معلومات (1)1111.pdf (113.6 KB)

Please find the attachment

@JassarMahmoud If I understand correctly, the corruption appears on the PDF import stage. I’ve attached the result of the PDF import on my side. Could you please check the documents and confirm that your problems exists in my output?1111.imported.docx (13.3 KB)
1111.imported.pdf (56.7 KB)
Sprint 5.imported.docx (17.6 KB)
Sprint 5.imported.pdf (49.1 KB)

Dear
yes, the corruption appears on the PDF and word import stage,
The file has been corruption after merging, please see the attachments to see the problem
image.png (261.7 KB)

image.png (265.2 KB)

@JassarMahmoud I have logged the issue with ‘sprint 5…’ document import as WORDSNET- 23497. For ‘1111…’ document import I have logged WORDSNET- 23499 for the issue with Arabic text import, WORDSNET- 23506 for the cells background import issue and WORDSNET- 23506 for the incorrect cells merging. We will keep you informed and let you know once it is resolved.

Dear
How can I track issues that you have been logged?

@JassarMahmoud You could see the status of the logged issues in this topic. Also you will be notified here when the issue fix will be released.

The issues you have found earlier (filed as WORDSNET-23497) have been fixed in this Aspose.Words for .NET 22.3 update also available on NuGet.

The issues you have found earlier (filed as WORDSNET-23499) have been fixed in this Aspose.Words for .NET 22.4 update also available on NuGet.

The issues you have found earlier (filed as WORDSNET-23506) have been fixed in this Aspose.Words for .NET 22.4 update also available on NuGet.

The issues you have found earlier (filed as WORDSNET-23507) have been fixed in this Aspose.Words for .NET 22.4 update also available on NuGet.

Dear,
Thank you for your support and effort
Most of the problems are solved because we have some corrupted letters, and another iuee in the header place, please see the attachment
please note that I used Aspose.Words Version= 22.6.0
isuee_280622(1).png (90.4 KB)
isuee_280622(2).png (33.6 KB)
isuee_280622(3).png (104.3 KB)
file after marged .pdf (130.5 KB)
خدمات تقييم متعاقد تقنية معلومات (1)1111.pdf (113.6 KB)
Sprint 5[7252].pdf (140.5 KB)
please advice

@JassarMahmoud Thank you for additional information. I have logged two more issues WORDSNET-24042 and WORDSNET-24043. We will keep you informed and let you know once they are resolved.

@alexey.noskov
thank you for your response.
I noticed a bunch of problems when merging files containing non-English words
for example

@JassarMahmoud Could you please attach your source PDF documents that will allow us to reproduce the mentioned problems? We will check the problems and provide you more information.

@alexey.noskov
Test data 1.pdf (8.4 MB)
Test datat 2.pdf (718.8 KB)

please find the attachment

@JassarMahmoud Thank you for additional information. I have logged two more issues:
WORDSNET-24062 - Problem with RTL content (reversed order and spaces)
WORDSNET-24063 - TOC corruption.
Both problems seem to be related to improper importing RTL content from PDF document. We will investigate the issues and let you know once they are resolved.

@alexey.noskov
is there time to close the problems? You need to specify a specific time to create our delivery plan

@JassarMahmoud
WORDSNET-24042 is currently in development and is scheduled to be resolved in 22.8 (August 2022) version of Aspose.Words.
WORDSNET-24043 is currently in development and is scheduled to be resolved in 22.8 (August 2022) version of Aspose.Words.
WORDSNET-24062 is currently postponed and is not yet scheduled for development.
WORDSNET-24063 is currently scheduled to be resolved in 22.8 (August 2022) version of Aspose.Words.

But please note, the provided estimates are rough and they can be shifted. So you cannot 100% rely on them.