https://api.apyhub.com/stamp/pdf/watermark-footers/file
POST
multipart/form-data
Attribute | Type | Mandatory | Description |
---|---|---|---|
output | String | No | The name of the output file, defaults to test-sample.pdf . |
Attribute | Type | Mandatory | Description |
---|---|---|---|
file | File | Yes | Provide the source pdf file. |
header_text | String | Yes (if header_image not given) | Input text which you want to add as Header. If header_text and header_image both are present in the request then header_text will be applied. |
footer_text | String | Yes (if footer_image not given) | Input text which you want to add as Footer. If footer_text and footer_image both are present in the request then footer_text will be applied. |
header_opacity | Float | No | Provide the level of transparency for header you want to keep from 0 to 1, defaults to 1 . |
footer_opacity | Float | No | Provide the level of transparency for footer you want to keep from 0 to 1, defaults to 1 . |
header_font_size | Number | No | Provide the font size of Header text from 8 to 24, defaults to 12 . |
footer_font_size | Number | No | Provide the font size of Footer text from 8 to 24, defaults to 12 . |
header_alignment | String | No | Provide alignment of the Header - can have the values 'left', 'right', or 'center', with the default being center . |
footer_alignment | String | No | Provide alignment of the Footer - can have the values 'left', 'right', or 'center', with the default being center . |
header_image | File | Yes (if header_text not given) | Provide the png image file which you want to add as Header. If header_text and header_image both are present in the request then header_text will be applied. |
footer_image | File | Yes (if footer_text not given) | Provide the png image file which you want to add as Footer. . If footer_text and footer_image both are present in the request then footer_text will be applied. |
watermark_text | String | Yes (if watermark_image not given) | Input text which you want to add as watermark. If watermark_text and watermark_image both are given then watermark_text will be applied. |
watermark_opacity | Float | No | Provide the level of transparency for watermark you want to keep from 0 to 0.5, defaults to 0.3 . |
watermark_font_size | Number | No | Provide the font size of watermark text, defaults to 32 , minimum watermark_font_size which user can provide is 8. |
watermark_angle | Number | No | Provide the degree at which you want to set watermark text, defaults to 0 . |
watermark_image | File | Yes (if watermark_text not given) | Provide the png image file which you want to add as watermark. If watermark_text and watermark_image both are given then watermark_text will be applied. |
watermark_image_size | Float | No | Provide size of the image watermark you want to set from 0.1 to 1, where 1 is considered as 100% of page width , defaults to 0.3 . |
header_image_size | Float | No | Provide size of the image header you want to set from 0.1 to 1, defaults to 0.1 . |
footer_image_size | Float | No | Provide size of the image footer you want to set from 0.1 to 1, defaults to 0.1 . |
Status Code | Description |
---|---|
200 | The request was successful. |
400 | Invalid input - the pdf file is corrupt or the supported inputs are not provided. |
401 | Required authentication information is either missing or not valid for the resource. |
500 | If any unexpected error occurs while processing the request. |
tokens
or basic authentication
mechanisms.
You can generate and view your existing credentials from your workspace settings (on the left side of the navbar) and go to “API Keys".apy-token
as the header parameter to pass the token.Authorization
header to send the basic authentication credentials.