CSS Page Media Queries Support in PDF Services API

New Here ,
Jun 08, 2022 Jun 08, 2022

Copy link to clipboard

Copied

I am working on a project to convert HTML to PDF using Adobe PDF Services API. One problem I am facing is that I can't customise header/footer such that they appear on each page of the PDF. Typically, I would've used CSS page margin boxes(@top-left, @top-right etc) and they seem to work just fine on PDF Reactor but not with this API. I have also tried using CSS position : fixed but then the header and footer overlap with the content on the page. So the questions I have are :

1) Do the Adobe Doc Cloud APIs (particularly PDF Services API) support CSS Page Margin Boxes?

2) What alternative should I use to customise my header/footers (eg. Inserting image in the header footer or make header/footer for a brand)

3) Additionally, is there a way to watermark the PDF using the API.

 

TOPICS
PDF Services API

Views

71

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 09, 2022 Jun 09, 2022

1) The HTML to PDF Services to support CSS paged media. The trick is to rely exclusively on CSS. Do not set the margins or page size/orientation using the CreatePDFFromHtmlOptions object.

2) I haven't found a good solution for this. We kind of have to wait for paged media level 3 to get out of draft.

3) Not at this time.

Likes

Translate

Translate
Community Expert ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

LATEST

1) The HTML to PDF Services to support CSS paged media. The trick is to rely exclusively on CSS. Do not set the margins or page size/orientation using the CreatePDFFromHtmlOptions object.

2) I haven't found a good solution for this. We kind of have to wait for paged media level 3 to get out of draft.

3) Not at this time.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources