First time asking help on the forums, as I am really bashing my head into this one. I feel this shouldn’t be that hard of an obstacle to overcome, but somehow I can’t get over it.
I am trying to create an invoice in PDF format using selectPDF (right now, I know that Blockspring also has an HTML to PDF converter) to convert a page called “invoice_page” into a PDF. So far, I have managed to set the background image to the letterhead of the invoice (and made it repeat vertically), and that converts neatly to an A4 PDF. But when I start adding stuff like repeating groups to start adding invoiced items, it just runs through the footer onto the next page and over the header of the next page.
Is there a way that I can create an invoice with multiple pages without it destroying the layout?
Not with the current integration. Right now, you’d have to build a layout on the page you’re using to generate the PDF that works on different list sizes, etc.
I see. Thanks for the information. I’ll try to work something out. If I do figure it out, I might put it into a tutorial, because I’ve seen multiple questions about it, but never a full solution.
I’m having a similar issue. For me it’s very difficult to setup a page that works with different list sizes because the pdf I create can be one or multiple pages long depending on the input.
You can set the type of page which is nice, but I noticed that it doesnt take any page margins into account so I end up with a page that spills over onto the next page but there is no margin whatsoever. If someone needs to print this, some valuable information will get lost because the printer cant cope with that.
Would it be possible to set a margin or at least define a standard margin for each page size? This is probably a question for selectPDF though…
Sorry, I dont understand. To my knowledge, there are always margins because you do not want to have any text too close to the edge of the paper. That’s why there is a default margin of 5pt set by SelectPDF.
What do you mean by ‘so that it shows your page’? Would a 5pt margin not show the page? I setup my print page to be an A4 and if I know there is a 5pt margin, I can keep that into consideration.
A margin of 0 results in text too close to the edge and that gets lost when printing (yes, some of these will be printed unfortunately :P)
hmm, according to their documentation the default margin is 5pt:
margin_top, margin_right, margin_bottom, margin_left You can specify values for all 4 margins of the generated pdf document. The margins are specified in points. 1 point is 1 / 72 inch. By default all margins are 5pt.
Do you specifically call with a 0 margin? If you dont specify it would be 5pt?
How do I add white space to a page that only gets created dynamically? I can setup one static page with extra white space all around, but I have multiple repeating groups that can have 0 (hidden) to dozens of lines thus creating additional page(s). Every new page should have a top and bottom margin but how do I set that if I don’t know where the page break will happen?
I had definitely hoped there would be a better alternative to SelectPDF from the start, but this is what’s available and at least it kind of works. So I feel you there, but on the other hand… for everyone who has pdf pages of which the height is set dynamically the pdf’s will look really weird without the top and bottom margins.
And in our case, the pdf will be basically useless because they need to be print ready.
That would be awesome.
If it is a lot of work or could potentially mess up things, I’d be happy to wait and see if I’m not the only one requesting this…