I am converting PDF to HTML.
Hi Yehuday,
my purpose was not to convert to MHT.
…
…
yehuday:
my purpose was not to convert to MHT.my question was if I have option to get the CSS values by In-page Style Tags or inline style attributein the html file instead of external css file ( )Tיק Desired result:
....
....
The issues you have found earlier (filed as PDFNEWNET-36608) have been fixed in Aspose.Pdf for .NET 9.6.0.
Hi Yehuday,
Thanks for your patience.
To accomplish your requirement, you can use the following code snippet:
[C#]
Document doc = new Document(@"F:\ExternalTestsData\36608.pdf");
// Instantiate HTML Save options object
HtmlSaveOptions newOptions = new HtmlSaveOptions();
// Set parts embedding mode
newOptions.PartsEmbeddingMode = HtmlSaveOptions.PartsEmbeddingModes.EmbedCssOnly;
// Set letters positioning method for optimization in IE
newOptions.LettersPositioningMethod = HtmlSaveOptions.LettersPositioningMethods.UseEmUnitsAndCompensationOfRoundingErrorsInCss;
// Set raster images saving mode
newOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
// Set font saving mode
newOptions.FontSavingMode = HtmlSaveOptions.FontSavingModes.SaveInAllFormats;
// Output file path
string outHtmlFile = @"F:\ExternalTestsData\36340.html";
doc.Save(outHtmlFile, newOptions);