PDF output with trim, bleed, and crop box settings possible?

792 views
Skip to first unread message

Sam Hall

unread,
May 31, 2012, 3:36:25 PM5/31/12
to wkhtmltopdf General
We're using wkhtmltopdf to output hi-res PDF's for printing.

However, we would like to set trimbox and bleedbox settings when each
is produced. Otherwise, a secondary process is needed to apply these
settings.

I've searched documentation and have not seen any apparent way to so.

Does anyone know of a method or command to do this?


Thank you.

Jakob Truelsen

unread,
May 31, 2012, 3:53:42 PM5/31/12
to wkhtmltop...@googlegroups.com
This is not currently possible. If you realy want it you can create an
issue request in the issue tracker. But I have a lot on my plate, so
dont expect anything soon.

If you know someone willing to implement the support. I am willing to
help out this individual however I can.

/Jakob
> --
> ===================================================
> You received this message because you are subscribed to the "wkhtmltopdf General" group.
> To post to this group, send email to wkhtmltop...@googlegroups.com
> To unsubscribe from this group, send email to wkhtmltopdf-gen...@googlegroups.com
>
> For more options, visit this group at
> http://groups.google.com/group/wkhtmltopdf-general?hl=en?hl=en

Sam Hall

unread,
Jun 1, 2012, 3:01:52 PM6/1/12
to wkhtmltopdf General
Thanks for the quick reply.
We'll probably look into a secondary batch process to apply these
settings (via another app).

Sam

Adam Hyde

unread,
Jun 3, 2012, 5:41:59 PM6/3/12
to wkhtmltopdf General
if you work out a way to do this with open source tools then please
let me know as Im also interested in this.

It would be good to have this baked into wkhtmltopdf...it makes me
wonder if it might not be a good idea to get a feature request tracker
going somewhere...


adam

Jakob Truelsen

unread,
Jun 4, 2012, 3:30:15 AM6/4/12
to wkhtmltop...@googlegroups.com
I list of feature requests can be found here.
http://code.google.com/p/wkhtmltopdf/issues/list?can=2&q=Type%3DEnhancement.

/Jakob

James

unread,
Oct 26, 2012, 1:45:31 AM10/26/12
to wkhtmltop...@googlegroups.com
Hi, Sam.

As others say, it's not part of the app. In fact, despite the need, I hadn't even thought of doing it from wkhtmltopdf -- which would be the most logical.

I'm building a web app from the ground up in which the results need to be printed in high resolution. So I've built the CSS to do the crop marks (and bleed) and also to easily render everything (with a class) at about 4.5 times the normal size when I run wkhtmltopdf on it (via css, not --zoom). It's working pretty well, but can get convoluted (especially the bleed stuff, which requires some page elements to extend beyond the cropped area while some have margin to be within the cropped area). At this 4.5x size, I then run -Size A0 to get a huge PDF which inevitably has a lot of white space.

One of the issues I'm running into, though, is when I try to fill up a page exactly. My 1x size is some arbitrary pixel amount and I find that it only fills up with top left of the PDF. At about 1.4x it's more or less correct, but not exact.  I assume if you plan (or achieved) adding the crop marks in a second step, you must be getting a consistent sized output. How are you doing this?

I also appreciate any other tips you have since it sounds like you're about 6 months ahead of me on this path.

Thanks,
James
Reply all
Reply to author
Forward
0 new messages