method PdfDocument.prototype.encodeimport { PdfDocument } from "https://deno.land/x/skia_canvas@0.5.2/src/pdfdocument.ts"; encode()Encodes the PDF into a buffer and closes the stream. Changes cannot be made to PDF after this.