We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Save aspose.pdf image base64

i want to save the image from pdf doc. when i open

this is my code.
how can i do it?

if lcase(fileType)="pdf" then
              Dim htmlCv As String
              Dim docHtml As New Aspose.pdf.Document(htmlStream)
              Dim textAbsorber As New TextAbsorber()
              docHtml.Pages.Accept(textAbsorber)
              Dim extractedText As String = textAbsorber.Text
              htmlCv = extractedText
              'htmlCv = Replace(htmlCv, vbcrlf, "<br>")
              'htmlCv = Replace(htmlCv, "Evaluation Only. Created with Aspose.Pdf. Copyright 2002-2017 Aspose Pty Ltd.", "")

              Response.Write(htmlCv)

@eranlipi

Would you please explain a bit more about your requirements. Do you want to convert a PDF document into image or extract images from PDF document? We will share our feedback accordingly.

hi @asad.ali .
i try to make pdf to html. and i want to save the images that inside the Pdf file

@eranlipi

Please use following code snippet to embed images as base64 data in HTML. It will help you to accomplish the task.

Document doc =  new  Document(“the_little_prince.pdf”);
HtmlSaveOptions htmlOptions =  new HtmlSaveOptions();
htmlOptions.PartsEmbeddingMode = HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml;
htmlOptions.LettersPositioningMethod = LettersPositioningMethods.UseEmUnitsAndCompensationOfRoundingErrorsInCss;
htmlOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
doc.save("the_little_prince.html", htmlOptions); 
1 Like