Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 23rd, 2014, 04:44 AM
Registered User
 
Join Date: Apr 2014
Posts: 8
Thanks: 1
Thanked 1 Time in 1 Post
Default How to Open Encrypted PDF file in ASPX

Hi,

I'm looking for a sample code or library file/components to open the encrypted PDF file in web application (ASPX). The web application is written using Visual Studio 2003 (.netframework v1.14).

Appreciate anybody advice and recommendation.

Thanks.

Best Regards,
HL
 
Old April 24th, 2014, 12:20 AM
Friend of Wrox
 
Join Date: Feb 2014
Posts: 136
Thanks: 1
Thanked 10 Times in 10 Posts
Default

You would need to know how (encryption algo used) the file data was encrypted and the key and IV used to encrypted the data. If you know these things, apply the decryption methods to the file data prior to writing it to the response stream.

Last edited by mmorgan30; April 24th, 2014 at 12:28 AM..
 
Old April 24th, 2014, 01:38 AM
Registered User
 
Join Date: Apr 2014
Posts: 8
Thanks: 1
Thanked 1 Time in 1 Post
Default

Hi,

The PDF file is protected/Encrypted with password. I want to open this PDF file with the application directly because the application know the password to open the PDF file instead of asking the user to enter the password.
The Following User Says Thank You to ht055 For This Useful Post:
mmorgan30 (April 26th, 2014)
 
Old April 26th, 2014, 08:29 PM
Friend of Wrox
 
Join Date: Feb 2014
Posts: 136
Thanks: 1
Thanked 10 Times in 10 Posts
Default

Do you know how the file is encrypted?
Are you wanting your ASP.net application to decrypt it and IIS serve it?

Last edited by mmorgan30; April 26th, 2014 at 08:38 PM..
 
Old April 27th, 2014, 03:32 AM
Registered User
 
Join Date: Apr 2014
Posts: 8
Thanks: 1
Thanked 1 Time in 1 Post
Default

I want the asp.net application to open the PDF file by pass-in the password because the PDF file is protected with password.

Any help...
 
Old April 27th, 2014, 09:21 PM
Friend of Wrox
 
Join Date: Feb 2014
Posts: 136
Thanks: 1
Thanked 10 Times in 10 Posts
Default

what do you mean "by passing in the password" like in a control like a password text box?

There are lots of pdf libraries out that can be leveraged, if you dont have a pdf library right now to handel your encrypting and decrypting needs, Check docotic pdf it should give you what you need.

Since your application needs to decrypt the file prior to serving it, you will need to add a linkbutton so that you can implement the onclick event to handle decryption and writing to the repsonse stream.


Since you have not given any details about the encrypted file i'll show you how to implement response writing in the click event.

Code:
protected void LinkButton1_Click(object sender, EventArgs e)
{

      // code for you pdf work here


      // now write pdf data to the response stream
      Response.Clear();
      Response.Headers["Content-Type"] = "application/pdf";
      Response.Headers["Content-Length"] = pdfData.Length;
      Response.BinaryWrite(pdfData);
      Response.End();
}

Last edited by mmorgan30; April 27th, 2014 at 10:34 PM..
 
Old April 28th, 2014, 02:27 AM
Registered User
 
Join Date: Apr 2014
Posts: 8
Thanks: 1
Thanked 1 Time in 1 Post
Default

Hi,

The Docotic.Pdf Library is for .NET 2.0 and later frameworks.

I'm looking for library for .NET 1.1.

I refresh my question:

I have a PDF file. The PDF file is embedded with user and owner password.

I want to open this PDF file in asp.net application written in .netframework version 1.1.

I'm looking for sample programming code or any library file that can support .netframework version 1.1 to open this PDF file in asp.net application.

The library file that i'm looking should have a property "Password". So the application can set the "password" and ask the library file to open the PDF file without asking the user to enter the password.
 
Old April 28th, 2014, 04:49 AM
Registered User
 
Join Date: Apr 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to JudyHaar
Default Premium Garcinia Extract - Lose fat easily and effectively

I was in a constant search of that one prominent weight loss product that could help me become slim, trim and healthy. And, I got lucky to get Premium Garcinia Extract.
click for more info:- https://storify.com/nicolrpsneiman/p...ght-loss-formu
 
Old April 28th, 2014, 06:11 AM
Registered User
 
Join Date: Apr 2014
Posts: 8
Thanks: 1
Thanked 1 Time in 1 Post
Default

JodyHaar,

Your posting is not related to the question!!!!!
 
Old April 28th, 2014, 10:28 AM
Registered User
 
Join Date: Apr 2014
Posts: 8
Thanks: 1
Thanked 1 Time in 1 Post
Default

yes.... any recommendation on the .net library to support .netframework 1.1?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I upload a PDF file on AddEditReview.aspx page? southside123 BOOK: Beginning ASP.NET 4.5 : in C# and VB 13 April 27th, 2014 08:42 AM
open pdf file within aspx page shaktis General .NET 3 November 2nd, 2007 12:58 PM
open a pdf file viren_balaut J2EE 0 January 26th, 2004 10:50 PM
open a pdf file viren_balaut Servlets 0 January 24th, 2004 01:03 AM
open a pdf file in browser viren_balaut Pro JSP 0 January 12th, 2004 01:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.