Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for See what's inside a ZIP file
Atir Tahir
Atir Tahir

Posted on

     

See what's inside a ZIP file

Suppose you are working with the ZIP files all the time. Let's call it your business/job routine or process. Someone uploads ZIP files everyday to the server and you have to find specific documents in them.
Normally, you woulddownload the ZIP files and extract them or open them using any archiving tool (e.g. WinZip) and look for the right ZIP that contains the required file(s).

How about getting compressed files information without downloading them?
Suppose, you have 20+ different formatted files compressed in DailyFiles.ZIP.

Alt Text

This is how you can view the compressed files in your Web application (there's no need to download the ZIP):

Alt Text

Have a look at the code below:

stringoutputDirectory=@"D:/";stringpageFilePathFormat=Path.Combine(outputDirectory,"page_{0}.html");using(Viewerviewer=newViewer(@"D:/DailyFiles.zip")){HtmlViewOptionsoptions=HtmlViewOptions.ForEmbeddedResources(pageFilePathFormat);viewer.View(options);}
Enter fullscreen modeExit fullscreen mode

This document viewerAPI basically renders the source file into HTML. Later, this resultant HTML could be displayed in the browser or any other application (e.g. Desktop). In case of any issue for further details, you can raise your concernshere.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Software developer and evangelist.
  • Location
    Pakistan
  • Education
    BS Computer Science
  • Work
    Developer Evangelist at GroupDocs
  • Joined

More fromAtir Tahir

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp