Replies: 1 comment 1 reply
-
Basically, pdfrx's structure is designed only for viewer. Explaining in more implementation specific things, pdf_pdfium.dart is the actual implementation of PdfDocument and it initializes page array on its first initialization. If you change something of the document after PdfDocument initialization, the change is not propagated to the PdfDocument instance. So, in the current moment, the only possible solution is to recreate PdfDocument/PdfViewer from the modified file or data. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First, thank you for pdfrx! It's working well for me so far.
My application displays PDFs but also allows the user to delete one or more pages. I tried using Pdfium thru ffi to delete a page and that works (confirmed by calling PDFium getpagecount afterward).
But, the problem is that nothing on the pdfrx side knows about that change. It still tracks the original pages. I'm assuming it's because Dart is pass by value and my delete is only modifying a copy (ahh, the multiverse, lol).
Is there a way I can go about adding a page delete and sync up pdfrx with PDFium's changed document short of modifying the pdfrx source and rebuilding everything? I've been playing around with multiple approaches and can't seem to get that modified (in memory) document back for use with pdfrx.
Beta Was this translation helpful? Give feedback.
All reactions