Closed lobabob closed 5 years ago
Thank you for submitting an issue. I will look into this as soon as i can.
Thank you again for submitting this. This issue has been resolved on master, https://github.com/corymickelson/NoPoDoFo/commit/ca413390ac7bd89f7bf3652d993b40450b5b416e If you are using one of the downloaded binaries (win64 or aws linux) it is going to take me a little longer to get an updated archive ready.
@lobabob Just a heads up, the scaling values will follow:
{width: 1.0, height: 1.0}
will have no effect on scaling
{width: 0.5, height: 0.5}
will scale the image down by half
{width: 0.25, height: 0.25}
will scale the image down to a quarter of the original size
etc...
Ahh, I see. Didn't realize it was scaling, thought it was in points (oversight on my part). As for your thoughts on where I'm installing from, I was installing via npm install nopodofo
.
Have you had any thoughts about specifying image dimensions instead of just scaling them? E.g. width: 100, height: 20 }
where they are in point units instead of a scale factor. I feel like that would be a more common use for this, but that might just be me.
@lobabob The api follow's as closely as possible the api to PoDoFo. I agree with you though that this is a bit misleading. I will take another look and see if I can make this more intuitive, and at the very least update the docs to help explain the args for this particular api. As to the installation method, the download archives I created for people that had difficulties building PoDoFo with the required dependencies. If building PoDoFo is not an issue for you, I recommend you build your own binaries.
@lobabob I've created a new issue for the Image api. I am going to close this one now unless you have anything else you would like to add to it.
Closing this is fine, I think you've addressed everything here.
The following executes fine and does add the image to the pdf in the right location. However, the scaling portion of
painter.drawImage()
seems to have no effect. As far as I can tell, I'm using it correctly according to the docs.