You’ll need to use the latest 2.0.0 snapshot jar, which is the unstable version 
from trunk
and the place where new development occurs.

-- John

On 28 Feb 2014, at 05:04, Thimal Kempitiya <[email protected]> wrote:

> Hi,
> I'm Thimal Kempitiya, third year computer science and engineering
> undergraduate at university of moratuwa. I'm interested in the project idea
> "implement shading with Coons and tensor-product patch meshes". I have the
> basic knowledge about the cubic Bézier curves", , "bilinear interpolation",
> " and "Bernstein polynomials and i think can manage rest of the mathematics
> needed for this project. Also I have the java knowledge to do the
> implementation part.
> 
> I clone the PDFBOX repository and checked the code regarding to the shading
> and I tried some examples in pdfbox cook book.
> 
> Also I tried code to work with the type 1 shading type.
> 
>        File f=new File("C:\\asy-latticeshading.pdf");
>        try {
>            PDDocument doc=PDDocument.load(f);
>               PDPage p;
>          p=(PDPage)doc.getDocumentCatalog().getAllPages().get(0);
>          PDShadingType1 pdst1=new PDShadingType1(p.getCOSDictionary());
>          PDRectangle pdr=p.findCropBox();
>          PDGraphicsState pdg=new PDGraphicsState(pdr);
>          Matrix m=pdg.getCurrentTransformationMatrix();
>          Type1ShadingPaint t1sp=new Type1ShadingPaint(pdst1, m,
> (int)p.findCropBox().getHeight());
> 
> But this give me error saying unknown shading type 0
> java.io.IOException: Error: Unknown shading type 0
> 
> can you please tell me what I'm doing wrong here and how can i solve this.
> -- 
> 
> 
> 
> 
> *Thimal Kempitiya <http://www.facebook.com/thimalk> UndergraduateDepartment
> of Computer Science and Engineering University of Moratuwa.*

Reply via email to