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

TOPIC:

Decrypt PDF for saving 6 years 4 months ago #13233

  • xAVx
  • xAVx's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Hi,

How would i go about saving a decrypted file as a pdf instead of just opening it...ie...In the following code below.

public void loadPdfDocument(DownloadFile downloadFile) {
if (isAdded()) {
try {
String path = downloadFile.getFilePath() + "/" + downloadFile.getFileName();
this._pdfLoadingIndicator.setVisibility(8);
this._doc.Close();
int ret = this._doc.OpenStream(new PDFMemStream(PDFUtil.decryptPDF(BuildConfig.PDFPassword, path)), null);
System.gc();
if (ret == 0) {
this._reader.setVisibility(0);
this._reader.PDFOpen(this._doc, this, PDFDetailsActivity.DISPLAY_METRICS);
//I want to save a copy of the PDF into the downloads directory!
String home = System.getProperty("user.home");
this._reader.PDFSave(this._doc????

}
} catch (Exception e) {
e.printStackTrace();
}
}
}

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

Last edit: by xAVx.

Decrypt PDF for saving 6 years 4 months ago #13235

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
I suggest you to use
document.SaveAs(String path, boolean rem_sec)

Make sure to save the pdf to a new correct path.

For more info check this : www.radaeepdf.com/documentation/javadocs...lang.String-boolean-

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

Decrypt PDF for saving 6 years 4 months ago #13237

  • xAVx
  • xAVx's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Alright thanks, that worked fine. Another question I have would be that I intend to have the optoin of having a similar desktop app for my clients. Would you be able to explain how to encryption protocol is or if you have a snipped for V.B.NET to decrypt the PDF file that's encrypted? (Once i provide the password)

Thanks!

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

Decrypt PDF for saving 6 years 4 months ago #13252

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
It's not clear the algorithm you are adopting in PDFUtil.decryptPDF, but generally we support the standard encryption/decryption algorithms like AES for example. You can check Document.EncryptAs, or you can implement your own algorithm by extending PDFStream (check PDFAESStream in the demo project).

No, Currently we do not support .NET desktop applications, we support UWP.

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

Last edit: by nermeen.

Decrypt PDF for saving 6 years 4 months ago #13254

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
If you are interested in desktop apps, you can open a ticket in the support tickets area and address it to RadaeePDF Sales

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

Decrypt PDF for saving 6 years 4 months ago #13255

  • xAVx
  • xAVx's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0

It's not clear the algorithm you are adopting in PDFUtil.decryptPDF, but generally we support the standard encryption/decryption algorithms like AES for example. You can check Document.EncryptAs, or you can implement your own algorithm by extending PDFStream (check PDFAESStream in the demo project).

No, Currently we do not support .NET desktop applications, we support UWP.


Does the uwp sdk support the aes decryption? Because I took a quick look at the documentation and was unable to find the supporting function.
Also is the uwp sdk free ir paid?

Thanks

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

  • Page:
  • 1
  • 2
Powered by Kunena Forum