US Paper Size

I searched for an answer to this, but did not see one; sorry if I missed the solution.

How would I globally change the invoice template size to US-Letter instead of A4. I need the printouts and PDFs to be US-Letter.

I’m using the Self-Hosted versions, so I don’t mind hacking a core file if needed.

Thanks :slight_smile:

We use pdfmake to generate the PDFs. From the following issue it looks like you can set the page size by setting a pageSize property on the dd variable (document definition).

https://github.com/bpampuch/pdfmake/issues/6

To add it to our app search for the following line in public/js/built.js and it just before.

doc = pdfMake.createPdf(dd);

Thanks!

Adding dd.pageSize = 'letter'; before doc = pdfMake.createPdf(dd); worked perfectly.

To add it to our app search for the following line in public/js/built.js and it just before.

Has this changed in 2.5.0.3?

My installation of 2.5.0.3 does not have the file public/js/built.js

I do, however, have the file public/js/pdf.pdfmake.js which contains the “doc = pdfMake.createPdf(dd);” directive

Is this the correct place to make the change now, or is there a different (better?) place?

The file has been moved to public/built.js

Thank you!

I’m trying to start a new topic now. There does not seem to be any way to do this?!

[ Feel free to move the following question into a new thread! ]

I would like to make a “complex” footer with more than just the one field.

Can I:

  1. add fields in the form {$fieldname} to Default Messages / Invoice Footer
    or
  2. must I edit the template directly

Related: Is there a comprehensive list of {$fieldnames} somewhere?

We don’t support using variables in the footer. You may be able to make it work by customizing the design but it would be a non-trivial endeavor.

The list of fields will be added in a future release, here a sample:

{
  "invoiceNumber": "0001",
  "discount": "0.00",
  "poNumber": "",
  "invoiceDate": "2016-03-02",
  "dueDate": null,
  "terms": "",
  "publicNotes": "",
  "taxName": "",
  "taxRate": "0.00",
  "amount": "10.00",
  "balance": "10.00",
  "invoiceDesignId": "1",
  "isQuote": "0",
  "customValue1": "0.00",
  "customValue2": "0.00",
  "customTaxes1": "0",
  "customTaxes2": "0",
  "isAmountDiscount": "0",
  "invoiceFooter": "",
  "partial": "0.00",
  "hasTasks": false,
  "customTextValue1": null,
  "customTextValue2": null,
  "hasExpenses": false,
  "client": {
    "currencyId": null,
    "name": "",
    "address1": "",
    "address2": "",
    "city": "",
    "state": "",
    "postalCode": "",
    "workPhone": "",
    "paymentTerms": "0",
    "customValue1": null,
    "customValue2": null,
    "vatNumber": "",
    "idNumber": ""
  }
}

Hi Hillel:

We don’t support using variables in the footer. You may be able to make it work by customizing the design but it would be a non-trivial endeavor. The list of fields will be added in a future release, here a sample:

Too bad the footer is not really customizable.

As to your second comment (“list of fields”), does that mean accessibility to those fields will be added to the footer in a future release? Or just “exposed” in the docs so as to make other customization development simpler?

Feature request:

I hope the footer will become significantly more customizable.

What I would like to achieve is to make a remittance “tear strip” at the bottom 3 inches of a US Legal formatted invoice. This leaves a standard US Letter sized page for the client’s files and lets them send in a tearstrip with invoice and account information with their payment. [ This sort of arrangement is fairly customary in the US for utility companies and other “sophisticated” billers. ]

On the (footer) tearstrip I would like to repeat (at minimum) the following fields:
invoice number (I usually set this field in a 3of9 font for quick scanning, so that functionality would be nice too! :wink:
amount due (invoice)
my business name and remittance address
client name and address / contact info

an additional field which could be useful is amount due on client account (is this “balance” in InvoiceNinja parlance, or is “balance” what remains on a particular invoice by itself? – I am just starting to learn IN)

By the way, what unfortunately can add further “complexity”: this arrangement (generally) should put the tearstrip only on page 1 (or last page). The other pages (in the case of a multi-page invoice) are all of the size-tearstrip (in the US case, only 1 page is “legal” the others “letter”)

One additional consideration: perhaps the tearstrip should be separate from the “footer” – this way the footer (page number, for example, and other fields?) can be repeated on all pages and the tearstrip occurs just once.

Thanks for your consideration!

Sorry, blockquote does not seem to work.

In my response above, the first three sentences are from your previous post . . .

Also, by “3of9 font” I meant 3of9 barcode font.

These are widely available as TTF font files and are very useful for input entry automation using barcode scanners.

The fields should all be accessible. Currently you need to add ‘Value’ at the end, in the future that won’t be needed.

It’s possible you could accomplish this with a custom design but it certainly wouldn’t be easy,

Is there a way to change to US Paper size in Ninja Pro invoicing? Or if one of the templates is set for Legal size?

This isn’t currently supported on invoiceninja.com, but I’ve added to our Trello board for a future release: https://trello.com/c/QKr1FD6m

I though of how long they have this feature available, I am thinking to use it but some minor issues raises an impact for my interest. But I am still looking forward that I could use the platform.

Regards,
Andrew
“publisher for http://www.digitekprinting.com/digital-color-copies

This feature has been implemented, you can set the page size on Settings > Invoice Design

Hi Hillel:

InvoiceNinja has really improved in the years since I last played with it in any depth. Good for you!

blockquote (still doesn’t seem to work) “This feature has been implemented, you can set the page size on Settings > Invoice Design”

Is there any ability to “easily” add a remittance tearstrip as I urged further above in the thread? (one example is here, the dotted line is where the page is perforated)

If you could add the ability to add (any and all relevant) fields to such a “tear strip” invoice element or (less perfect) footer – as there are in the other sections of the invoice – the ability to achieve this would be immediately met.

In the interim, I’d be happy to handcode this if you could provide a bit of guidance.

Between this issue and Purchase Orders I’m quite certain I could get you at least a dozen more clients (Whitelabel and/or hosted). Of course that’s probably not enough incentive (by itself) to add these features . . .

Thanks for your consideration.

This should be possible (albeit rather tricky) using a custom design, you can hire help here:

https://boldcompass.com/customize-invoice-ninja/