coords1.add(COSInteger.get(600));
axialShading.setCoords(coords1);
axialShading.setFunction(func);
// radial shading with attributes
PDShadingType3 radialShading = new PDShadingType3(new COSDictionary());
radialShading.setColorSpace(PDDeviceRGB.INSTANCE);
radialShading.setShadingType(PDShading.SHADING_TYPE3);
COSArray coords2 = new COSArray();
coords2.add(COSInteger.get(100));
coords2.add(COSInteger.get(400));
coords2.add(COSInteger.get(50)); // radius1
coords2.add(COSInteger.get(400));
coords2.add(COSInteger.get(600));
coords2.add(COSInteger.get(150)); // radius2
radialShading.setCoords(coords2);
radialShading.setFunction(func);
// create resources
PDResources resources = new PDResources();
page.setResources(resources);