Open xyzbilal opened 3 weeks ago
Hi @xyzbilal, At present, we do not support exporting a page as an image using the PdfPage API. However, you can extract the PDF page as an image using the syncfusion_flutter_pdfviewer package.
You can find the sample code in the issue #1879. Please confirm us whether the solution worked for you
Actually this is not exact solution because it requires ui and in serverpod server side ui is not available. I was looking for solution without importing dart ui. Your suggestion works in client side. if you do not have solution in pdf then we will implement this in client site with pdf viewer. thanks.
Unfortunately, extracting the PDF page image without using the Dart UI library is not currently possible. If you need further assistance or have other questions, please feel free to ask.
Use case
Create thumbnail of pdf for certain page.
Proposal
Hi, I m workin on a e-newspaper app with serverpod and I try to create an image thumbnail when user uploads a pdf, I want to get first page and create jpeg image from it. its possible to create with pdfrx page on client site but because it requires flutter ui, I cant use it server side. My question is if I can get Uint8List data of page in pdf. I share my example function for reference. regards.