This repository has been archived by the owner on Aug 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 418
PdfiumViewer Delete page #195
Comments
It's late, but maybe you can paste your codes here. I've used DeletePage, works fine |
Thanks for returning my request.
I am using the below code
// PdfRenderer does not support changes to the loaded document,
// so we fake it by reloading the document into the renderer.
int page = pdfViewer1.Renderer.Page;
var document = pdfViewer1.Document;
pdfViewer1.Document = null;
document.DeletePage(page);
pdfViewer1.Document = document;
pdfViewer1.Renderer.Page = page;
//--so what is happening here is after execution of this delete code the viewer deleting the current page and the last page of the file. Also other thing I saw was it duplicating the 2nd page of the view after the delete operation.
So if you delete page 1 out 40 page file .. t his delete operation will delete page 1 and page 40. And refresh the view with duplicate of 2nd page. So user will thing that delete operation is fine but its not this code deletes the wrong page and make one extra page which wrong.
If you don’t see issue like this please point me toward the fix .
Thanks,
Syed Ahmed | Manager IT and System
Oristech (o) 830-515-4308 | (f) 830-625-7240 |[email protected] <mailto:[email protected]> | <http://www.oristech.com/> www.oristech.com
From: iimax <[email protected]>
Sent: Thursday, June 27, 2019 9:28 PM
To: pvginkel/PdfiumViewer <[email protected]>
Cc: oristech <[email protected]>; Author <[email protected]>
Subject: Re: [pvginkel/PdfiumViewer] PdfiumViewer Delete page (#195)
It's late, but maybe you can paste your codes here. I've used DeletePage, works fine
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#195?email_source=notifications&email_token=AHVHMEOS7FPRGLLZ5HGJLBTP4VZKLA5CNFSM4HIFZYTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYY325Q#issuecomment-506576246> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHVHMENOWJSPT6HAZMBF6WTP4VZKLANCNFSM4HIFZYTA> . <https://github.com/notifications/beacon/AHVHMEK574ZLVJGGX7NOBELP4VZKLA5CNFSM4HIFZYTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYY325Q.gif>
|
I can reproduce the issue, but do not found a fix yet. I think the problem is in |
Thanks a lot. I m currently a complex workaround. I m deleting pages using PDFBox then re loading the file in the viewer. This is very resource intensive process. It wud be much appreciated if this issue resolved.
Syed Ahmed | Manager IT and System
Oristech (o) 830-515-4308 | (f) 830-625-7240 |[email protected] <mailto:[email protected]> | <http://www.oristech.com/> www.oristech.com
From: iimax <[email protected]>
Sent: Monday, July 8, 2019 9:26 PM
To: pvginkel/PdfiumViewer <[email protected]>
Cc: oristech <[email protected]>; Author <[email protected]>
Subject: Re: [pvginkel/PdfiumViewer] PdfiumViewer Delete page (#195)
I can reproduce the issue, but do not found a fix yet. I think the problem is in PdfFile.DeletePage(int pageNumber) . Tried dump page bitmap/ GetPdfText after DeletePage, same issue.
I'm still working on it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#195?email_source=notifications&email_token=AHVHMELYPLRVISIPOAUDC6TP6PZKBA5CNFSM4HIFZYTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZO4JGQ#issuecomment-509461658> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHVHMELAF26RGRVQHW7G7ZLP6PZKBANCNFSM4HIFZYTA> . <https://github.com/notifications/beacon/AHVHMENX2XC746RR2I4A47TP6PZKBA5CNFSM4HIFZYTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZO4JGQ.gif>
|
After some digging, thought the bug is in the core. I add deletePage in "PdfiumViewer.Demo\MainForm.cs" OpenFile() |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
when I delete current page viewer duplicates the next page and deletes the last page from the viewer.
The text was updated successfully, but these errors were encountered: