jung-kurt / gofpdf

A PDF document generator with high level support for text, drawing and images
http://godoc.org/github.com/jung-kurt/gofpdf
MIT License
4.33k stars 782 forks source link

gofpdf.New does not support custom sizes anymore #308

Closed steamonimo closed 5 years ago

steamonimo commented 5 years ago

We use gofpdf to create business cards. With the new current version the following command is now broken and reports "unknown page size 59x89". With the previous release this created a smaller pdf page as expected:

hpdf := gofpdf.New("L", "mm", "59x89", "")

jung-kurt commented 5 years ago

I am surprised that the "59x89" notation worked in a previous version; the page size routine hasn't changed in six years. In any event, you can create custom sizes using gofpdf.NewCustom(); see the PageSize example.

steamonimo commented 5 years ago

Somehow your old API handled my abuse. But with NewCustom the behaviour is now as expected. Thanks for pointing me to NewCustom. I will close the issue...