zippy1978 / ghost4j

Java wrapper for Ghostscript C API + PS/PDF document handling API
http://www.ghost4j.org
GNU Lesser General Public License v3.0
64 stars 38 forks source link

Ghost4J supported GhostScript version #47

Closed cccsssbbb closed 8 years ago

cccsssbbb commented 8 years ago

Hi zippy1978,

         I recently came across some PDF files, that can be parsed successfully using **GhostScript 9.18**, but not in **GhostScript 8.70**. By using this library, those PDFs cannot be parsed as well. Wondering would you have a **gs9.18 equivalent release** soon? Thank you.

cccsssbbb

zippy1978 commented 8 years ago

Hi,

Ghost4J uses the Ghostscript native API. So if GS 9.x is your default install, Ghost4J will use it.

Regards

cccsssbbb commented 8 years ago

if that is the case, do you have a function inside your api, to return the version of ghostscript in use?

4F2E4A2E commented 8 years ago

Good question, it would be a nice feature to always print out the version of the currently loaded native api.

zippy1978 commented 8 years ago

This feature already exists, you can get GS runtime info like this:

public void testGetRevision() {

GhostscriptRevision revision = Ghostscript.getRevision();

assertNotNull(revision.getProduct());
assertNotNull(revision.getCopyright());
assertNotNull(revision.getRevisionDate());
assertNotNull(revision.getNumber());

}

Regards

4F2E4A2E commented 8 years ago

What do you think about logging this information on every initialization?

cccsssbbb commented 8 years ago

It is a good practice to always print the gs version when in doubt