HTML files created with Aspose.pdf .net from a pdf file do not display properly on iOS devices. Attached is a sample pdf and the resulting html (in the zipped file). Problem seems to be related to a Zoom factor. At normal zoom the overlap is so bad the text is unreadable. At higher zoom factors the overlap is barely noticeable. Problem only appears to be when the html is displayed on iOS devices. The same file displays properly on OS X Safari, Windows Chrome, Firefox, and IE, Android native and Chrome.
Document doc = new Document("C:\Somefile.pdf");
// Instantiate HTML Save options object
HtmlSaveOptions newOptions = new HtmlSaveOptions();
// Instantiate HTML Save options object
HtmlSaveOptions newOptions = new HtmlSaveOptions();
// Enable option to embed all resources inside the HTML
newOptions.PartsEmbeddingMode = HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml;
newOptions.SplitIntoPages = false;
newOptions.PartsEmbeddingMode = HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml;
newOptions.SplitIntoPages = false;
newOptions.LettersPositioningMethod = HtmlSaveOptions.LettersPositioningMethods.UseEmUnitsAndCompensationOfRoundingErrorsInCss;
newOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
newOptions.FontSavingMode = HtmlSaveOptions.FontSavingModes.SaveInAllFormats;
newOptions.CustomHtmlSavingStrategy = new HtmlSaveOptions.HtmlPageMarkupSavingStrategy((HtmlSaveOptions.HtmlPageMarkupSavingInfo htmlSavingInfo) =>
{
result.Content = new StreamContent(htmlSavingInfo.ContentStream);
result.Content.Headers.ContentType = new MediaTypeHeaderValue("text/html");
});
doc.Save(@"z:\dummy\path.html", newOptions);
newOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
newOptions.FontSavingMode = HtmlSaveOptions.FontSavingModes.SaveInAllFormats;
newOptions.CustomHtmlSavingStrategy = new HtmlSaveOptions.HtmlPageMarkupSavingStrategy((HtmlSaveOptions.HtmlPageMarkupSavingInfo htmlSavingInfo) =>
{
result.Content = new StreamContent(htmlSavingInfo.ContentStream);
result.Content.Headers.ContentType = new MediaTypeHeaderValue("text/html");
});
doc.Save(@"z:\dummy\path.html", newOptions);