public class PreviewDocumentInHtmlBytesRequest extends ObjectRequest
CosXmlRequest.OnRequestWeightListener
cosPath
bucket, noSignHeaders, noSignParams, priority, qCloudTaskStateListener, queryParameters, region, requestHeaders, requestURL, signSourceProvider
构造器和说明 |
---|
PreviewDocumentInHtmlBytesRequest(java.lang.String bucket,
java.lang.String cosPath)
预览请求构造器
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getMethod()
获取HTTP请求方法
RequestMethod |
RequestBodySerializer |
getRequestBody()
获取请求体
|
PreviewDocumentInHtmlBytesRequest |
setCopyable(boolean copyable)
是否可复制(默认为可复制)
非必选字段
|
PreviewDocumentInHtmlBytesRequest |
setHtmlParams(java.lang.String htmlParams)
|
PreviewDocumentInHtmlBytesRequest |
setSrcType(java.lang.String srcType)
指定目标文件类型,支持的文件类型请见下方
目前支持的输入文件类型包含如下格式:
演示文件:pptx、ppt、pot、potx、pps、ppsx、dps、dpt、pptm、potm、ppsm。
|
PreviewDocumentInHtmlBytesRequest |
setWatermark(java.lang.String watermark)
水印文字,需要经过 URL 安全 的 Base64 编码,默认为空
非必选字段
|
PreviewDocumentInHtmlBytesRequest |
setWatermarkColor(java.lang.String htmlfillstyle)
水印 RGBA(颜色和透明度),默认为:rgba(192,192,192,0.6)
非必选字段
|
PreviewDocumentInHtmlBytesRequest |
setWatermarkFont(java.lang.String font)
水印文字样式,默认为:bold 20px Serif
非必选字段
|
PreviewDocumentInHtmlBytesRequest |
setWatermarkHorizontal(int horizontal)
水印文字水平间距,单位 px,默认为50
非必选字段
|
PreviewDocumentInHtmlBytesRequest |
setWatermarkRotate(int rotate)
旋转角度,0~360,默认315度
非必选字段
|
PreviewDocumentInHtmlBytesRequest |
setWatermarkVertical(int vertical)
水印文字垂直间距,单位 px,默认为100
非必选字段
|
checkParameters, getContentType, getCosPath, getPath, setCosPath, setCOSServerSideEncryption, setCOSServerSideEncryptionWithCustomerKey, setCOSServerSideEncryptionWithKMS
addHeader, addNoSignHeader, addNoSignParams, addQuery, attachMetrics, getBucket, getHttpTask, getKeyTime, getMetrics, getNoSignHeaders, getNoSignParams, getPriority, getQueryEncodedString, getQueryString, getRegion, getRequestHeaders, getRequestHost, getRequestURL, getSignSourceProvider, getSTSCredentialScope, getWeight, headersHasUnsafeNonAscii, isNeedMD5, isSignInUrl, isSupportAccelerate, isSupportAccelerate, setNeedMD5, setOnRequestWeightListener, setQueryEncodedString, setQueryParameters, setRegion, setRequestHeaders, setRequestHeaders, setRequestHeaders, setRequestURL, setSign, setSign, setSign, setSign, setSign, setSignInUrl, setSignKeyTime, setSignParamsAndHeaders, setSignSourceProvider, setTask, setTaskStateListener, xmlBuilder
public PreviewDocumentInHtmlBytesRequest(java.lang.String bucket, java.lang.String cosPath)
bucket
- 文档所在存储桶cosPath
- 文档的对象键public PreviewDocumentInHtmlBytesRequest setSrcType(java.lang.String srcType)
srcType
- 指定目标文件类型public PreviewDocumentInHtmlBytesRequest setCopyable(boolean copyable)
copyable
- 是否可复制public PreviewDocumentInHtmlBytesRequest setHtmlParams(java.lang.String htmlParams)
htmlParams
- 自定义配置参数public PreviewDocumentInHtmlBytesRequest setWatermark(java.lang.String watermark)
watermark
- 水印文字public PreviewDocumentInHtmlBytesRequest setWatermarkColor(java.lang.String htmlfillstyle)
htmlfillstyle
- 水印 RGBA(颜色和透明度)public PreviewDocumentInHtmlBytesRequest setWatermarkFont(java.lang.String font)
font
- 水印文字样式public PreviewDocumentInHtmlBytesRequest setWatermarkRotate(int rotate)
rotate
- 旋转角度public PreviewDocumentInHtmlBytesRequest setWatermarkHorizontal(int horizontal)
horizontal
- 水印文字水平间距public PreviewDocumentInHtmlBytesRequest setWatermarkVertical(int vertical)
vertical
- 水印文字垂直间距public java.lang.String getMethod()
CosXmlRequest
RequestMethod
getMethod
在类中 CosXmlRequest
public RequestBodySerializer getRequestBody() throws CosXmlClientException
CosXmlRequest
getRequestBody
在类中 CosXmlRequest
CosXmlClientException
- 客户异常