0

I am having the high quality image in pdf and when converting this into image, the images are fading out.(using jar file PDFRENDER 0.9.1) i having the image in pdf form like this enter image description here

and after converting this into image, the image is shown as

enter image description here

I am getting an error

Unsupported function type 4. at com.sun.pdfview.function.FunctionType4.parse(FunctionType4.java:828) at com.sun.pdfview.function.PDFFunction.getFunction(PDFFunction.java:168) at com.sun.pdfview.colorspace.PDFColorSpace.getColorSpace(PDFColorSpace.java:176) at com.sun.pdfview.pattern.PDFShader.getShader(PDFShader.java:144) at com.sun.pdfview.PDFParser.doShader(PDFParser.java:1145) at com.sun.pdfview.PDFParser.iterate(PDFParser.java:633) at com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101) at java.lang.Thread.run(Thread.java:619)

So what is the solution for this

1 Answers1

0

As the exception says, there is an Unsupported function type 4 in the OP's PDF, somewhere in the context of some shader colorspace definition.

A type 4 function (PDF 1.3), also called a PostScript calculator function, shall be represented as a stream containing code written in a small subset of the PostScript language.

(ISO 32000-1 section 7.10.5)

It looks like PDFRENDER 0.9.1 does not support (some) such type 4 functions. Thus one either has to refrain from using them or switch to a different PDF renderer.

Unfortunately the OP has not shared the PDF (unless I overlooked it). So I can neither test other renderers nor check where exactly that function is used.

Community
  • 1
  • 1
mkl
  • 90,588
  • 15
  • 125
  • 265
  • so how can i overcome from this problem, any other pdfrender is their which can help to correct the image –  Aug 01 '14 at 09:18
  • @programmer There well might be other renderers which can properly handle those *PostScript calculator functions*; they may not be available for free, though. As you have not shared the PDF in question, only you can test them. – mkl Aug 01 '14 at 09:24