Forum Feature requests

PDF as a background?


When setting up a document cover page for a client I am usually provided with a (complex, designed, precise) PDF to show what the cover page should look like. I then have to find a good way to re-create this in a format that Prince will understand. I hoped the SVG route would give me an easy solution to complex layouts but I have struggled with it using inkscape. Is there a better SVG editor?

It would be amazing if I could specify an existing PDF file as a background to a page (as an alternative to a graphic or SVG). Is this likely to be possible at some point?


If the cover page is just used as is, then a PDF concatenation tool would be the easiest way to go. If you need to combine some content from the XML/HTML document onto the cover page, that's a bit more complicated.
I really need to be able to do the whole thing in Prince so that I can overlay extra information such as the document title using HTML.

I only asked just in case it was a really trivial thing to implement.
Unfortunately it's quite difficult, but it would be a very useful feature to have.
That is a real shame it's difficult - it feels wrong converting from PDF to SVG just so that Prince can convert it back to PDF again. IMO, SVG is the most promising route to highly formatted documents from Prince, but SVG itself suffers from a lack of maturity i.e. a lack of robust authoring tools, and of inconsistency in rendering between readers (including Prince).

The use of the PDF inclusion function (for me anyway) would be to include a pre-formatted PDF page at Prince time rather than having to concatenate two PDF files. By doing it in Prince, the page numbering all works and I could overlay text on top of the PDF.

If it is hard to support as a generic background property, is there some concession that would make it easier i.e. import a page from an external PDF as a page in the Prince PDF?
Something like that would make a lot of sense, it's really just a technical issue of correctly loading all of the linked resources used by the PDF file: color profiles, images, and fonts for example, then embedding them in the PDF file that Prince generates. Ideally one could simply embed the entire PDF inside the new PDF file directly without changing it, but I'm not sure if that's possible.
I've been using an excellent commercial (but affordable) command line tool called "Coherent PDF" alongside Prince which provides this functionality (and more).

Usage in this case would be one of the following:

cpdf -stamp-on source.pdf in.pdf [<range>] -o out.pdf
cpdf -stamp-under source.pdf in.pdf [<range>] -o out.pdf
cpdf -combine-pages over.pdf under.pdf -o out.pdf

Depending on your needs this would allow you to merge your cover with some pre-rendered Prince content, or vice versa.

As a bonus it also gives you the PDF concatenation/merge functionality Mike D originally suggested.


(Note: Not affiliated with Coherent, just a very satisfied user)