Printing Invoices

299 views
Skip to first unread message

wfu...@gmail.com

unread,
Sep 7, 2014, 7:13:06 PM9/7/14
to killbill...@googlegroups.com
Hello,

I am early in the implementation process and figuring out what can and cannot be accomplished in KAUI. Is it possible to print paper invoices? If not, is it possible for us to build this function through the API?

Thanks!
William

Pierre-Alexandre Meyer

unread,
Sep 8, 2014, 3:02:27 PM9/8/14
to wfu...@gmail.com, killbill...@googlegroups.com
Hello William,

On Sun, Sep 7, 2014 at 7:13 PM, <wfu...@gmail.com> wrote:
I am early in the implementation process and figuring out what can and cannot be accomplished in KAUI.  Is it possible to print paper invoices?  If not, is it possible for us to build this function through the API?

In Kill Bill, you can create HTML invoices (the design can be tweaked using a mustache-based templating system). There is an API (GET /1.0/kb/invoices/<invoiceId>/html) to retrieve them, which Kaui uses (on the invoice overview page, click "View customer invoice html" to see it).

Would printing them from the HTML work for you?

--
Pierre

William Fulton

unread,
Sep 8, 2014, 3:12:21 PM9/8/14
to killbill...@googlegroups.com, wfu...@gmail.com
Thanks for the reply Pierre.

Ideally, these will be printed as an item that goes in to the shipping container for the products being sold.  If a clean version can be printed from the HTML it should be fine. However, what we may want is the ability to print all of the invoices from a particular day at once.  I know there isn't a print mechanism built in to KAUI, but if we have the ability in an external app, could we request the invoices through an API call and process them in the external app to be printed as PDF understanding that we are completely in control of handling the external processing?

Thank you,
William

Pierre-Alexandre Meyer

unread,
Sep 8, 2014, 4:04:18 PM9/8/14
to William Fulton, killbill...@googlegroups.com
On Mon, Sep 8, 2014 at 3:12 PM, William Fulton <wfu...@gmail.com> wrote:
However, what we may want is the ability to print all of the invoices from a particular day at once.

We don't have an API specifically to do this today but you can stream invoices using the pagination API (GET /1.0/kb/invoices/pagination). If you keep the last cursor (?offset=1234) from the day before, this should do what you want.
 
I know there isn't a print mechanism built in to KAUI, but if we have the ability in an external app, could we request the invoices through an API call and process them in the external app to be printed as PDF understanding that we are completely in control of handling the external processing?

Alternatively, you could also go with the plugin route: you could write a notification plugin which would listen to invoice creation events, and print them right away. The upfront work is a bit more but this would remove batch operations from your workflow (if performance is an issue for example).

Hope that helps!

--
Pierre

William Fulton

unread,
Sep 8, 2014, 4:13:10 PM9/8/14
to killbill...@googlegroups.com, wfu...@gmail.com
Awesome advice!

Thank you, Pierre!

shaury...@gmail.com

unread,
Jun 26, 2017, 7:53:31 AM6/26/17
to Kill Bill users mailing-list, wfu...@gmail.com
Hi I am trying to download the invoice using the HTML response that I get using the GET response. Can you please tell me of a way to download the PDF format of it?

Thanks.

stephane brossier

unread,
Jun 26, 2017, 7:31:23 PM6/26/17
to Shaurya Sahai, Kill Bill users mailing-list, wfu...@gmail.com
Shaurya,

There is no support for PDF, because we could not find any open source library doing PDF. If you have access to one, then you could create your own endpoint -- or retrieve the JSON and make the transformation on the client side.

Stéphane


On Mon, Jun 26, 2017 at 4:53 AM, <shaury...@gmail.com> wrote:
Hi I am trying to download the invoice using the HTML response that I get using the GET response. Can you please tell me of a way to download the PDF format of it?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/8a70adc7-c2e2-437b-b236-1b2bfd1db846%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

shaury...@gmail.com

unread,
Jun 27, 2017, 1:31:14 AM6/27/17
to Kill Bill users mailing-list, shaury...@gmail.com, wfu...@gmail.com
Thank you.

fort...@gmail.com

unread,
Jul 1, 2017, 7:51:49 AM7/1/17
to Kill Bill users mailing-list, shaury...@gmail.com, wfu...@gmail.com
Le mardi 27 juin 2017 07:31:14 UTC+2, shaury...@gmail.com a écrit :
> Thank you.

WIthout going to the (harder) plugin route, there could be a way by using the killbill callback too: we successfully have implemented a callback target that generates PDFs when an invoice is created. You could do it in the language of your choice and on the infrastructure of your choice (ours is php + wkhtmltopdf).
Reply all
Reply to author
Forward
0 new messages