timrs2998 / pdf-builder

PDF builder written in Kotlin with a statically typed DSL
https://timrs2998.github.io/pdf-builder/
GNU General Public License v3.0
57 stars 16 forks source link

Image bugfix #18

Closed cakism closed 5 years ago

cakism commented 5 years ago

There is a bug in the image loading so that images can't be read from within a jar. It can be reproduced by putting an image inside your resources folder and making an image element that tries to read it and then bundling it into a jar and try to run it. To make it easier for users to load images I added an extra image DSL constructor that takes a buffered image parameter instead of just a path so users can choose how to load images. I also added a call to document.close() to the example document as it's recommended by pdfbox :)

timrs2998 commented 5 years ago

@cakism v1.5.0 should be available with these changes

cakism commented 5 years ago

Awesome, thanks!