Skip to content

Commit c62928d

Browse files
authored
Standardized readme.md
1 parent bbe9ef6 commit c62928d

1 file changed

Lines changed: 84 additions & 46 deletions

File tree

README.md

Lines changed: 84 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,59 @@
1-
# GroupDocs.Viewer Cloud SDK for Java
2-
This repository contains GroupDocs.Viewer Cloud SDK for Java source code. This SDK allows you to work with GroupDocs.Viewer Cloud REST APIs in your Java applications.
1+
![](https://img.shields.io/badge/api-v2.0-lightgrey) [![GitHub license](https://img.shields.io/github/license/groupdocs-viewer-cloud/groupdocs-viewer-cloud-java)](https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-java/blob/master/LICENSE)
32

4-
## Requirements
3+
# Java SDK to View Documents in the Cloud
4+
5+
[GroupDocs.Viewer Cloud SDK for Java](https://products.groupdocs.cloud/viewer/java) wraps GroupDocs.Viewer RESTful APIs so you may integrate Document Viewing features in your own apps with zero initial cost.
6+
7+
GroupDocs.Viewer REST API allows the developers to view & render a number of popular files formats including Word documents, Excel spreadsheets, PowerPoint presentations, CAD drawings, Visio diagram, PDF, OpenDocument formats, emails & images.
8+
9+
## Document Viewer Services in REST
10+
11+
- 90+ supported file formats.
12+
- View documents as PDF, HTML or images.
13+
- Render documents as raster & vector images.
14+
- Render documents with comments & notes.
15+
- Flip or rotate documents pages at 90, 180 or 270 degrees.
16+
- Reorder document pages.
17+
- Render hidden, consecutive or selected document pages.
18+
- Watermark PDF, image or HTML output pages.
19+
- Render with custom fonts as well as replace any missing fonts.
20+
- Load password-protected documents.
21+
- Extract attachment information such as attachment count & names.
22+
- Extract document information like file format, page count, size and visibility, text coordinates, and so on.
23+
- Integrated storage API.
24+
25+
Check out the [Developer's Guide](https://docs.groupdocs.cloud/viewer/developer-guide/) to know more about GroupDocs.Viewer REST API.
26+
27+
## Microsoft File Formats
28+
29+
**Microsoft Word:** DOC, DOCM, DOCX, DOT, DOTM, DOTX\
30+
**Microsoft Excel:** XLS, XLSX, XLSB, XLSM\
31+
**Microsoft PowerPoint:** PPTX, PPTM, PPT, PPSX, PPSM, PPS, POTX, POTM\
32+
**Microsoft Project:** MPP, MPT\
33+
**Microsoft Outlook:** MSG, OST, PST\
34+
**Microsoft Visio:** VDW, VDX, VSD, VSDM, VSDX, VSS, VSSM, VSSX, VST, VSTM, VSTX, VSX, VTX\
35+
**Microsoft OneNote:** ONE
36+
37+
## Other Formats
38+
39+
**Page Layout Formats:** PDF, XPS, TEX\
40+
**OpenDocument:** ODT, OTT, ODS, OTS, ODP, OTP\
41+
**CAD:** DNG, DWF, DWG, DXF, IDC, STL\
42+
**Images:** BMP, CGM, DCM, DJVU, EMP, EPS, GIF, ICO, JP2, JPG, ODG, PCL, PNG, PS, PSD, SVG, TIFF, WEBP, WMF\
43+
**Web:** HTML, MHT, MHTML\
44+
**Emails:** EML, EMLX\
45+
**eBooks:** EPUB, MOBI\
46+
**Others:** TXT, RTF, CSV, TSV
47+
48+
## Get Started with GroupDocs.Viewer Cloud SDK for Java
49+
50+
First create an account at [GroupDocs for Cloud](https://dashboard.groupdocs.cloud/) and get your application information. Next, follow the steps as below.
51+
52+
### Requirements
553

654
Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
755

8-
## Installation
56+
### Installation
957

1058
To install the API client library to your local Maven repository, execute:
1159

@@ -21,9 +69,9 @@ mvn deploy
2169

2270
Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
2371

24-
### Maven users
72+
#### Maven
2573

26-
Add following repository and dependency to your project's POM
74+
Add following repository and dependency to your project's POM.
2775

2876
```xml
2977
<repository>
@@ -42,53 +90,43 @@ Add following repository and dependency to your project's POM
4290
</dependency>
4391
```
4492

45-
### Others
46-
47-
At first generate the JAR by executing:
93+
#### Others
4894

49-
mvn package
50-
51-
Then manually install the following JARs:
95+
At first generate the JAR by executing `mvn package`, then manually install the following JARs.
5296

5397
* target/groupdocs-viewer-cloud-20.5.jar
5498
* target/lib/*.jar
5599

56-
## Getting Started
57-
58-
Please follow the [installation](#installation) instruction and execute the following Java code:
100+
## Protect PDF while Rendering DOCX as PDF
59101

60102
```java
61-
import com.groupdocs.cloud.viewer.client.*;
62-
import com.groupdocs.cloud.viewer.model.*;
63-
import com.groupdocs.cloud.viewer.api.InfoApi;
64-
65-
import java.util.*;
66-
67-
public class ApiExample {
68-
69-
public static void main(String[] args) {
70-
//TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).
71-
String appSid = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
72-
String appKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
73-
74-
Configuration configuration = new Configuration(appSid, appKey);
75-
76-
InfoApi infoApi = new InfoApi(configuration);
77-
78-
try {
79-
FormatsResult response = infoApi.getSupportedFileFormats();
80-
for (Format format : response.getFormats()) {
81-
System.out.println(format.getFileFormat());
82-
}
83-
} catch (ApiException e) {
84-
System.err.println("Failed to get supported file formats");
85-
e.printStackTrace();
86-
}
87-
}
88-
}
103+
// For complete examples and data files, please go to https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-java-samples
104+
String MyAppKey = ""; // Get AppKey from https://dashboard.groupdocs.cloud
105+
String MyAppSid = ""; // Get AppSID from https://dashboard.groupdocs.cloud
106+
107+
Configuration configuration = new Configuration(MyAppSid, MyAppKey);
108+
ViewApi apiInstance = new ViewApi(configuration);
109+
110+
FileInfo fileInfo = new FileInfo();
111+
fileInfo.setFilePath("SampleFiles/sample.docx");
112+
ViewOptions viewOptions = new ViewOptions();
113+
viewOptions.setFileInfo(fileInfo);
114+
viewOptions.setViewFormat(ViewFormatEnum.PDF);
115+
PdfOptions renderOptions = new PdfOptions();
116+
renderOptions.setPermissions(PermissionsEnum.DENYMODIFICATION);
117+
renderOptions.setPermissionsPassword("p123");
118+
renderOptions.setDocumentOpenPassword("o123");
119+
viewOptions.setRenderOptions(renderOptions);
120+
121+
ViewResult response = apiInstance.createView(new CreateViewRequest(viewOptions));
89122
```
90123

91-
## Licensing
92-
All GroupDocs.Viewer Cloud SDKs are licensed under [MIT License](LICENSE).
93124

94-
[Home](https://www.groupdocs.cloud/) | [Product Page](https://products.groupdocs.cloud/viewer/java) | [Docs](https://docs.groupdocs.cloud/viewer/) | [Demos](https://products.groupdocs.app/viewer/family) | [API Reference](https://apireference.groupdocs.cloud/viewer/) | [Examples](https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-java-samples) | [Blog](https://blog.groupdocs.cloud/category/viewer/) | [Free Support](https://forum.groupdocs.cloud/c/viewer) | [Free Trial](https://purchase.groupdocs.cloud/trial)
125+
## GroupDocs.Viewer Cloud SDKs in Popular Languages
126+
127+
| .NET | Java | PHP | Python | Ruby | Node.js | Android |
128+
|---|---|---|---|---|---|---|
129+
| [GitHub](https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-dotnet) | [GitHub](https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-java) | [GitHub](https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-php) | [GitHub](https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-python) | [GitHub](https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-ruby) | [GitHub](https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-node) | [GitHub](https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-android) |
130+
| [NuGet](https://www.nuget.org/packages/GroupDocs.Viewer-Cloud/) | [Maven](https://repository.groupdocs.cloud/webapp/#/artifacts/browse/tree/General/repo/com/groupdocs/groupdocs-viewer-cloud) | [Composer](https://packagist.org/packages/groupdocscloud/groupdocs-viewer-cloud) | [PIP](https://pypi.org/project/groupdocs-viewer-cloud/) | [GEM](https://rubygems.org/gems/groupdocs_viewer_cloud) | [NPM](https://www.npmjs.com/package/groupdocs-viewer-cloud) | [Maven](https://repository.groupdocs.cloud/webapp/#/artifacts/browse/tree/General/repo/com/groupdocs/groupdocs-viewer-cloud-android) |
131+
132+
[Home](https://www.groupdocs.cloud/) | [Product Page](https://products.groupdocs.cloud/viewer/java) | [Documentation](https://docs.groupdocs.cloud/viewer/) | [Live Demo](https://products.groupdocs.app/viewer/total) | [API Reference](https://apireference.groupdocs.cloud/viewer/) | [Code Samples](https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-java-samples) | [Blog](https://blog.groupdocs.cloud/category/viewer/) | [Free Support](https://forum.groupdocs.cloud/c/viewer) | [Free Trial](https://dashboard.groupdocs.cloud)

0 commit comments

Comments
 (0)