Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(honkit): change PDF margin options #223

Merged
merged 1 commit into from Sep 16, 2021

Conversation

yhor1e
Copy link
Contributor

@yhor1e yhor1e commented Sep 15, 2021

For #221 .

The ebook-covert options --margin-left, --margin-right, --margin-top, --margin-bottom don't work. So I changed them to --pdf-page-margin-left, --pdf-page-margin-right, --pdf-page-margin-top, --pdf-page-margin-bottom.

ebook-convert (calibre 3.48.0) help ( $ ebook-convert foo.html bar.pdf --help ) mentions that PDF margin options override --margin-* options.

    --margin-left=MARGIN_LEFT
                        Set the left margin in pts. Default is 5.0. Setting
                        this to less than zero will cause no margin to be set
                        (the margin setting in the original document will be
                        preserved). Note: Page oriented formats such as PDF
                        and DOCX have their own margin settings that take
                        precedence.

So I guess we should use --pdf-page-margin-* instead of --margin-*.

    --pdf-page-margin-left=PDF_PAGE_MARGIN_LEFT
                        The size of the left page margin, in pts. Default is
                        72pt. Overrides the common left page margin setting.

If you like this PR please merge.

Thanks.

The ebook-covert options `--margin-left`, `--margin-right`, `--margin-top`, `--margin-bottom` don't work. So change them to  `--pdf-page-margin-left`, `--pdf-page-margin-right`, `--pdf-page-margin-top`, `--pdf-page-margin-bottom`.

Ref. honkit#221
@yhor1e yhor1e changed the title fix(honkit): change pdf margin options fix(honkit): change PDF margin options Sep 15, 2021
@azu azu merged commit 7ffa130 into honkit:master Sep 16, 2021
@azu azu mentioned this pull request Sep 16, 2021
@azu
Copy link
Member

azu commented Sep 16, 2021

Thanks! Nice found!

https://github.com/honkit/honkit/releases/tag/v3.6.21 is released

@yhor1e yhor1e deleted the change-pdf-margin-options branch September 16, 2021 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants