Re: PDFBox - convert image to PDF, PDF resolution

2016-10-12 Thread Tilman Hausherr
Am 12.10.2016 um 07:45 schrieb Anshul Kayastha: Thank you Doug. You have used JPEGFactory. Curious to know what class would be used if I also had PNG images along with JPG images. Couldn't find anything called a PNGFactory. LosslessFactory Tilman On Tue, Oct 11, 2016 at 1:47 AM, Doug Smi

Re: PDFBox - convert image to PDF, PDF resolution

2016-10-11 Thread Anshul Kayastha
Thank you Doug. You have used JPEGFactory. Curious to know what class would be used if I also had PNG images along with JPG images. Couldn't find anything called a PNGFactory. On Tue, Oct 11, 2016 at 1:47 AM, Doug Smith wrote: > Hi Anshul, > > I made a few changes to make this work. First, I

Re: PDFBox - convert image to PDF, PDF resolution

2016-10-10 Thread Doug Smith
Hi Anshul, I made a few changes to make this work. First, I used a modified technique to scale the image to the right dimensions. I also used the PDFBox JPEGFactory instead of ImageIO to read the image. Lastly, I wrapped everything in try-with-resources blocks to make sure what you open is closed