Skip to main content

It returns a visualforce Page Reference in PDF form - base64 encoded binary data

The getContentAsPDF() method belongs to the PageReference Apex class,

It returns the page in PDF form base64 encoded binary data, regardless of the apex:page component’s renderAs attribute.

The return type for the method is - Blob (Binary large object)