PdfObject Resources=PatternObj.getDictionary(PdfDictionary.Resources);
//decode and create graphic of glyph
PdfStreamDecoder glyphDecoder=new PdfStreamDecoder(currentPdfFile);
glyphDecoder.setParameters(false,true,7,0);
glyphDecoder.setIntValue(ValueTypes.StreamType, ValueTypes.PATTERN);
glyphDecoder.setObjectValue(ValueTypes.ObjectStore,localStore);
//glyphDecoder.setMultiplier(multiplyer);
//T3Renderer glyphDisplay=new T3Display(0,false,20,localStore);
T3Renderer glyphDisplay=new PatternDisplay(0,false,20,localStore);
glyphDisplay.setOptimisedRotation(false);
try{
glyphDecoder.setObjectValue(ValueTypes.DynamicVectorRenderer,glyphDisplay);
/**read the resources for the page*/
if (Resources != null){
glyphDecoder.readResources(Resources,true);
}
glyphDecoder.setDefaultColors(gs.getStrokeColor(),gs.getNonstrokeColor());
/**
* setup matrix so scales correctly
**/
GraphicsState currentGraphicsState=new GraphicsState(0,0);
//multiply to get new CTM
if(matrix!=null)
currentGraphicsState.CTM =matrix;
glyphDecoder.decodePageContent(currentGraphicsState, streamData);
} catch (PdfException e1) {
e1.printStackTrace();
}