Members
(static, constant) SupportedMediaTypes
- Description:
Supported source file formats for CreatePDFOperation.
- Deprecated:
- Since version 1.1.0; Use SupportedSourceFormat instead.
Properties:
Name | Type | Description |
---|---|---|
bmp |
string | Represents "image/bmp" media type |
doc |
string | Represents "application/msword" media type |
docx |
string | Represents "application/vnd.openxmlformats-officedocument.wordprocessingml.document" media type |
gif |
string | Represents "image/gif" media type |
html |
string | Represents "text/html" media type |
jpeg |
string | Represents "image/jpeg" media type |
jpg |
string | Represents "image/jpeg" media type |
png |
string | Represents "image/png" media type |
ppt |
string | Represents "application/vnd.ms-powerpoint" media type |
pptx |
string | Represents "application/vnd.openxmlformats-officedocument.presentationml.presentation" media type |
rtf |
string | Represents "text/rtf" media type |
tif |
string | Represents "image/tiff" media type |
tiff |
string | Represents "image/tiff" media type |
txt |
string | Represents "text/plain" media type |
xls |
string | Represents "application/vnd.ms-excel" media type |
xlsx |
string | Represents "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" media type |
zip |
string | Represents "application/zip" media type |
Supported source file formats for CreatePDFOperation.
(static, constant) SupportedSourceFormat
- Description:
Supported source file formats for CreatePDFOperation.
Properties:
Name | Type | Description |
---|---|---|
bmp |
string | Represents "image/bmp" media type |
doc |
string | Represents "application/msword" media type |
docx |
string | Represents "application/vnd.openxmlformats-officedocument.wordprocessingml.document" media type |
gif |
string | Represents "image/gif" media type |
html |
string | Represents "text/html" media type |
jpeg |
string | Represents "image/jpeg" media type |
jpg |
string | Represents "image/jpeg" media type |
png |
string | Represents "image/png" media type |
ppt |
string | Represents "application/vnd.ms-powerpoint" media type |
pptx |
string | Represents "application/vnd.openxmlformats-officedocument.presentationml.presentation" media type |
rtf |
string | Represents "text/rtf" media type |
tif |
string | Represents "image/tiff" media type |
tiff |
string | Represents "image/tiff" media type |
txt |
string | Represents "text/plain" media type |
xls |
string | Represents "application/vnd.ms-excel" media type |
xlsx |
string | Represents "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" media type |
zip |
string | Represents "application/zip" media type |
Supported source file formats for CreatePDFOperation.
Methods
(static) createNew() → {CreatePDFOperation}
- Description:
Constructs a CreatePDFOperation instance.
Returns:
A new CreatePDFOperation instance.
- Type
- CreatePDFOperation
setInput(sourceFileRefnon-null)
- Description:
Sets an input file.
Parameters:
Name | Type | Description |
---|---|---|
sourceFileRef |
FileRef | An input file. |
setOptions(options)
- Description:
Sets the conversion parameters for this operation.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Conversion parameters; use null for default values. The type of this parameter depends
on the source format of the file which is being converted to PDF. For example, for HTML to PDF conversions,
the type will be CreatePDFFromHtmlOptions. For other supported options, refer the |
execute(contextnon-null) → {Promise.<FileRef>}
- Description:
Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved to the actual path). See FileRef for how temporary resources are cleaned up.
Parameters:
Name | Type | Description |
---|---|---|
context |
ExecutionContext | The context in which the operation will be executed. |
Throws:
-
-
if an API call results in an error response.
- Type
- ServiceApiError
-
-
-
if service usage limits have been reached or credentials quota has been exhausted.
- Type
- ServiceUsageError
-
Returns:
A promise which resolves to the operation result.
- Type
- Promise.<FileRef>