• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Html to PDF adds a white margin around the page

New Here ,
Apr 25, 2021 Apr 25, 2021

Copy link to clipboard

Copied

Hi,

 

I tried to use Adobe's document service API to convert HTML to PDF. But the generated pdf always has a white margin around each page. I don't see any options to scale the HTML to the whole page. I tried the PageLayout options, where you can specify height and weight, but it won't remove the margin.

 

Is there any way to remove the while margin. Otherwise this tool won't satisfy our requirements.

 

Chaoran Yng

Views

414

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
New Here ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

I  thought I had replied to this post, but maybe not. 

 

On : https://opensource.adobe.com/pdftools-sdk-docs/release/latest/howtos.html#create-pdf-with-documentla...

 

under the "Create a PDF from static HTML" heading, you can try setting the PageLayout like in the setCustomOptions method. That may help w/ this issue. I saw that recommended somewhere online.

Votes

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
New Here ,
Nov 05, 2024 Nov 05, 2024

Copy link to clipboard

Copied

LATEST

hii, how we can remove page margin is there any cropping api or can we set margin in html to pdf conversion api.if you have any solution please let me know the syntax of rest api.i had tried multiple methods but didnt get desired result .my pdf file is generated sucessfully just adding white margin around every page i want to remove it,

Votes

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