Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF

TOPIC:

how to undo the changes at pdf files. 8 years 2 months ago #10222

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
I have tested it with the last version of the library and even with nexus 4 the library works properly.
Can you reproduce this issue with the demo project? With all of your pdfs?
If yes, can you please send us one of them?

Please Log in or Create an account to join the conversation.

how to undo the changes at pdf files. 8 years 2 months ago #10227

  • ankur123987
  • ankur123987's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Available as freelancer (ex website to app 30min)
  • Posts: 97
  • Thank you received: 0
Sure ,i am using this sample pdf
www.allianz.com.ar/sites/default/files/productos/Granizo.pdf.

i use this code for undo m_view.PDFUndo();
i used ink object after draw different shapes . i tried undo to go back previous shapes but its shows " No more undo" feature

Please Log in or Create an account to join the conversation.

how to undo the changes at pdf files. 8 years 2 months ago #10260

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
now I understand what you mean.

If you tap the ink button once and you draw a line, a triangle, a square or what you want, then you tap the ink button to add it to pdf, then when you click the "undo button" it removes all these elements because they are part of the same ink.

If you tap the ink button, you draw a line, you tap the ink button to add this line to the pdf, you retap the ink button then draw a square then re-tap the button, these two elements are two differents inks and when you tap the undo button the first time it removes the square, the second time you click undo it removes the line.

Please Log in or Create an account to join the conversation.

how to undo the changes at pdf files. 8 years 2 months ago #10265

  • ankur123987
  • ankur123987's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Available as freelancer (ex website to app 30min)
  • Posts: 97
  • Thank you received: 0
Thank you for reply.

Yes you are right..yes its work for different instance of ink but imagine a scenario where user wants to undo the last created shape without losing all drawn shapes . if i use another ink instance it will undo all shapes . or is there any way to delete particular drawn shape . . similar to onlongpressed on that shape and delete ? is it feasible?

anyway thanks a lot for understanding my issue and respond on that

Please Log in or Create an account to join the conversation.

how to undo the changes at pdf files. 8 years 2 months ago #10266

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
yes you can use the following method and delete the instances of the ink that you want
m_annot.RemoveFromPage()

Please Log in or Create an account to join the conversation.

how to undo the changes at pdf files. 8 years 2 months ago #10269

  • ankur123987
  • ankur123987's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Available as freelancer (ex website to app 30min)
  • Posts: 97
  • Thank you received: 0
but how can i implement the onLOngpressedclicklistner at pdf . i am implement the PDFView.PDFViewListener interface but the method OnPDFSingleTapped is never called please help

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum