Our customer, Capital Securities Corporation., is testing GroupDocs.Conversion for .NET Library and has some questions may need your help.
They’d like to use GroupDocs.Conversion for .NET Library to convert PDF to html, then open it with web browser on iOS/Android OS/PC.
After they open it, it will appears like below, please kindly help us fix it.
In order to investigate this issue, we need following details:
Sample/Problematic file
Conversion code
GroupDocs.Conversion for .NET API version that is being used
Development environment details (e.g. OS version, list of fonts installed on the machine)
Could you please share the source file and the sample conversion code?
We’ve created a thread on your behalf in purchase category.
Downloads.ZIP (2.4 MB)
The HTML file generated from the previous issue displays broken characters when opened on iOS devices. Please find the attached original sample file. Thank you!
Development tool: ASP.NET 2017 .Net Framework4.7.2
GroupDocs.Conversion.21.9.0
Code :
private string SaveFile(string FileName)
{
string sMsg = “”;
try
{
GroupDocs.Conversion.Converter converter = new GroupDocs.Conversion.Converter(string.Format(@“Folder pth{0}”, FileName));
// Set conversion parameters for HTML format
GroupDocs.Conversion.Options.Convert.ConvertOptions convertOptions = converter.GetPossibleConversions()[“html”].ConvertOptions;
// Convert to HTML format
converter.Convert(string.Format(@“Folder pth{0}.html”, FileName.Replace(“.pdf”,“”)), convertOptions);
return sMsg;
}
catch (Exception ex)
{
return ex.ToString();
}
Please take a look at this screenshot.png (185.7 KB). Could you please highlight the affected area/text in the HTML file when opened in Safari?
It’d be great if you highlight the changes that you see in any IOS device.
@saphira_linksoft_com_tw
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CONVERSIONNET-6046
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Could you please share a screenshot of these files opened in both Google Chrome and Safari (or any other IOS web client)? And, if not highlight, point out the difference with the help of some arrow or rectangle annotation.
Upon conducting a thorough investigation, we have determined that the issue causing the content to display correctly in Chrome but appear broken in Safari is related to the font. It is highly probable that Safari is utilizing the system fonts installed on iOS.
const string source = "riskspec.pdf";
using (var converter = new Converter(source, () => new PdfLoadOptions
{
DefaultFont = "PingFang SC Regular"
}))
{
var options = new WebConvertOptions
{
FixedLayout = false,
FixedLayoutShowBorders = false,
};
converter.Convert("converted.html", options);
}
You must put this font PingFang SC Regular in the folder where the executable is.
And must use the latest v23.6 version of GroupDocs.Conversion for .NET (which will be released soon)
The main issue is that the font in the document is not rendered correctly in iOS Safari and must be replaced with a font which is rendered correctly.