Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Tue Dec 10, 2024 12:17 pm

Hi,
we have a problem with the transperancy of pictures inside our Converted PDF-Files.
In our Docx the Picture is Transparent. After the conversion to PDF the Picture isn't transparent.

Here is the code we use to convert the Spire.Doc.Document to a PDF-File.
Code: Select all
       
private static MemoryStream ConvertDocumentToPDFStream(Document document)
        {
            var tempStrem = new MemoryStream();
            document.SaveToStream(tempStrem, FileFormat.Docx);
            var tempDoc = new Document(tempStrem);

            ToPdfParameterList toPdf = new ToPdfParameterList();
            toPdf.PdfConformanceLevel = PdfConformanceLevel.Pdf_A3B;
            MemoryStream resultStream = new MemoryStream();
            tempDoc.SaveToStream(resultStream, toPdf);
            return resultStream;
        }


Also in the Attachment i provided two documents created via a Test.
OutputFiles.zip


Kind regards,
Till

simplements
 
Posts: 11
Joined: Sun Aug 08, 2021 10:48 am

Wed Dec 11, 2024 7:55 am

Hello,

Thanks for your inquiry.

To assist us in investigating this issue and providing you with a solution, please provide your Word document and inform us of the version number of the Spire.Doc.dll that you are currently using. Thank you!

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3046
Joined: Wed Jun 27, 2012 8:50 am

Wed Dec 11, 2024 12:20 pm

Hi Amy,

we have installed Spire.Doc version 12.7.3.
Here is the Template-File and the Transparent Image i used for the example-outputs.
TemplateFiles.zip


Here are again the output Files, since it seems there not correctly uploaded in my initial post.
OutputFiles.zip


Regards,
Till

simplements
 
Posts: 11
Joined: Sun Aug 08, 2021 10:48 am

Thu Dec 12, 2024 2:52 am

Hello,

Thank you for your assistance.

I have been able to reproduce the issue with lost picture transparency using your provided document, and I have logged it into our issue tracking system with the tracking number SPIREDOC-11005.

However, during my testing, I found that the problem does not occur if the document is directly converted to PDF format instead of PDFA3B. When I used our specialized Spire.PDF product, which has robust features for handling PDF documents, to convert the PDF document to PDFA3B, the resulting document displayed correctly without losing picture transparency. Below is the complete code I used:
Code: Select all
// Create a new Document object and load the Word document from file
Document document = new Document();
document.LoadFromFile("TransparentOutput.docx");

// Save the Word document to a PDF stream
MemoryStream resultPDFStream = new MemoryStream();
document.SaveToStream(resultPDFStream, Spire.Doc.FileFormat.PDF);

// Initialize a PdfStandardsConverter with the PDF stream
PdfStandardsConverter converter = new PdfStandardsConverter(resultPDFStream);

// Convert the PDF stream to PDFA3B and save it to another memory stream
MemoryStream resultPDFA3BStream = new MemoryStream();
converter.ToPdfA3B(resultPDFA3BStream);

If you are interested in trying to convert PDF to PDFA using Spire.PDF, you can quickly install and use it via NuGet by searching for "Spire.PDF". The latest version available is 10.11.7, which you can find at the following link:
NuGet link: https://www.nuget.org/packages/Spire.PDF/10.11.7
Our website link: https://www.e-iceblue.com/Download/download-pdf-for-net-now.html

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3046
Joined: Wed Jun 27, 2012 8:50 am

Tue Jan 14, 2025 8:36 am

Hello,

what's the current status of the ticket SPIREDOC-11005?

Kind regards,
Till

simplements
 
Posts: 11
Joined: Sun Aug 08, 2021 10:48 am

Tue Jan 14, 2025 9:50 am

Hello,

Thank you for following up.
I am sorry to tell that there is no significant progress so far. I have urged our Dev team, they are still doing investigation about it. Any update, we will let you know immediately. Sorry for the inconvenience caused.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Tue Feb 18, 2025 6:56 am

Hello,

what's the current status of the ticket SPIREDOC-11005?
Our customers are waiting for a solution.

Kind regards,
Till

simplements
 
Posts: 11
Joined: Sun Aug 08, 2021 10:48 am

Tue Feb 18, 2025 9:11 am

Hi Till,

Due to the complexity of your issue, our dev team has not yet found a complete solution. I have urged them again and they will accelerate the investigation of this problem. If I receive any news, I will notify you promptly. Thank you for your understanding.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Fri Dec 12, 2025 9:35 am

Hello,

Thank you for your patience.

A new version of Spire.Doc Pack (hotfix) Version 13.12.2 for addressing the issue SPIREDOC-11005 has been released.
Download link: https://www.e-iceblue.com/Download/download-word-for-net-now.html
Nuget links:
https://www.nuget.org/packages/Spire.Doc/13.12.2
https://www.nuget.org/packages/Spire.Docfor.NETStandard/13.12.2

Please feel free to contact us if you have any questions.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3046
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Doc

cron