How to convert and view TGZ files

TGZ files are TAR (Tape-ARchiver) GZipped archive files, they contain TAR archive compressed with GZip. GZip format used DEFLATE algorithm for compression of archive. This format applying compression on the complete archive, not on individual files.
Extension: TGZ or TAR.GZ.

TGZ archives can be opened with WinRar.

Archive in WinRar

How to convert TGZ archive files

Convert archive files to multiple pages HTML

To convert archive files to multiple pages HTML with GroupDocs.Viewer for .NET use following code:

using (Viewer viewer = new Viewer("sample.tar.gz"))
{
       HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources("output_page_{0}.html");
       viewer.View(options);
}

The following screenshot shows the output HTML file opened in a browser.

Multiple pages HTML converted archive

Convert archive files to single HTML

To convert archive files to single page HTML with GroupDocs.Viewer for .NET use following code:

using (Viewer viewer = new Viewer("sample.tar.gz"))
{
       HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources("output.html");
       options.RenderToSinglePage = true;
       viewer.View(options);
}

The following screenshot shows the output HTML file opened in a browser.

Single page HTML converted zip

Convert archive files to JPG

To convert archive files to JPG with GroupDocs.Viewer for .NET use following code:

using (Viewer viewer = new Viewer("sample.tar.gz"))
{
       JpgViewOptions options = new JpgViewOptions("output_page_{0}.jpg");
       viewer.View(options);
}

The following screenshot shows the output JPG file opened in a Windows Photo Viewer application.

JPEG converted archive

Convert archive files to PNG

To convert archive files to PNG with GroupDocs.Viewer for .NET use following code:

using (Viewer viewer = new Viewer("sample.tar.gz"))
{
       PngViewOptions options = new PngViewOptions("output_page_{0}.png");
       viewer.View(options);
}

The following screenshot shows the output PNG file opened in a Windows Photo Viewer application.

PNG converted archive

Convert archive to PDF

To convert Roshal Archive files to PDF with GroupDocs.Viewer for .NET use following code:

using (Viewer viewer = new Viewer("sample.tar.gz"))
{
       PdfViewOptions options = new PdfViewOptions("output.pdf");
       viewer.View(options);
}

The following screenshot shows the output PDF file opened in an Acrobat Reader.

PDF converted archive

More resources

View Archive Files Online

Along with full-featured .NET library we provide simple but powerful free online Apps. View ZIP and TAR files online with GroupDocs Viewer App.

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples: