[ANN] gofpdf: A PDF generation library

1,898 views
Skip to first unread message

kurt....@gmail.com

unread,
Aug 5, 2013, 10:54:33 AM8/5/13
to golan...@googlegroups.com
Hi all,

I have just released gofpdf, a fairly close port of the FPDF PDF generation library.

Its site is


You can scan the documentation at 


To install the package, run


-- Kurt Jung

michael...@googlemail.com

unread,
Aug 7, 2013, 6:51:04 AM8/7/13
to golan...@googlegroups.com, kurt....@gmail.com
That's exactly what I needed to port some existing code from php to Go. I just installed it and it does a great job!

Thanks!!
Michael

Ethan Burns

unread,
Aug 7, 2013, 10:00:44 AM8/7/13
to golan...@googlegroups.com, kurt....@gmail.com
Hi,

 does itI am curious how it differs from gopdf: https://bitbucket.org/zombiezen/gopdf.  Would you be able to give a quick summary?


Best,
Ethan

kurt....@gmail.com

unread,
Aug 7, 2013, 11:20:46 AM8/7/13
to golan...@googlegroups.com, kurt....@gmail.com
I am curious how it differs from gopdf: https://bitbucket.org/zombiezen/gopdf.  

I have not used gopdf, but from the documentation at http://godoc.org/bitbucket.org/zombiezen/gopdf/pdf it looks like gopdf has much more support for lower level drawing operations such as transforms and curves. gofpd, on the other hand, supports higher level text actions such as justification, line wrapping and page breaking.

-- Kurt


Ethan Burns

unread,
Aug 7, 2013, 1:55:17 PM8/7/13
to golan...@googlegroups.com, kurt....@gmail.com
Thanks.  And, thanks for the new package!


Best,
Ethan

roc...@gmail.com

unread,
Aug 9, 2013, 11:42:22 PM8/9/13
to golan...@googlegroups.com
pdfdeck is a client for the deck package, (http://godoc.org/github.com/ajstarks/deck) using gofpdf:



Note that gofpdf does not (yet) support all of the deck's graphical objects (ellipses, curves, and arcs) are missing.

ajstarks

unread,
Aug 9, 2013, 11:48:31 PM8/9/13
to golan...@googlegroups.com
pdfdeck is a command to make slide decks using gofpdf:


pdfdeck is also a client of the deck package (http://godoc.org/github.com/ajstarks/deck)

(Note the ellipse, arc and curve elements are not supported (yet) by gofpdf.)


On Monday, August 5, 2013 10:54:33 AM UTC-4, Kurt Jung wrote:

Kurt Jung

unread,
Aug 10, 2013, 9:50:03 PM8/10/13
to golan...@googlegroups.com
Drawing support (lines, Bézier curves, arcs, ellipses) has been added to the gofpdf package. Thanks, Anthony, for the starter code and idea and for your pdeck application.

Also, Anthony pointed out that the io.Writer should not be closed by the package. This has been remedied and an additional method added to provide the old functionality.

-- Kurt



ajstarks

unread,
Aug 21, 2013, 12:50:53 PM8/21/13
to golan...@googlegroups.com
pdfdeck has been updated to use new features.  Thanks!

jmhe...@gmail.com

unread,
Sep 18, 2015, 3:48:44 AM9/18/15
to golang-nuts
Hi Kurt,

I was wondering if your library accepts a generic pdf, splits it by pages and saves each page in a new pdf file.

Jamal

Marcus Downing

unread,
Sep 23, 2015, 5:07:36 PM9/23/15
to golang-nuts, jmhe...@gmail.com
I'm currently working to port the FPDI library from PHP into Go, as an extension to gofpdf. The goal is to be able to take pages from an existing PDF and use or combine them in making a new one. It's taking me a while to do though, so don't expect it any time soon.

I considered using existing libraries like rsc.io/pdf, but none offered what I needed to load in whole pages and reuse them.

Franco Marchesini

unread,
Mar 10, 2016, 9:30:01 AM3/10/16
to golang-nuts
Hello Kurt,

I'm new in Go.
I do not know php.
I come from C + harupdf. 

gofpdf is a very very good package.

Have you considered also porting html2pdf ?

Thanks for your effort.

Franco

wilk

unread,
Mar 10, 2016, 12:17:45 PM3/10/16
to golan...@googlegroups.com
On 10-03-2016, Franco Marchesini wrote:
> ------=_Part_352_448282996.1457601084754
> Content-Type: multipart/alternative;
> boundary="----=_Part_353_777416943.1457601084754"
>
> ------=_Part_353_777416943.1457601084754
> Content-Type: text/plain; charset=UTF-8
>
> Hello Kurt,
>
> I'm new in Go.
> I do not know php.
> I come from C + harupdf.
>
> gofpdf is a very very good package.
>
> Have you considered also porting html2pdf ?

Coming from Python, I would like to know if somebody is working on
a port of reportlab and rml ?

--
William

Reply all
Reply to author
Forward
0 new messages