Skip to content
forked from zippy1978/ghost4j

Java wrapper for Ghostscript C API + PS/PDF document handling API

License

Notifications You must be signed in to change notification settings

jmkgreen/ghost4j

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ghost4J binds the Ghostscript C API to bring Ghostscript power to the Java world. It also provides a high-level API to handle PDF and Postscript documents with objects.

Maven configuration

<repositories>

	...
	
	<repository>
		<id>org.ghost4j.repository.releases</id>
		<name>Ghost4J releases</name>
		<url>http://repo.ghost4j.org/maven2/releases</url>
	</repository>
	<repository>
		<id>org.ghost4j.repository.snapshots</id>
		<name>Ghost4J snapshots</name>
		<url>http://repo.ghost4j.org/maven2/snapshots</url>
	</repository>
	
	...
	
</repositories>

<dependencies>

	...
	
	<dependency>
		<groupId>org.ghost4j</groupId>
		<artifactId>ghost4j</artifactId>
		<version>0.5.0</version>
	</dependency>
	
	or ...
	
	<dependency>
		<groupId>org.ghost4j</groupId>
		<artifactId>ghost4j</artifactId>
		<version>0.5.1-SNAPSHOT</version>
	</dependency>
	...
	
</dependencies>

A simple example (PS to PDF conversion)

//load PostScript document
PSDocument document = new PSDocument();
document.load(new File("input.ps"));

//create OutputStream
fos = new FileOutputStream(new File("rendition.pdf"));

//create converter
PDFConverter converter = new PDFConverter();

//set options
converter.setPDFSettings(PDFConverter.OPTION_PDFSETTINGS_PREPRESS);

//convert
converter.convert(document, fos);

Getting binaries

Binary distributions can be downloaded from here

Documentation

Documentation is available from http://www.ghost4j.org

About

Java wrapper for Ghostscript C API + PS/PDF document handling API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%