Get a file preview or a specific page in a file
preview.
Available to Guest Users
35.0
Signature
public static ConnectApi.FilePreview getFilePreview(String
communityId, String fileId, ConnectApi.FilePreviewFormat previewFormat, Integer
startPageNumber, Integer endPageNumber)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- fileId
- Type: String
- ID of the file.
- previewFormat
- Type: ConnectApi.FilePreviewFormat
- Specifies the format of the file preview.
-
Pdf—Preview format is PDF.
-
Svg—Preview format is compressed
SVG.
-
Thumbnail—Preview format is 240
x 180 PNG.
-
ThumbnailBig—Preview format is
720 x 480 PNG.
-
ThumbnailTiny—Preview format is
120 x 90 PNG.
- startPageNumber
- Type: Integer
- The starting page number in the range of file preview URLs.
- endPageNumber
- Type: Integer
- The ending page number in the range of file preview URLs.