I use PDFClown .jar library in order to convert jpeg images to pdf files. However, I get the below error:
java.lang.RuntimeException: java.io.EOFException
Here you can find the code:
org.pdfclown.documents.contents.entities.Image image =
org.pdfclown.documents.contents.entities.Image.get("c:" + java.io.File.separator + "bg.jpg");
org.pdfclown.documents.contents.xObjects.XObject imageXObject = image.toXObject(document);
composer.showXObject(imageXObject);
composer.flush();
document.getFile().save("c:\\test.pdf" , SerializationModeEnum.Standard);
Please let me know what is wrong?