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

TOPIC:

PDF AES stream 9 years 8 months ago #6712

  • Gracanin
  • Gracanin's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 25
  • Thank you received: 0
I tried the PDFAESEncOld from PDFEncAct and that works, makes an encrypted file that is opened with the reader. I do not see how PDFAESStream class works, especially the ImportFromFile and ExportToFile, these methods seem unfinished.

Can you, please, post the code that takes a PDF file, saves an encrypted version to disk and then opens the encrypted file and renders it? All this using code in version 2.9.10

1. open file1.pdf
2. save encrypted file1.pdf to file1encrypted.pdf
3. open file1encrypted.pdf and render it on screen.

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

PDF AES stream 9 years 8 months ago #6718

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
codes are commented in ReaderActivity.java
like:
        byte key[] = new byte[16];
        stream.open("/sdcard/ttt.pdf", key);
        stream.ImportFromFile("/sdcard/test.pdf");
        stream.ExportToFile("/sdcard/test1.pdf");
        stream.close();
    	{
            //int ret = doc.OpenStream(stream, null);
            int ret = doc.Open("/sdcard/test1.pdf", null);

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

  • Page:
  • 1
  • 2
Powered by Kunena Forum