Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed May 29, 2024 8:22 am

Hi,

I am converting PDFs to image with the following code:

using (var image = pdfDocument.SaveAsImage(i))
{
using (var imageStream = new MemoryStream())
{
image.Save(imageStream, System.Drawing.Imaging.ImageFormat.Png);
newPicture.FileBinary = CommonConverterUtility.StreamToByteArray(imageStream);
}
}

However when there is any text highlighted, in the image the Text can't be read, because all text is behind the highligting.

Please fix this (also tested in the new version)

Best,

troithmeier
 
Posts: 19
Joined: Tue Sep 04, 2018 12:24 pm

Wed May 29, 2024 9:57 am

Hello.
The result I tested using Spire.PDF latest version 10.5.5 is a bit different from yours. I have attached a screenshot below for your reference.
I use the following code:
Code: Select all
            PdfDocument pdfDocument = new PdfDocument();
            pdfDocument.LoadFromFile(@“D:\attachments\05-29\MarkupTest\MarkupTest.pdf”);
            for (int i = 0; i < pdfDocument.Pages.Count; i++)
            String fileName = String
                String fileName = String.Format(“ToImage-img-{0}.png”, i); { String fileName = String.
                using (var image = pdfDocument.SaveAsImage(i))
                {
                    using (var imageStream = new MemoryStream())
                    {
                        image.Save(fileName, System.Drawing.Imaging.ImageFormat.Png);
                        //newPicture.FileBinary = CommonConverterUtility.StreamToByteArray(imageStream);
                    }
                }
            }


If your test results with the latest version are different from mine, please provide your project framework (e.g. NetFramework 4.7) and system information (e.g. Windows 10) for us to investigate further. Thank you for your assistance.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 409
Joined: Mon Nov 07, 2022 8:10 am

Wed May 29, 2024 10:55 am

Enclosed you can find the sample in .net8

troithmeier
 
Posts: 19
Joined: Tue Sep 04, 2018 12:24 pm

Thu May 30, 2024 8:30 am

Hi,

Thanks for your kind sharing.
I have reproduced your issue and logged it into our bug tracking system with ticket number SPIREPDF-6797. Our dev team will investigate and fix it. Once it's resolved, we will update you as soon as possible.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 409
Joined: Mon Nov 07, 2022 8:10 am

Tue Jun 25, 2024 8:01 am

Hi,

I have seen there is a bugfix already in the java libary. When it will be rolled out in .net?

Best

troithmeier
 
Posts: 19
Joined: Tue Sep 04, 2018 12:24 pm

Tue Jun 25, 2024 9:56 am

Hi,

Thank you for your following up.
I sincerely apologize for the inconvenience, but this issue regarding the color blending effect displayed in the PDF is still unresolved as our current product does not support it. We have prioritized your concern and our development team is actively working on a solution. Please grant us some more time to address this.
Furthermore, I have verified the latest version of Java, and the conversion results are consistent with the .NET version. It seems that the bug fix you've encountered is not related to this particular issue. Once again, we apologize for the inconvenience.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 409
Joined: Mon Nov 07, 2022 8:10 am

Fri Jul 05, 2024 9:02 am

Any news? I already purchased again an update License, because i tought it was solved.

troithmeier
 
Posts: 19
Joined: Tue Sep 04, 2018 12:24 pm

Fri Jul 05, 2024 10:01 am

Hi,

I'm very sorry. Due to the complexity of this issue, our current design does not support this color mode, and the development team is still working hard to find a solution. I have reminded the development team again to speed up the process, and I will inform you as soon as there is any progress. I'm sorry for the inconvenience it has caused you.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 409
Joined: Mon Nov 07, 2022 8:10 am

Wed Jul 31, 2024 7:18 am

Hi,

Any news when this will be implemented? Do you have any timeline for it?

Best,
Andreas

troithmeier
 
Posts: 19
Joined: Tue Sep 04, 2018 12:24 pm

Wed Jul 31, 2024 10:31 am

Hi,

Thank you for your following up.
I profoundly apologize for the inconvenience caused. Although our development team has diligently worked to investigate this issue, it has proven to be exceptionally complex. Unfortunately, the current framework of our product does not support this particular color mode, making it difficult to resolve in the immediate future. We sincerely hope that you can understand.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 409
Joined: Mon Nov 07, 2022 8:10 am

Wed Jul 31, 2024 11:08 am

So do you mean, that other colors are working?

troithmeier
 
Posts: 19
Joined: Tue Sep 04, 2018 12:24 pm

Thu Aug 01, 2024 7:51 am

Hi,

I apologize if my previous explanation was unclear, causing confusion. The Ink annotations in your PDF utilize a color blending effect, which our product's framework currently struggles to process effectively. This issue is not related to a particular single color but rather to the complexity of the blending itself.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 409
Joined: Mon Nov 07, 2022 8:10 am

Mon Aug 05, 2024 9:33 am

Could it be an option to just ignore all markup. The problem in .net 8 is that the original text is not visible. Maybe we could just ignore the annotations?

troithmeier
 
Posts: 19
Joined: Tue Sep 04, 2018 12:24 pm

Tue Aug 06, 2024 9:13 am

Hello,

Do you mean it is acceptable to convert the image after removing the annotations? If so, please refer to the code below and convert it to an image after removing any comments or annotations. I have attached a screenshot of my result for your reference.

Code: Select all
    PdfDocument document = new PdfDocument();

    document.LoadFromFile(@"0True.pdf");

    document.Pages[0].Annotations.Clear();

    using (var image = document.SaveAsImage(0))
    {
        image.Save("new.png", System.Drawing.Imaging.ImageFormat.Png);
    }


Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 409
Joined: Mon Nov 07, 2022 8:10 am

Thu Aug 08, 2024 1:59 pm

Hi,
Unfortunatelly, this is not an option for our PM and Customer, because all annotations are lost.

Please try to make the Annotations a bit transparent.

Best,
Andreas

troithmeier
 
Posts: 19
Joined: Tue Sep 04, 2018 12:24 pm

Return to Spire.PDF