问题
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 PDFDocument();
document.load(new File("M:\\test.pdf"));
SimpleRenderer renderer = new SimpleRenderer();
renderer.setResolution(300);
List<Image> images = renderer.render(document);
but I get the following error:
error: cannot find symbol List images = renderer.render(document); ^ symbol: class Image location: class ImageRead 1 error
which indicates that compiler cannot find symbol "Image". I'm not sure why?
来源:https://stackoverflow.com/questions/61872881/java-convert-pdf-to-image-using-ghost4j