Questions tagged [ghost4j]

Ghost4J is a Java wrapper for the Ghostscript API.

Main features of Ghost4J:

  • Full Ghostscript API supported.
  • Object oriented API.
  • High level API providing a set of components (converters, analyzers, renderers) to handle Postscript and PDF documents.
  • Multi-process support.
42 questions
24
votes
7 answers

Convert a PDF file to image

I wanted to convert PDF document into image. I was using Ghost4j. Problem: Ghost4J needs gsdll32.dll file at runtime, and I do not want to use the dll file. Question 1: is there any way, in ghost4j to convert image without the dll? Question 2: I…
grep
  • 5,465
  • 12
  • 60
  • 112
7
votes
1 answer

How to set anti aliasing option on SimpleRenderer

I'm using Ghost4J SimpleRenderer to convert my PDF to Image. By default the output png image is not anti aliased. How can i set it.? I know that, using Core API we can do it. But, is there any way in High Level API, for setting it?
Dipin
  • 1,085
  • 6
  • 19
4
votes
1 answer

Ghost4j not using default ghostscript installation

I'm using Ghost4j to render PDFs, but it throws the following sorts of errors sometimes when trying to render documents that were created by MS Word [main] ERROR org.ghost4j.Ghostscript - GPL Ghostscript 9.18: Some glyphs of the font TimesNewRoman…
jamsandwich
  • 367
  • 5
  • 11
4
votes
1 answer

Unable to load library 'gs' with Ghost4J

I am trying to use Ghost4J in order to turn a PDF into a PNG. I am aware that people have asked this before, but not with OS X 10 and with the latest release of Ghost4J. I have followed the instructions listed in zippy1978's answer from here: PDF to…
Wyetro
  • 8,439
  • 9
  • 46
  • 64
4
votes
1 answer

Convert from Itext PDF byte array to multipage TIFF file

I have a pdf file (obtained from a byte[] generated by iText) I need to send to a signature hardware. Due some incompatibility with the java printer driver I can't send the PDF directly, so i need to convert it to images before. I've succeed…
Jordi Castilla
  • 26,609
  • 8
  • 70
  • 109
4
votes
1 answer

Tess4j on Windows 64-bit: exception on multiple threads

I am using tesseract 3 with Java 8 on Windows 64-bit to OCR scanned PDFs. I have followed the instructions on the Tess4j page and have used the 64-bit versions of the required DLLs, and have installed 64-bit Ghostscript. When I run my unit test…
Markos Fragkakis
  • 7,499
  • 18
  • 65
  • 103
2
votes
2 answers

ghost4j class cast exception during joining two PostScripts

I am trying to join two PostScript files to one with ghost4j 0.5.0 as follows: final PSDocument[] psDocuments = new PSDocument[2]; psDocuments[0] = new PSDocument(); psDocuments[0].load("1.ps"); psDocuments[1] = new…
PowerStat
  • 3,757
  • 8
  • 32
  • 57
2
votes
2 answers

Ghost4J - EXCEPTION_ACCESS_VIOLATION (JVM is crashing)

I'm trying to replace the PDF converter we are using in the company, but I'm getting this issue with Ghost4J. Note my code is very similar to the sample they provide... I'm using Java SE 1.6 (jrockit-jre1.6.0_33-R28.2.4) and Ghostscript 9.10 for…
ThaisK
  • 365
  • 1
  • 4
  • 22
2
votes
3 answers

Unable to load library 'gs': libgs.so: cannot open shared object file: No such file or directory

I have installed ghostscript of 64 bit on my 64 bit linux machine. I am using ghost4j-0.5.0.jar to convert pdf files to tiff files. I have written a java program which will convert pdf files to tiff files. This is working perfectly fine on Windows…
Jai
  • 31
  • 1
  • 4
1
vote
1 answer

How to properly install Ghostscript under Linux as shared library

The link on this page (https://www.ghostscript.com/download.html) for Linux x64, gets you a .tgz with an executable binary. However, while trying to use this binary as an .so, (after renaming it into libgs.so and putting into appropriate place) via…
62mkv
  • 1,444
  • 1
  • 16
  • 28
1
vote
0 answers

Java: convert PDF to image using ghost4j

I am trying to use the ghost4j library to convert a pdf to image. My code looks like this: import org.ghost4j.document.*; import org.ghost4j.renderer.*; import java.util.ArrayList; import java.util.List; . . . PDFDocument document = new…
2one
  • 1,035
  • 3
  • 17
  • 36
1
vote
2 answers

PS to PDF conversion. GhostScript Exception - Cannot initialize Ghostscript interpreter. Error code is -100

I am running PostScript to PDF conversion service for my application in Linux Server. I have ghostscript version 8.70 installed. I was testing the code in Windows with gsdll64.dll , ghostscript 9.26 and it worked fine. I have added jna 4.1.0 and…
computatma
  • 71
  • 5
1
vote
1 answer

Ghost4J PDFConverter generating 0KB PDF File

I'm using ghost4j to convert PS file to PDF. I have tested it's reading the ps file correctly by using the getPageCount() method it's returning the correct page count. However the output pdf file that's generating is 0KB in size and have not content…
Arpan
  • 596
  • 2
  • 10
  • 29
1
vote
1 answer

java.lang.NoClassDefFoundError: Could not initialize class org.ghost4j.GhostscriptLibrary

I am trying to install Ghostscript on my Linux server so that Ghost4j's PDF Utilities can be used. I installed Ghostscript with LinuxBrew and added the path to Ghostscript binary to $PATH. So after this point, I was getting the following…
Celina
  • 21
  • 1
  • 5
1
vote
2 answers

PDF to PDF/A-2b without dUseCIEColor

My goal is to take arbitrary PDF from the users, and save it as PDF/A-2b. The current approach is to use Ghostscript 9.21 (via ghost4j) to create the converted file. This works but not without some problems. I got it to work with two different sets…
kallehj
  • 302
  • 1
  • 9
1
2 3