I am using latest version of Aspose.PDF. I am trying to convert the attached PDF file to Html. It throws error while saving the doc as html. The code I am using is given below:
PdfFileEditor pdfEditor = new PdfFileEditor();
MemoryStream[] pdfPageStreams = pdfEditor.SplitToPages(pdfStream);
for (int i = 0; i < pdfPageStreams.Length; i++)
{
MemoryStream pdfPageStream = pdfPageStreams[i];
string outFilePath = $"{guid}_{i}.html";
using (Document doc = new Document(pdfPageStream))
{
doc.Save(outFilePath, new HtmlSaveOptions
{
FixedLayout = true,
SplitIntoPages = false,
RasterImagesSavingMode = RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground,
FontSavingMode = FontSavingModes.SaveInAllFormats,
PartsEmbeddingMode = PartsEmbeddingModes.EmbedAllIntoHtml,
LettersPositioningMethod = LettersPositioningMethods.UseEmUnitsAndCompensationOfRoundingErrorsInCss
});
}
}
sample.pdf (152.0 KB)
sample.pdf (152.0 KB)
Please resolve the issue at the earliest.