I am using the GroupDocs.Viewer.24.6.0 package in my project. I use the following code to convert PDF and other documents to HTML:
using (Viewer viewer = new Viewer(stream, loadOptions))
{
HtmlViewOptions viewOptions = HtmlViewOptions.ForExternalResources(
Path.Combine(outputPath, "page_{0}.html"),
Path.Combine(outputPath, "page_{0}/resource_{1}"),
url + "/page_{0}/resource_{1}");
viewer.View(viewOptions);
}
One PDF file does not render correctly. Some texts are cropped.
I am attaching screenshots from Adobe Reader, where the OK texts can be seen and after conversion to HTML, where they are cropped:
AdobeReader_A.jpg (23.5 kB)
AdobeReader_B.jpg (25.1 kB)
GroupDocs_A.jpg (14.8 kB)
GroupDocs_B.jpg (17.6 kB)
What could be the problem?
Thank you,
Jiri
@jiri.darmovzal
It can be font-related issue. Can you please share the source file so we could investigate this issue?
Hello @vladimir.litvinchik,
I have permission from the customer to forward the document to support. If I attach it here in the forum, will other users not be able to access it?
Thank you,
Jiri
@jiri.darmovzal
You can send the file in a personal message. Click my avatar and click Message.
Please also share the code you used to create the PDF file.
@jiri.darmovzal
It is a bug on our side that we have to investigate. At the moment I can propose you two workarounds:
- Render PDF pages as image by enabling
RenderTextAsImage
property
viewOptions.PdfOptions.RenderTextAsImage = true;
- Fix inline styles by replacing text
"overflow:hidden;"
in HTML document with empty string.
This is the sample application that demonstrates both workarounds: sample-app.zip (1.8 KB).
As soon as we have updates we’ll let you know.
Thank you, @Vladimir_Litvinchik,
I successfully applied the workaround to the application. It seems that WO does not affect other documents.
Best regards,
Jiri
@jiri.darmovzal
Thank you for the feedback.