- Posts: 3
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
Decrypt PDF for saving
IP: 192.168.0.71
8 years 3 months ago - 8 years 3 months ago #13233
by xAVx
Decrypt PDF for saving was created by xAVx
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(
;
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();
}
}
}
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(
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();
}
}
}
Last edit: 8 years 3 months ago by xAVx.
IP: 192.168.0.71
8 years 3 months ago #13235
by Davide
Replied by Davide on topic Decrypt PDF for saving
Hi,
I suggest you to use
Make sure to save the pdf to a new correct path.
For more info check this : www.radaeepdf.com/documentation/javadocs...lang.String-boolean-
I suggest you to use
Code:
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-
IP: 192.168.0.71
8 years 3 months ago #13237
by xAVx
Replied by xAVx on topic Decrypt PDF for saving
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!
Thanks!
IP: 192.168.0.71
8 years 3 months ago - 8 years 3 months ago #13252
by nermeen
Replied by nermeen on topic Decrypt PDF for saving
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.
No, Currently we do not support .NET desktop applications, we support UWP.
Last edit: 8 years 3 months ago by nermeen.
IP: 192.168.0.71
8 years 3 months ago #13254
by nermeen
Replied by nermeen on topic Decrypt PDF for saving
If you are interested in desktop apps, you can open a ticket in the
support tickets area
and address it to RadaeePDF Sales
IP: 192.168.0.71
8 years 3 months ago #13255
by xAVx
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
Replied by xAVx on topic Decrypt PDF for saving
nermeen wrote: 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
Time to create page: 0.377 seconds