/** * Instantiate a new PDFTextStripper object. * * @throws IOException If there is an error loading the properties. */ public PrintTextColors() throws IOException { addOperator(new SetStrokingColorSpace()); addOperator(new SetNonStrokingColorSpace()); addOperator(new SetStrokingDeviceCMYKColor()); addOperator(new SetNonStrokingDeviceCMYKColor()); addOperator(new SetNonStrokingDeviceRGBColor()); addOperator(new SetStrokingDeviceRGBColor()); addOperator(new SetNonStrokingDeviceGrayColor()); addOperator(new SetStrokingDeviceGrayColor()); addOperator(new SetStrokingColor()); addOperator(new SetStrokingColorN()); addOperator(new SetNonStrokingColor()); addOperator(new SetNonStrokingColorN()); }
@Override public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace colorSpace = getColorSpace(); if (!(colorSpace instanceof PDPattern)) { if (arguments.size() < colorSpace.getNumberOfComponents()) { throw new MissingOperandException(operator, arguments); } if (!checkArrayTypesClass(arguments, COSNumber.class)) { return; } } COSArray array = new COSArray(); array.addAll(arguments); setColor(new PDColor(array, colorSpace)); }
@Override public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace cs = context.getResources().getColorSpace(COSName.DEVICEGRAY); context.getGraphicsState().setNonStrokingColorSpace(cs); super.process(operator, arguments); }
@Override public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace cs = context.getResources().getColorSpace(COSName.DEVICECMYK); context.getGraphicsState().setStrokingColorSpace(cs); super.process(operator, arguments); }
/** * Instantiate a new PDFTextStripper object. * * @throws IOException If there is an error loading the properties. */ public PrintTextColors() throws IOException { addOperator(new SetStrokingColorSpace()); addOperator(new SetNonStrokingColorSpace()); addOperator(new SetStrokingDeviceCMYKColor()); addOperator(new SetNonStrokingDeviceCMYKColor()); addOperator(new SetNonStrokingDeviceRGBColor()); addOperator(new SetStrokingDeviceRGBColor()); addOperator(new SetNonStrokingDeviceGrayColor()); addOperator(new SetStrokingDeviceGrayColor()); addOperator(new SetStrokingColor()); addOperator(new SetStrokingColorN()); addOperator(new SetNonStrokingColor()); addOperator(new SetNonStrokingColorN()); }
@Override public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace cs = context.getResources().getColorSpace(COSName.DEVICECMYK); context.getGraphicsState().setNonStrokingColorSpace(cs); super.process(operator, arguments); }
@Override public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace cs = context.getResources().getColorSpace(COSName.DEVICEGRAY); context.getGraphicsState().setStrokingColorSpace(cs); super.process(operator, arguments); }
addOperator(new Concatenate()); addOperator(new SetStrokingColorSpace()); addOperator(new SetNonStrokingColorSpace()); addOperator(new SetLineDashPattern()); addOperator(new DrawObject()); addOperator(new SetStrokingDeviceCMYKColor()); addOperator(new SetNonStrokingDeviceCMYKColor()); addOperator(new SetNonStrokingDeviceRGBColor()); addOperator(new SetStrokingDeviceRGBColor()); addOperator(new SetNonStrokingDeviceGrayColor()); addOperator(new SetStrokingDeviceGrayColor()); addOperator(new SetStrokingColor()); addOperator(new SetStrokingColorN()); addOperator(new SetNonStrokingColor()); addOperator(new SetNonStrokingColorN());
@Override public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace cs = context.getResources().getColorSpace(COSName.DEVICERGB); context.getGraphicsState().setNonStrokingColorSpace(cs); super.process(operator, arguments); }
/** * RG Set the stroking colour space to DeviceRGB and set the colour to * use for stroking operations. * * @param operator The operator that is being executed. * @param arguments List * @throws IOException If the color space cannot be read. */ @Override public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace cs = context.getResources().getColorSpace(COSName.DEVICERGB); context.getGraphicsState().setStrokingColorSpace(cs); super.process(operator, arguments); }
addOperator(new CurveTo()); addOperator(new Concatenate()); addOperator(new SetStrokingColorSpace()); addOperator(new SetNonStrokingColorSpace()); addOperator(new SetLineDashPattern()); addOperator(new DrawObject()); // special graphics version addOperator(new LegacyFillNonZeroRule()); addOperator(new FillEvenOddRule()); addOperator(new SetStrokingDeviceGrayColor()); addOperator(new SetNonStrokingDeviceGrayColor()); addOperator(new SetGraphicsStateParameters()); addOperator(new ClosePath()); addOperator(new SetLineJoinStyle()); addOperator(new SetLineCapStyle()); addOperator(new SetStrokingDeviceCMYKColor()); addOperator(new SetNonStrokingDeviceCMYKColor()); addOperator(new LineTo()); addOperator(new MoveTo()); addOperator(new Restore()); addOperator(new AppendRectangleToPath()); addOperator(new SetStrokingDeviceRGBColor()); addOperator(new SetNonStrokingDeviceRGBColor()); addOperator(new SetRenderingIntent()); addOperator(new CloseAndStrokePath()); addOperator(new StrokePath()); addOperator(new SetStrokingColor());
@Override public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace cs = context.getResources().getColorSpace(COSName.DEVICERGB); context.getGraphicsState().setNonStrokingColorSpace(cs); super.process(operator, arguments); }
@Override public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace cs = context.getResources().getColorSpace(COSName.DEVICECMYK); context.getGraphicsState().setStrokingColorSpace(cs); super.process(operator, arguments); }
public PDFBoxTree() throws IOException { super(); super.setSortByPosition(true); super.setSuppressDuplicateOverlappingText(true); //add operators for tracking the graphic state addOperator(new SetStrokingColorSpace()); addOperator(new SetNonStrokingColorSpace()); addOperator(new SetLineDashPattern()); addOperator(new SetStrokingDeviceGrayColor()); addOperator(new SetNonStrokingDeviceGrayColor()); addOperator(new SetFlatness()); addOperator(new SetLineJoinStyle()); addOperator(new SetLineCapStyle()); addOperator(new SetStrokingDeviceCMYKColor()); addOperator(new SetNonStrokingDeviceCMYKColor()); addOperator(new SetLineMiterLimit()); addOperator(new SetStrokingDeviceRGBColor()); addOperator(new SetNonStrokingDeviceRGBColor()); addOperator(new SetRenderingIntent()); addOperator(new SetStrokingColor()); addOperator(new SetNonStrokingColor()); addOperator(new SetStrokingColorN()); addOperator(new SetNonStrokingColorN()); addOperator(new SetFontAndSize()); addOperator(new SetLineWidth()); init(); }
@Override public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace cs = context.getResources().getColorSpace(COSName.DEVICEGRAY); context.getGraphicsState().setNonStrokingColorSpace(cs); super.process(operator, arguments); }
public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace cs = context.getResources().getColorSpace(COSName.DEVICEGRAY); context.getGraphicsState().setStrokingColorSpace(cs); super.process(operator, arguments); }
@Override public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace cs = context.getResources().getColorSpace(COSName.DEVICECMYK); context.getGraphicsState().setNonStrokingColorSpace(cs); super.process(operator, arguments); }
public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace cs = context.getResources().getColorSpace(COSName.DEVICEGRAY); context.getGraphicsState().setStrokingColorSpace(cs); super.process(operator, arguments); }
@Override public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace cs = context.getResources().getColorSpace(COSName.DEVICECMYK); context.getGraphicsState().setNonStrokingColorSpace(cs); super.process(operator, arguments); }
@Override public void process(Operator operator, List<COSBase> arguments) throws IOException { PDColorSpace cs = context.getResources().getColorSpace(COSName.DEVICEGRAY); context.getGraphicsState().setNonStrokingColorSpace(cs); super.process(operator, arguments); }