You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GroupDocs.Viewer Cloud API enables you to to render documents using single API call, passing input file in the request body, and getting result file stream in the response.
13
+
This example demonstrates how to render document without using cloud storage.
14
+
15
+
Method parameters:
16
+
17
+
|Name|Type|Description|Comment
18
+
|---|---|---|---
19
+
|format|string|Requested conversion format: HTML, JPG, PNG or PDF|Required.
20
+
|File|binary|Input file to convert|Form data, Required
21
+
|pages|string|Pages range to render, like "1,2" or "3-5,10"|Default value : all pages
22
+
|password|string|Input document password|Required for password-protected documents.
23
+
24
+
## Resource URI
25
+
26
+
```HTTP PUT ~/convertAndDownload```
27
+
28
+
[Swagger UI](https://reference.groupdocs.cloud/viewer/) lets you call this REST API directly from the browser.
29
+
30
+
## cURL example
31
+
32
+
{{< tabs "example1">}}
33
+
{{< tab "Request" >}}
34
+
```bash
35
+
# First get JSON Web Token
36
+
# Please get your Client Id and Client Secret from https://dashboard.groupdocs.cloud/applications. Kindly place Client Id in "client_id" and Client Secret in "client_secret" argument.
The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list [here](https://github.com/groupdocs-viewer-cloud).
61
+
62
+
{{< tabs "example1-sdk">}}
63
+
{{< tab "C#" >}}
64
+
```cs
65
+
// For complete examples and data files, please go to https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-dotnet-samples
66
+
stringMyClientSecret=""; // Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
67
+
stringMyClientId=""; // Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
@@ -17,44 +17,122 @@ Not all options are supported by all document formats. Each option may correspon
17
17
### RenderOptions example
18
18
19
19
```json
20
-
{
20
+
{
21
21
"StartPageNumber": 0,
22
22
"CountPagesToRender": 0,
23
+
"PagesToRender": [
24
+
0
25
+
],
26
+
"PageRotations": [
27
+
{
28
+
"PageNumber": 0,
29
+
"RotationAngle": "On90Degree"
30
+
}
31
+
],
23
32
"DefaultFontName": "string",
24
33
"DefaultEncoding": "string",
34
+
"DetectEncoding": true,
25
35
"RenderComments": true,
36
+
"RenderNotes": true,
26
37
"RenderHiddenPages": true,
27
38
"SpreadsheetOptions": {
28
39
"PaginateSheets": true,
29
40
"CountRowsPerPage": 0,
41
+
"CountColumnsPerPage": 0,
30
42
"RenderGridLines": true,
31
43
"RenderEmptyRows": true,
32
44
"RenderEmptyColumns": true,
33
45
"RenderHiddenRows": true,
34
46
"RenderHiddenColumns": true,
35
-
"RenderPrintAreaOnly": true
47
+
"RenderHeadings": true,
48
+
"RenderPrintAreaOnly": true,
49
+
"TextOverflowMode": "Overlay"
36
50
},
37
51
"CadOptions": {
38
52
"ScaleFactor": 0,
39
53
"Width": 0,
40
-
"Height": 0
54
+
"Height": 0,
55
+
"Tiles": [
56
+
{
57
+
"StartPointX": 0,
58
+
"StartPointY": 0,
59
+
"Width": 0,
60
+
"Height": 0
61
+
}
62
+
],
63
+
"RenderLayouts": true,
64
+
"LayoutName": "string",
65
+
"Layers": [
66
+
"string"
67
+
]
41
68
},
42
69
"EmailOptions": {
43
-
"PageSize": "string",
70
+
"PageSize": "Unspecified",
44
71
"FieldLabels": [
45
72
{
46
73
"Field": "string",
47
74
"Label": "string"
48
75
}
49
-
]
76
+
],
77
+
"DateTimeFormat": "string",
78
+
"TimeZoneOffset": "string"
50
79
},
51
80
"ProjectManagementOptions": {
52
-
"PageSize": "string",
53
-
"TimeUnit": "string",
54
-
"StartDate": "2019-02-26T10:48:23.911Z",
55
-
"EndDate": "2019-02-26T10:48:23.911Z"
81
+
"PageSize": "Unspecified",
82
+
"TimeUnit": "Unspecified",
83
+
"StartDate": "2024-03-25T06:24:32.674Z",
84
+
"EndDate": "2024-03-25T06:24:32.674Z"
85
+
},
86
+
"PdfDocumentOptions": {
87
+
"DisableCharsGrouping": true,
88
+
"EnableLayeredRendering": true,
89
+
"EnableFontHinting": true,
90
+
"RenderOriginalPageSize": true,
91
+
"ImageQuality": "Low",
92
+
"RenderTextAsImage": true,
93
+
"FixedLayout": true,
94
+
"WrapImagesInSvg": true,
95
+
"DisableFontLicenseVerifications": true
96
+
},
97
+
"WordProcessingOptions": {
98
+
"RenderTrackedChanges": true,
99
+
"LeftMargin": 0,
100
+
"RightMargin": 0,
101
+
"TopMargin": 0,
102
+
"BottomMargin": 0
103
+
},
104
+
"OutlookOptions": {
105
+
"Folder": "string",
106
+
"TextFilter": "string",
107
+
"AddressFilter": "string",
108
+
"MaxItemsInFolder": 0
109
+
},
110
+
"ArchiveOptions": {
111
+
"Folder": "string",
112
+
"FileName": "string",
113
+
"ItemsPerPage": 0
114
+
},
115
+
"TextOptions": {
116
+
"MaxCharsPerRow": 0,
117
+
"MaxRowsPerPage": 0
118
+
},
119
+
"MailStorageOptions": {
120
+
"TextFilter": "string",
121
+
"AddressFilter": "string",
122
+
"MaxItems": 0
123
+
},
124
+
"VisioRenderingOptions": {
125
+
"RenderFiguresOnly": true,
126
+
"FigureWidth": 0
127
+
},
128
+
"WebDocumentOptions": {
129
+
"PageSize": "Unspecified",
130
+
"LeftMargin": 0,
131
+
"RightMargin": 0,
132
+
"TopMargin": 0,
133
+
"BottomMargin": 0
56
134
}
57
-
}
135
+
}
58
136
59
137
```
60
138
@@ -79,10 +157,44 @@ Not all options are supported by all document formats. Each option may correspon
79
157
|CadOptions.ScaleFactor|The scale factor affects the size of an output document.
80
158
|CadOptions.Width|The width of the render result in pixels.
81
159
|CadOptions.Height|The height of the render result in pixels.
82
-
|EmailOptions.PageSize|The size of the output page when rendering as PDF or image.Supported values {Unknown|Letter|Ledger|A0|A1|A2|A3}: 1. Unknown - the default, unspecified page size. 2. Letter - the size of the Letter page in points is 792x612.3. Ledger - the size of the Letter page in points is 1224x792. 4. A0 - the size of the A0 page in points is 3371x2384. 5. A1 - the size of the A1 page in points is 2384x1685. 6. A2 - the size of the A2 page in points is 1684x1190. 7. A3 - the size of the A3 page in points is 1190x842. 8. A4 - the size of the A4 page in points is 842x595.
83
-
|EmailOptions.FieldLabels|The list of supported email message field labels
84
-
|ProjectManagementOptions.PageSize|The size of the page. Supported values {Unknown|Letter|A0|A1|A2|A3}: 1. Unknown - the default, unspecified page size. 2. Letter - the size of the Letter page in points is 792 × 612. 3. Ledger - the size of the Letter page in points is 1224 × 792. 4. A0 - the size of the A0 page in points is 3371 × 2384. 5. A1 - the size of the A1 page in points is 2384 × 1685. 6. A2 - the size of the A2 page in points is 1684 × 1190. 7. A3 - the size of the A3 page in points is 1190 × 842. 8. A4 - the size of the A4 page in points is 842 × 595.
85
-
|ProjectManagementOptions.TimeUnit|The time unit to use as minimal point.
86
-
Supported values {Unknown|Days|ThirdsOfMonths|Months}: 1. Unknown - unknown, unspecified time scale. 2. Days - one day interval. 3. ThirdsOfMonths - one third of the month. 4. Months - one month interval.
160
+
|EmailOptions.PageSize|The size of the output page when rendering as PDF or image.Supported values {Unknown,Letter,Ledger,A0,A1,A2,A3}: 1. Unknown - the default, unspecified page size. 2. Letter - the size of the Letter page in points is 792x612.3. Ledger - the size of the Letter page in points is 1224x792. 4. A0 - the size of the A0 page in points is 3371x2384. 5. A1 - the size of the A1 page in points is 2384x1685. 6. A2 - the size of the A2 page in points is 1684x1190. 7. A3 - the size of the A3 page in points is 1190x842. 8. A4 - the size of the A4 page in points is 842x595.
161
+
|EmailOptions.FieldLabels|The list of supported email message field labels.
162
+
|EmailOptions.DateTimeFormat|Time Format (can be include TimeZone) for example: 'MM d yyyy HH:mm tt', if not set - current system format is used.
163
+
|EmailOptions.TimeZoneOffset|Message time zone offset. Format should be compatible with .net TimeSpan
164
+
|ProjectManagementOptions.PageSize|The size of the page. Supported values {Unknown,Letter,A0,A1,A2,A3}: 1. Unknown - the default, unspecified page size. 2. Letter - the size of the Letter page in points is 792 × 612. 3. Ledger - the size of the Letter page in points is 1224 × 792. 4. A0 - the size of the A0 page in points is 3371 × 2384. 5. A1 - the size of the A1 page in points is 2384 × 1685. 6. A2 - the size of the A2 page in points is 1684 × 1190. 7. A3 - the size of the A3 page in points is 1190 × 842. 8. A4 - the size of the A4 page in points is 842 × 595.
165
+
|ProjectManagementOptions.TimeUnit|The time unit to use as minimal point. Supported values {Unknown,Days,ThirdsOfMonths,Months}: 1. Unknown - unknown, unspecified time scale. 2. Days - one day interval. 3. ThirdsOfMonths - one third of the month. 4. Months - one month interval.
87
166
|ProjectManagementOptions.StartDate|The start date of a Gantt Chart View to render.
88
167
|ProjectManagementOptions.EndDate|The end date of a Gantt Chart View to render.
168
+
|PdfDocumentOptions.DisableCharsGrouping|Disables chars grouping to keep maximum precision during chars positioning when rendering the page.
169
+
|PdfDocumentOptions.EnableLayeredRendering|Enables rendering of text and graphics according to z-order in original PDF document when rendering into HTML.
170
+
|PdfDocumentOptions.EnableFontHinting|Enables font hinting. The font hinting adjusts the display of an outline font. Supported only for TTF fonts when these fonts are used in source document.
171
+
|PdfDocumentOptions.RenderOriginalPageSize|When this option enabled the output pages will have the same size in pixels as page size in a source PDF document. By default GroupDocs.Viewer calculates output image page size for better rendering quality. This option is supported when rendering into PNG or JPG formats.
172
+
|PdfDocumentOptions.ImageQuality|Specifies output image quality for image resources when rendering into HTML. The default value is Low.
173
+
|PdfDocumentOptions.RenderTextAsImage|When this option is set to true, the text is rendered as an image in the output HTML. Enable this option to make text unselectable or to fix characters rendering and make HTML look like PDF. The default value is false. This option is supported when rendering into HTML.
174
+
|PdfDocumentOptions.FixedLayout|Enables rendering the PDF and EPUB documents to HTML with a fixed layout.
175
+
|PdfDocumentOptions.WrapImagesInSvg|Enables wrapping each image in the output HTML document in SVG tag to improve the output quality.
176
+
|PdfDocumentOptions.DisableFontLicenseVerifications|Disables any license restrictions for all fonts in the current XPS/OXPS document.
|WordProcessingOptions.LeftMargin|Left page margin (for HTML rendering only).
179
+
|WordProcessingOptions.RightMargin|Right page margin (for HTML rendering only).
180
+
|WordProcessingOptions.TopMargin|Top page margin (for HTML rendering only).
181
+
|WordProcessingOptions.BottomMargin|Bottom page margin (for HTML rendering only).
182
+
|OutlookOptions.Folder|The name of the folder (e.g. Inbox, Sent Item or Deleted Items) to render.
183
+
|OutlookOptions.TextFilter|The keywords used to filter messages.
184
+
|OutlookOptions.AddressFilter|The email-address used to filter messages by sender or recipient.
185
+
|OutlookOptions.MaxItemsInFolder|The maximum number of messages or items, that can be rendered from one folder.
186
+
|ArchiveOptions.Folder|The folder inside the archive to be rendered.
187
+
|ArchiveOptions.FileName|The filename to display in the header. By default the name of the source file is displayed.
188
+
|ArchiveOptions.ItemsPerPage|Number of records per page (for rendering to HTML only).
189
+
|TextOptions.MaxCharsPerRow|Max chars per row on page. Default value is 85.
190
+
|TextOptions.MaxRowsPerPage|Max rows per page. Default value is 55.
191
+
|MailStorageOptions.TextFilter|The keywords used to filter messages.
192
+
|MailStorageOptions.AddressFilter|The email-address used to filter messages by sender or recipient.
193
+
|MailStorageOptions.MaxItems|The maximum number of messages or items for render. Default value is 0 - all messages will be rendered.
194
+
|VisioRenderingOptions.RenderFiguresOnly|Render only Visio figures, not a diagram.
195
+
|VisioRenderingOptions.FigureWidth|Figure width, height will be calculated automatically. Default value is 100.
196
+
|WebDocumentOptions.PageSize|The size of the output page. The default value is GroupDocs.Viewer.Options.PageSize.Letter 792 x 612 points. When contents does not fit set a larger page size e.g. GroupDocs.Viewer.Options.PageSize.A3.
197
+
|WebDocumentOptions.LeftMargin|The distance (in points) between the left edge of the page and the left boundary of the body text. The default value is 5 points.
198
+
|WebDocumentOptions.RightMargin|The distance (in points) between the right edge of the page and the left boundary of the body text. The default value is 5 points.
199
+
|WebDocumentOptions.TopMargin|The distance (in points) between the top edge of the page and the left boundary of the body text. The default value is 5 points.
200
+
|WebDocumentOptions.BottomMargin|The distance (in points) between the bottom edge of the page and the left boundary of the body text. The default value is 5 points.
0 commit comments