Closed crysper closed 8 years ago
@crysper , frankly I don't know how to answer these questions, as some of them depend on the libraries you use.
I think the dynamic footer approach isn't going to be easy to implement. Here are a few pointers:
@media
rules. CombinePDF doesn't support these PDF features and it will throw an exception... so you'll have to test it out.:center
flag to make the alignment a bit easier... but you will mostly have to test things out and remember that the pages might change is sizes (even within the same file).Good Luck!
P.S.
StackOverflow is a good place for Q&A about programming. Perhaps someone else already faced a similar challenge and could help more then I.
Thanks for the quick reply for my previous answer.
I have another question or 2. Can you tell me please if I can achieve this with combine_pdf?
1) Can I use a footer pdf template and somehow apply the page numbering on it? I want to generate a pdf footer template with another library from HTML and put it over existing footer of other pdf documents(unfortunately I won't know the format of the other pdfs, but I can generate the HTML footer template on the fly)
A very slow method would be to iterate each page, get the current page number, replace the page numbering placeholder from the HTML footer with the current page number, convert the HTML template to PDF than merge it. However, the performance will be incredibly low.
I'm thinking if I can calculate the position of the page numbering placeholder on the footer and use the coordinates in your page_numbering function. But I'm not sure if how it works....
The footer will also have links or links with images to external websites.
2) I want to replace first and last page with my own pdf pages. Does this break the TOC or other bookmarks?
Thank you