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

TOPIC:

Saving Documents created a 0 bytes pdf 9 years 1 month ago #8584

  • clavarreda
  • clavarreda's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
  • Thank you received: 0
This is more a question than a complain.

We developed an app for book reading. We encrypt the books and before the pdf library read them we decrypt them and pass the decrypted path of the file to the radaee library. After the Document.Open method executes we delete the pdf file assuming that the library stores a copy in some tmp/cache dir.

The questions are

1. Does the radaee library store a copy of the pdf in some cache/tmp dir during the Document.Open execution?
2. Does the radaee library rely only on that cached/copied pdf to save the pdf during the Document.Save and Document.SaveAs execution?
3. Is there any scenario where the radaee library could produce a 0 size document on saving?

Thanks for your time

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

Saving Documents created a 0 bytes pdf 9 years 1 month ago #8596

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
1. SDK not copy whole PDF file into memory.or storage. Document.SetCache used for some inserted objects like images, or imported page resources.
2. when saving, it save new objects(new annotation or others object) to storage.or PDFStream
3. Document.Create() and then Document.SetCache can create a new PDF file.

u can use PDFMemStream and Document.OpenStream to open a pdf file in memory, it can be saved
after saved, u can get back bytes array(PDFMemStream.get_data) and length(PDFMemStream.get_size) as result.

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

Last edit: by radaee.
  • Page:
  • 1
Powered by Kunena Forum