Convert to PDF. Unzip

J

Jim Andersen

I am going to build a webapp. Our users are not allowed to download certain
files, so I need to show files in a directory (.doc, .ppt, ???) and the user
can then convert them to PDF and download that PDF to his PC instead of the
original.

If it's a zip-archive they should be able to unzip the file, and then maybe
PDF the files in the zip-archive.

Any tips, suggestions, links to products etc are most welcome.

/jim
 
P

Peter Rilling

Well, when you say that you show the files in a directory, do you mean you
literally allow the user to browse a folder on the website, or you provide
some UI that displays a list of files they can download.

On way to do this might be to render the hyperlinks so they point to a proxy
file rather than the actual file. For instance, the URL might look like
"mydomain.com/download.aspx?filename=something.pdf". This allows the file
download.aspx to do whatever processing it needs before sending it to the
browser. The special processing in this case would be to zip the contents.
You can check out SharpZip which is a free zip component for .NET. Once
zipped, then you can stream the bytes to the browser which will then prompt
the user to save the file and such.
 
J

Jim Andersen

Thansk for the feedback, Peter,

Peter Rilling said:
Well, when you say that you show the files in a directory, do you mean you
literally allow the user to browse a folder on the website, or you provide
some UI that displays a list of files they can download.

I provide some UI. A listbox or something. The UI finds out who the user is,
maps that to some folder, and then displays (in the listbox) the filenames
etc. User selects a file, and then either a button called "mail this file to
me" or "unzip file" or "convert to pdf this file and then mail it to me".
You can check out SharpZip which is a free zip component for .NET.

Will do.

thx.
/jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top