Different margins for the cover page #3635
Comments
OK, 1 day and done :) I can make a pull request if needed, please let me know. Thanks again! |
I want this feature! 👍 |
@andkorsh You should submit a PR for that :) |
I want this, too! |
PR, please! |
@bitbonk @NiR- @eliiik @katesowles here you go #3692 :) |
Thank you for the PR, it will be really great to have this feature However, it will be really nice to set different margins for any page! Let's take for example a magazine with a cover page, a table of contents and articles in many categories (ordered by categories). I would like to have a kind of "cover" page per category.
|
@guicara good luck implementing your suggestion ;) |
@guicara He just removed top and bottom margins from the cover page. Nothing more. |
To remove or change margins on an arbitrary interior page would probably better be done with embedded directives (special HTML comments), although I suppose with sufficient pain and suffering you could find a way to specify margins from the command line for a given absolute page number. While you're at it, the ability to control most command line settings (not just margins) would probably be helpful. With the current code + above PR, if you want "interior covers", perhaps you could build a series of documents, each with its own cover, and then use a separate utility to merge all the PDFs into one document. You would probably want to control the printed page numbering when you do that, so that it's continuous and not starting over each time. |
Thank you for your reply @PhilterPaper.
👍
This is indeed maybe the best solution in the meantime. I have end up doing that on my project : I use the PHP wrapper phpwkhtmltopdf to generate multiple temporary PDF files, then php-pdftk to merge all the files. Two major drawbacks:
This issue is out of my scope... (C++). |
It will be very nice to have this feature. |
I agree. This would be good for my needs too. I'm aiming for a coloured cover page with no margins, and the rest of the document to have margins. I tried to merge two separate pdfs but it's a pain and it doesn't work well. Also you lose your page numbering. |
Any news about this feature? Thanks |
@jfcartier Andrew made a simple proof of concept which you can find here. If you really want this feature, you'll have to put some effort to make it ready for merging as at this point it's nowhere near that stage. |
is there any solution for this ? to set different margin each page |
@darmawan01 No, you can track progress here. |
Any update? |
Need this! |
Need this feature as well! |
Hi wkhtml team!
First of all, thank you for the great product! I don't know how can I thank you enough - this product is really great! Thanks again - you're doing the great job.
My question actually has been asked multiple times at different forums but unfortunately there were no answer for that. And I think it is not possible within the current wkhtml API - probably you guys can advice if there is an ability to at least patch/build the custom version. We really need that..
The thing is that we don't want margin-top and margin-bottom to be applied to the COVER page. That's fine that it is applied to the TOC and to the main pages, but we don't really want it to be applied to the cover page. We'd like to have an ability either to apply different margins for a cover page or not to apply margins for cover page at all.
If it is possible to patch the wkhtml library and build the custom version for us - I'd appreciate your help guys.
The version I'm running is "wkhtmltopdf 0.12.3.2 (with patched qt)".
Thanks,
Andrew K.
The text was updated successfully, but these errors were encountered: