-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial documentation for Node.js product
- Loading branch information
1 parent
d6596b2
commit 2755300
Showing
34 changed files
with
2,863 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
id: home | ||
url: viewer/nodejs-java | ||
title: GroupDocs.Viewer for Node.js via Java | ||
linkTitle: GroupDocs.Viewer for Node.js | ||
weight: 1 | ||
description: "GroupDocs.Viewer for Node.js allows you to render documents in various formats as HTML, PDF, JPEG, and PNG files. You do not need to use third-party software to view files within your JavaScript application." | ||
keywords: render files, view files, HTML, PDF, JPEG, PNG | ||
productName: GroupDocs.Viewer for Node.js via Java | ||
hideChildren: True | ||
fullWidth: True | ||
--- | ||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAABNWlDQ1BJQ0MgUHJvZmlsZQAAeJxjYGAyYYCC3LySoiB3J4WIyCgF9nsMbAwsDIIM2gwWicnFBQyYgBHB/HYNwrusi0UdIcCVklqcDKT/AHFlUnZBCdDoCiBbpLwEzO4BsZMLikDsBUC2aBHQgUD2DpB4OoR9BsROgr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FBgZ0UZDgH/pUaEEMK5XT+YNHoxOIitXA68D/fSprtOwG3gAWK1npSaADw4d5vdlYc8kRspq4EJgLhB7Ib/Ohxt4HtEmujofOP2if7i4mIeK1Qsqx4D+iBSmH+lZaRzxKUKhVVknXwdOewtYUF7Owl26Jv/uAm5AqFadTYNHGxG/+QYMdP7CXbvPfA2cW1bGwt26Z4CvQnR8bgI26V25jmxC/MahtMm0GcXC3buZW1YWuN9nwOPgVK5CrEgaDXr1TTVDRghuzCOMbF0tebV8Bwvadm8N2rh3FRXx1AWDMBknwnguMBm4CwguyR1/VCIk2RYSJ1PlMjBz23b+csp+BSE9e0NBAS8OvgSbSklWjbAgpptvA8YRv2KWdYhx+7eBvxFHaypdPh+PbtrMJx3k9FVd2qWZmbw+dCg5NuVtUHQmGTEr9iNEJ8pofeNyhP7Op8A62hQ444lqVysPrF/PVoWdSVXf2wvsdhYOH0ZxBLt5akwh8IO2v8GIgMjRqK5qhMM3IXZZ+ZoYT8/GmvKGBib/8xsqWpRXioX1cLebzcy6qJSbw9i+zSAygQGIYDgPKEKIX2a3/dkQd5J2YWEn4sp1ATVtf5WI1KsdCKfvBHTf3Dca3j90iKe2bKUlyK5p/w9m6w1Xzjs4fQAAAABJRU5ErkJggg==" alt="groupdocs-viewer-java-home" align="left" style="width:110px; margin: 0 30px 30px 0"/> | ||
|
||
<dt class="flex flex-wrap align-center gdoc-props__meta"> | ||
<a href='https://www.npmjs.com/package/@groupdocs/groupdocs.viewer/v/23.8.0'> | ||
<span class="gdoc-props__tag tip">Latest version 23.8.0 (August 2023)</span> | ||
</a> | ||
</dt> | ||
|
||
{{< button style="primary" link="https://releases.groupdocs.com/viewer/nodejs-java/release-notes/" >}} <svg class="gdoc-icon gdoc-product-doc__btn-icon"><use xlink:href="/img/groupdocs-stack.svg#document"></use></svg> Release notes {{< /button >}} | ||
{{< button style="primary" link="https://www.npmjs.com/package/@groupdocs/groupdocs.viewer/" >}} {{< icon "gdoc_download" >}} Package repository {{< /button >}} | ||
|
||
GroupDocs.Viewer for Node.js is a powerful, high-performance, and cross-platform library that allows you to build desktop and web [file viewer applications](https://en.wikipedia.org/wiki/File_viewer). | ||
|
||
GroupDocs.Viewer supports over [170 popular file formats](/viewer/nodejs-java/supported-document-formats). Load text documents, spreadsheets, presentations, PDF files, web pages, email messages, and images and render/display them in HTML, PDF, PNG, and JPEG formats. You can render the entire document or specific pages. | ||
|
||
GroupDocs.Viewer ships with a wide range of options that allow you to control the rendering process and customize the output files. For example, you can protect the output PDF file and reorder its pages, generate responsive HTML pages, adjust the size and quality of output images, add text watermarks, and cache the results. | ||
|
||
------ | ||
|
||
{{< columns >}} | ||
<p><b>About GroupDocs.Viewer</b></p> | ||
<hr><p>OVERVIEW</p></hr> | ||
<ul> | ||
<li><a href='{{< ref "/viewer/nodejs-java/product-overview.md" >}}'>Product overview</a></li> | ||
<li><a href='{{< ref "/viewer/nodejs-java/getting-started/features-overview" >}}'>Main features</a></li> | ||
<li><a href='{{< ref "/viewer/nodejs-java/getting-started/supported-document-formats.md" >}}'>Supported file formats</a></li> | ||
</ul> | ||
|
||
<p>GET STARTED</p> | ||
<ul> | ||
<li><a href='{{< ref "/viewer/nodejs-java/getting-started/system-requirements.md" >}}'>System requirements</a></li> | ||
<li><a href='{{< ref "/viewer/nodejs-java/getting-started/installation.md" >}}'>Installation</a></li> | ||
<li><a href='{{< ref "/viewer/nodejs-java/getting-started/licensing-and-subscription.md" >}}'>Licensing</a></li> | ||
</ul> | ||
|
||
<---> | ||
|
||
<p><b>Developer Guide</b></p> | ||
<hr><p>RENDERING BASICS</p></hr> | ||
<ul> | ||
<li><a href='{{< ref "viewer/nodejs-java/rendering-basics/render-word-documents.md" >}}'>Render Word documents</a></li> | ||
<li><a href='{{< ref "viewer/nodejs-java/rendering-basics/render-spreadsheets/render-excel-and-apple-numbers-spreadsheets.md" >}}'>Render spreadsheet files</a></li> | ||
<li><a href='{{< ref "viewer/nodejs-java/rendering-basics/render-presentations.md" >}}'>Render presentations</a></li> | ||
<li><a href='{{< ref "viewer/nodejs-java/rendering-basics/render-pdf-documents.md" >}}'>Render PDF files</a></li> | ||
<li><a href='{{< ref "viewer/nodejs-java/rendering-basics/render-web-documents.md" >}}'>Render web documents</a></li> | ||
<li><a href='{{< ref "viewer/nodejs-java/rendering-basics/render-text-files.md" >}}'>Render text and code files</a></li> | ||
<li><a href='{{< ref "viewer/nodejs-java/rendering-basics/render-images.md" >}}'>Render images</a></li> | ||
</ul> | ||
|
||
<p>HOW-TO GUIDES</p> | ||
<ul> | ||
<li><a href='{{< ref "/viewer/nodejs-java/developer-guide/loading-documents/loading-documents-from-different-sources/_index.md" >}}'>Load documents from different sources</a></li> | ||
<li><a href='{{< ref "/viewer/nodejs-java/developer-guide/retrieving-document-information/how-to-get-file-type-and-pages-count.md" >}}'>Retrieve document information</a></li> | ||
<li><a href='{{< ref "viewer/nodejs-java/developer-guide/processing-attachments/how-to-extract-and-save-attachments.md" >}}'>Extract and save attachments</a></li> | ||
<li><a href='{{< ref "viewer/nodejs-java/developer-guide/rendering-documents/add-text-watermark.md" >}}'>Add text watermarks</a></li> | ||
<li><a href='{{< ref "viewer/nodejs-java/developer-guide/caching-results/_index.md" >}}'>Cache rendering results</a></li> | ||
</ul> | ||
|
||
<p>API REFERENCE</p> | ||
<ul> | ||
<li><a href="https://reference.groupdocs.com/viewer/nodejs-java/">GroupDocs.Viewer for Java API Reference</a></li> | ||
</ul> | ||
|
||
<---> | ||
|
||
<p><b>Useful Resources</b></p> | ||
<hr><p>DEMOS AND EXAMPLES</p></hr> | ||
<ul> | ||
<li><a href="https://products.groupdocs.app/viewer/total">View documents online</a></li> | ||
<li><a href="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Node.js-via-Java">Download examples and demos from GitHub</a></li> | ||
<li><a href='{{< ref "/viewer/nodejs-java/getting-started/how-to-run-examples.md" >}}'>How to run examples</a></li> | ||
</ul> | ||
|
||
<p>VERSION HISTORY</p> | ||
<ul> | ||
<li><a href='https://releases.groupdocs.com/viewer/nodejs-java/release-notes/'>GroupDocs.Viewer for Java Release Notes</a></li> | ||
</ul> | ||
|
||
<p>TECHNICAL SUPPORT</p> | ||
<ul> | ||
<li><a href="https://forum.groupdocs.com/">Free Support Forum for GroupDocs Products</a></li> | ||
<li><a href="https://helpdesk.groupdocs.com/">Paid Support Helpdesk for GroupDocs Products</a></li> | ||
</ul> | ||
|
||
{{< /columns >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
id: developer-guide | ||
url: viewer/nodejs-java/developer-guide | ||
title: Developer Guide | ||
weight: 4 | ||
description: "Explains GroupDocs.Viewer for Node.js file viewer features and shows how to view PDF, Word, Excel, PowerPoint documents inside your JavaScript applications" | ||
keywords: GroupDocs.Viewer Developer Guide, GroupDocs.Viewer Java Developer Guide, GroupDocs.Viewer Developer Guide Java, Using GroupDocs.Viewer for Node.js, GroupDocs.Viewer for Node.js use cases | ||
productName: GroupDocs.Viewer for Node.js via Java | ||
hideChildren: False | ||
isMenuItemWithNoContent: True | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
id: caching-results | ||
url: viewer/nodejs-java/caching-results | ||
title: Cache results | ||
weight: 5 | ||
keywords: caching,caching results,groupdocs.viewer | ||
description: "This article contains caching use-cases with GroupDocs.Viewer within your JavaScript applications." | ||
productName: GroupDocs.Viewer for Node.js via Java | ||
hideChildren: False | ||
--- | ||
Caching saves rendering results to a specified location, such as a local disk. When you re-request the rendering results, GroupDocs.Viewer does not render again, but uses the cached results. | ||
As a document can take a long time to render, use caching if you expect to reuse the rendering results. | ||
|
||
To enable caching, follow these steps: | ||
|
||
1. Instantiate the desired cache object (for example, [FileCache](#) to store document rendering results at the local drive) | ||
2. Instantiate the [ViewerSettings](#) object. Specify the cache object as a parameter of the constructor. | ||
3. Instantiate the [Viewer](#) object. Specify the [ViewerSettings](#) object as a parameter of the constructor. | ||
4. Call the [view()](#) method of the [Viewer](#) class. | ||
|
||
The following code snippet shows how to enable caching and displays the difference between rendering a file and getting the cached results: | ||
|
||
{{< tabs "example1">}} | ||
{{< tab "JavaScript" >}} | ||
```js | ||
const cachePath = "cache"; | ||
const cache = new FileCache(cachePath); | ||
const settings = new ViewerSettings(cache); | ||
|
||
const viewer = new groupdocs.viewer.Viewer("sample.docx", settings) | ||
const options = HtmlViewOptions.forEmbeddedResources(); | ||
const currentTimeMillis = Date.now() | ||
|
||
viewer.view(options); | ||
currentTimeMillis = Date.now() - currentTimeMillis | ||
console.log("Time taken on first call to View method " + currentTimeMillis + " (ms).") | ||
currentTimeMillis = Date.now() | ||
|
||
viewer.view(options) | ||
currentTimeMillis = Date.now() - currentTimeMillis | ||
console.log("Time taken on second call to View method " + currentTimeMillis + " (ms).") | ||
``` | ||
{{< /tab >}} | ||
{{< /tabs >}} | ||
|
||
The following image shows a sample console output: | ||
|
||
 | ||
|
||
For details, please refer to the following pages: |
10 changes: 10 additions & 0 deletions
10
...oper-guide/loading-documents/loading-documents-from-different-sources/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
id: loading-documents-from-different-sources | ||
url: viewer/nodejs-java/loading-documents-from-different-sources | ||
title: Load documents from different sources | ||
weight: 1 | ||
description: "This article contains document loading use-cases with GroupDocs.Viewer within your JavaScript applications." | ||
keywords: | ||
productName: GroupDocs.Viewer for Node.js via Java | ||
hideChildren: False | ||
--- |
19 changes: 19 additions & 0 deletions
19
nodejs-java/developer-guide/processing-attachments/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
id: working-with-attachments | ||
url: viewer/nodejs-java/working-with-attachments | ||
title: Process attachments | ||
weight: 4 | ||
description: "Processing email attachments, embedded files, and compressed files with GroupDocs.Viewer for JavaScript" | ||
keywords: email attachments, embedded files, compressed files | ||
productName: GroupDocs.Viewer for Node.js via Java | ||
hideChildren: False | ||
--- | ||
|
||
Using GroupDocs.Viewer, you can list and save the following attachments: | ||
|
||
* Email attachments | ||
* Files embedded in PDF files | ||
* Email messages contained by Outlook, LotusNotes and other storage files | ||
* Compressed files | ||
|
||
See following examples on how to process document attachments in more details: |
34 changes: 34 additions & 0 deletions
34
...a/developer-guide/processing-attachments/how-to-extract-and-save-attachments.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
id: how-to-extract-and-save-attachments | ||
url: viewer/nodejs-java/how-to-extract-and-save-attachments | ||
title: Save attachments | ||
weight: 2 | ||
description: "Save attachments and embedded files from PDF, Outlook data file or email" | ||
keywords: Save attachments, embedded files from PDF, Outlook data file | ||
productName: GroupDocs.Viewer for Java | ||
hideChildren: False | ||
--- | ||
To get and save attachments, follow these steps: | ||
|
||
1. Instantiate the [Viewer](#) object. Specify a file that contains attachments. | ||
2. Call the [getAttachments](#) method. It returns the attachment collection. | ||
3. Iterate through the collection. To save an attachment, call the [saveAttachment](#) method. | ||
|
||
The following code snippet shows how to get and save all attachments from the MSG file: | ||
|
||
{{< alert style="info" >}}NOTE: provided code snippet suits all format families that support attachments: emails, Outlook data files, archives, and PDF documents.{{< /alert >}} | ||
|
||
{{< tabs "example1">}} | ||
{{< tab "JavaScript" >}} | ||
```js | ||
const viewer = new groupdocs.viewer.Viewer("with_attachments.msg") | ||
const attachments = viewer.getAttachments(); | ||
console.log('Attachments:\n'); | ||
|
||
for(let i = 0; i < attachments.size(); i++ ){ | ||
console.log(attachments.get(i).toString()); | ||
} | ||
console.log('\nAttachments retrieved successfully.'); | ||
``` | ||
{{< /tab >}} | ||
{{< /tabs >}} |
Oops, something went wrong.