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

Free Support Forum - aspose.com

Aspose.PDF removes text when converting to image

Hello,
I’ve got some problems while converting a PDF to an JPEG image. It looks like the text gets removed, while converting the file.
This is how it looks in the original PDF:
Original (1.5 KB)
And this is how it looks like after Aspose.PDF converted it:
Converted (1.5 KB)

Am I missing a parameter or something else?

Aspose.Pdf.License license = new Aspose.Pdf.License();
license.SetLicense(@"license.lic");

using (Aspose.Pdf.Document pdf = new Aspose.Pdf.Document(pdfContentStream))
{
	Aspose.Pdf.Devices.Resolution res = new Aspose.Pdf.Devices.Resolution(150);
	Aspose.Pdf.Devices.JpegDevice image = new Aspose.Pdf.Devices.JpegDevice(res);

	image.Process(pdf.Pages[1], imageStream);
}

return imageStream.ToArray();

@Programmierung

Thank you for contacting support.

The code snippet works fine for other documents we have tested with, so the problem appears to be document specific. Please ensure using Aspose.PDF for .NET 19.4 in your environment. In case the issue persists then share source PDF file with us so that we may try to reproduce and investigate it.