hi. when i upload PDF file and try to make it HTML,
i get empty spaces,
i give you the code and the file
if lcase(fileType)="pdf" then
Dim docNewSteam As New MemoryStream()
Dim docHtmla As New Aspose.pdf.Document(htmlStream)
Dim doc As new Aspose.Pdf.Document(htmlStream)
Dim htmlOptions As new Aspose.Pdf.HtmlSaveOptions()
' init MarginPartStyle with margin in 20 points
Dim commonMargin As New Aspose.Pdf.SaveOptions.MarginPartStyle(20)
' init MarginPartStyle with margin value auto
Dim autoMargin As New Aspose.Pdf.SaveOptions.MarginPartStyle(true)
' set commonMargin to every page side
htmlOptions.PageMarginIfAny = new Aspose.Pdf.HtmlSaveOptions.MarginInfo(commonMargin)
'set horizontal page align to center
htmlOptions.PageMarginIfAny.LeftMarginIfAny = autoMargin
htmlOptions.PageMarginIfAny.RightMarginIfAny = autoMargin
htmlOptions.PartsEmbeddingMode = Aspose.Pdf.HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml
htmlOptions.LettersPositioningMethod = 0 '//LettersPositioningMethods.UseEmUnitsAndCompensationOfRoundingErrorsInCss
htmlOptions.RasterImagesSavingMode = Aspose.Pdf.HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground
'' htmlOptions.PreventGlyphsGrouping = True
'' htmlOptions.SimpleTextboxModeGrouping = True
htmlOptions.BatchSize = 640
doc.Save(docNewSteam, htmlOptions)
Dim PageInfo As New PageInfo()
doc.PageInfo.Width = 640
Dim htmlPdfReader As New StreamReader(docNewSteam, Encoding.GetEncoding(65001))
docNewSteam.Seek(0, SeekOrigin.Begin)
htmlCv = htmlPdfReader.ReadToEnd()
htmlPdfReader.Close()
sarit.pdf (166.7 KB)