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.

Tue Nov 01, 2022 9:29 pm

Hi,
I converted a PDF with English and Arabic text using saveToStream(outStream, FileFormat.HTML) which produced miss formed Arabic text.

Attached are the PDF and generated HTML.

mgalal123
 
Posts: 31
Joined: Thu Apr 21, 2022 12:48 pm

Wed Nov 02, 2022 2:39 am

Hello,

Thanks for your inquiry.
I did reproduce the behavior you mentioned when testing with our latest Spire.Office for Java Version:7.10.4. I have logged this issue into our tracking system with the ticket SPIREPDF-5587. Our Dev team will do more investigations. Once there is any update, I will inform you asap. Sorry for the inconvenience caused.

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Wed Nov 02, 2022 8:36 am

Thanks a lot for your support, waiting for a quick fix or a workaround should the fix will be delayed.

mgalal123
 
Posts: 31
Joined: Thu Apr 21, 2022 12:48 pm

Thu Nov 03, 2022 7:15 am

Hello,

Thanks for your feedback.
You are welcome. Once there is any update, I will inform you asap. Sorry for the inconvenience caused.

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Thu Dec 08, 2022 11:20 am

Any progress updates ?

mgalal123
 
Posts: 31
Joined: Thu Apr 21, 2022 12:48 pm

Fri Dec 09, 2022 1:39 am

Hello,

Thanks for your following-up.
I'm sorry that issue SPIREPDF-5587 has not been resolved due to the complexity of it. I have asked our developers to speed up fixing it. Once there is any update, I will inform you in time. Sorry for the inconvenience caused again.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Fri Dec 09, 2022 2:28 pm

it's been more than one month since we raised this. I wonder if you have put it in the right queue given we have purchased extra support license which should give our issues more priority.

mgalal123
 
Posts: 31
Joined: Thu Apr 21, 2022 12:48 pm

Mon Dec 12, 2022 2:15 am

Hello,

Thanks for your following-up.
I have given your issue the highest priority and our development team still work hard on it, but they doesn’t find a suitable solution to solve this issue due the complexity of this issue. I have urged our development team speed up fixing this issue. Please share us more time. Sorry for the inconvenience caused.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Thu Jan 05, 2023 2:10 pm

Hi,
Don't you think this is too much time to fix an issue like this ? Has anyone checked it at all or it has been just ignored or missed in your records ?

mgalal123
 
Posts: 31
Joined: Thu Apr 21, 2022 12:48 pm

Fri Jan 06, 2023 2:46 am

Hello,

We did not miss SPIREPDF-5587 issue and have been working on it. But it does have a lot of difficulty and complexity.

For hyphenated types like Arabic characters, displaying PDF content in Adobe is rendered using unicode and glyphs corresponding to each other. We found that browsers (such as Google and Internet Explorer) have their own internal rules for handling hyphenated languages that differ from Adobe's. We also found that different browsers, such as Google and Internet Explorer, display different results.

At present, our developers are taking a long time to investigate the processing rules of the browsers and have not fully investigated it yet. Please give us more time. Thank you for your understanding and support.

Sincerely,
Amy
E-iceblue support team
User avatar

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

Fri Jan 06, 2023 11:03 am

Hi,
Thanks for your reply.
At least for now we would expect a workaround to move forward. So please ask your development team to suggest another way of implementation to ensure we are not impacted by this issue.

mgalal123
 
Posts: 31
Joined: Thu Apr 21, 2022 12:48 pm

Mon Jan 09, 2023 4:03 am

Hi,

Thanks for your understanding.
Are you willing to accept the solution of first converting PDF to image and draw the image to a new PdfDocument, and then converting it to HTML files?
sampe code:
Code: Select all
        PdfDocument doc = new PdfDocument();
        doc.loadFromFile(folder+"source.pdf");
        PdfDocument pdfDocument = new PdfDocument();
        PdfPageBase pdfPageBase;
        for (int i = 0; i < doc.getPages().getCount(); i++) {
            pdfPageBase = pdfDocument.getPages().add(doc.getPages().get(i).getSize(),new PdfMargins(0));
            BufferedImage bufferedImage = doc.saveAsImage(i);
            pdfPageBase.getCanvas().drawImage(PdfImage.fromImage(bufferedImage),0,0);
            bufferedImage.getGraphics().dispose();
        }
        //Set the conversion option to embed image in html
        pdfDocument.getConvertOptions().setPdfToHtmlOptions(true,true);
        //Convert to html file
        pdfDocument.saveToFile(folder+"1.html", FileFormat.HTML);
        pdfDocument.close();
        doc.close();



Sincerely,
Amy
E-iceblue support team
User avatar

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

Tue Jan 10, 2023 9:18 am

Thanks, will try your solution and revert back.

mgalal123
 
Posts: 31
Joined: Thu Apr 21, 2022 12:48 pm

Tue Jan 10, 2023 9:59 am

You're welcome.

We're looking forward to your feedback.

Sincerely,
Amy
E-iceblue support team
User avatar

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

Sun Jan 29, 2023 8:03 am

Hi,
For now we can proceed with your workaround hoping to get a permanent fix soon. Thanks.

mgalal123
 
Posts: 31
Joined: Thu Apr 21, 2022 12:48 pm

Return to Spire.PDF

cron