PdfViewer.PrintDocument as Text (NOT Image)

Hi Support,
PrintedLetter.pdf (263.4 KB)

OriginalLetter.pdf (111.3 KB)

We are using Aspose.PDF.PdfViewer.PrintDocument() function as below

Dim doc As New Aspose.Pdf.Document(New MemoryStream(pdfContent))
Dim pdfViewer As New PdfViewer(doc)
pdfViewer.PrintDocument()

What we found is the Print out version is in Image format (Can not highlight Text)
Our virtual printer scans for text (address…) so since it’s an image it can’t do this.

See the example i’ve attached, the “OriginalLetter.pdf” you can select text in acrobat reader, but “PrintedLetter.pdf” is printed as an image, and you can’t select any text.

Please let me know how can I print PDFs as Text?

@bensonruanccg
For Aspose.Pdf.Drawing - at the moment it is possible to print only as an image (due to internal features). This is planned to be fixed.
In Aspose.Pdf (without Drawing) there is no this restriction; by default, printing should go without converting to an image

We are not referencing aspose.pdf.Drawing at all.

What appear to be happening is within PdfViewer it convert to image internally, as prior to PdfViewer.PrintDocument() the document is all good i.e. text selectable, searchable.

Although we can set pdfViewer.PrintAsImage=False, the output is still graphic.

The version of aspose.pdf is 21.12.0.

@shuqing
Why is it using such an old version, try with the latest version 23.11.