flutter_pdf_render icon indicating copy to clipboard operation
flutter_pdf_render copied to clipboard

Get current page size synchronously

Open jjochen opened this issue 2 years ago • 4 comments

Is there a way to get the current pdf page size synchronously? As getPage recently became async, it can't be used in synchronous methods anymore. Is there another way?

jjochen avatar Aug 28 '23 09:08 jjochen

try to use controller.currentPageNumber

anggaaryas avatar Nov 27 '23 04:11 anggaaryas

try to use controller.currentPageNumber

And how would I get the page size from there?

jjochen avatar Nov 27 '23 05:11 jjochen

controller.pageCount

anggaaryas avatar Nov 27 '23 05:11 anggaaryas

controller.pageCount

What I meant ist size of the current page as in width and height.

jjochen avatar Nov 27 '23 15:11 jjochen