Render 7-Zip files
Leave feedback
7Z files are 7-Zip archives files.
The 7-Zip format used various compression algorithms: bzip2, PPMd, LZMA2, LZMA, and others.
Extension: 7z.
7Z archives can be opened with WinRar/7Zip.
To convert archive files to multiple pages HTML with GroupDocs.Viewer for Java use following code:
try (Viewer viewer = new Viewer("sample.7z")) {
HtmlViewOptions options = HtmlViewOptions.forEmbeddedResources("output_page_{0}.html");
viewer.view(options);
}
The following screenshot shows the output HTML file opened in a browser.
To convert archive files to single page HTML with GroupDocs.Viewer for Java use following code:
try (Viewer viewer = new Viewer("sample.7z")) {
HtmlViewOptions options = HtmlViewOptions.forEmbeddedResources("output.html");
options.setRenderToSinglePage(true);
viewer.view(options);
}
The following screenshot shows the output HTML file opened in a browser.
To convert archive files to JPG with GroupDocs.Viewer for Java use following code:
try (Viewer viewer = new Viewer("sample.7z")) {
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.
To convert archive files to PNG with GroupDocs.Viewer for Java use following code:
try (Viewer viewer = new Viewer("sample.7z")) {
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.
To convert Roshal Archive files to PDF with GroupDocs.Viewer for Java use following code:
try (Viewer viewer = new Viewer("sample.7z")) {
PdfViewOptions options = new PdfViewOptions("output.pdf");
viewer.view(options);
}
The following screenshot shows the output PDF file opened in an Acrobat Reader.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.