Я конвертировал образец PDF-файла в HTML5, используя Oracle OutSide In Web View Export, используя метод AjaxChunked
, но я не могу правильно отобразить файл с помощью прилагаемого JavaScript API.Файл отображается правильно, просматривается напрямую.
Например, неправильный рендеринг через JavaScript API:

И какпри просмотре файл выглядит непосредственно:

Исходный код для правильного рендеринга:

А вот index.html, который я написал с помощью API JavaScript экспорта веб-представления:
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!--<link rel="stylesheet" type="text/css" href="oit.css">-->
<script src="oit.js"></script>
<title>Oracle Web View Export Test</title>
</head>
<body>
<div id="container"></div>
<script type="text/javascript">
$(document).ready(function(){
console.log("Document ready");
var viewContainer = document.getElementById("container");
OIT.view.attach(viewContainer);
OIT.view.load("adobe-acrobat.html");
});
OIT.document.addEventListener("load", function (evt) {
console.log("Just loaded: " + evt.detail.url);
});
И вот код, который преобразует документ (C #):
try
{
OutsideIn.OutsideIn.InstallLocation = new DirectoryInfo(Environment.CurrentDirectory + "\\Resources");
}
catch (Exception uhoh)
{
Console.WriteLine(uhoh.Message);
}
Exporter exporter = OutsideIn.OutsideIn.NewLocalExporter();
try
{
exporter.SetPerformExtendedFI(false);
exporter.SetFontReferenceMethod(Options.FontReferenceMethodValue.ReferenceExported);
/* The FONTDIRECTORY option must be set. */
List<DirectoryInfo> FontDirectories = new List<DirectoryInfo>();
DirectoryInfo SystemFontsDirectory = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.Fonts));
FontDirectories.Add(SystemFontsDirectory);
exporter.SetFontDirectories(FontDirectories);
exporter.SetWebViewStructure(Options.WebViewStructureValue.AjaxStreamed);
//exporter.SetPerformExtendedFI(true);
exporter.SetSourceFile(file);
exporter.SetDestinationFile(newoutputPath + "\\" + Path.GetFileNameWithoutExtension(file) + ".html");
exporter.SetDestinationFormat(FileFormat.FI_HTML5);
}
catch (Exception fail)
{
Console.WriteLine("Fail: " + fail.Message);
Console.ReadLine();
}
Console.WriteLine("Exporting: " + file);
exporter.Export();
Я искал много понятий о том, что является причиной проблемы, но я не могу ничего найти.Документация, предоставленная Oracle, невелика, поэтому я в растерянности.Более двух лет назад на форумах поддержки Oracle была опубликована статья, посвященная именно этой проблеме, но решение не найдено.
Буду признателен за любые идеи или предложения.