Esempio n. 1
0
 /** @see javax.swing.table.TableModel#getValueAt(int, int) */
 public Object getValueAt(int rowIndex, int columnIndex) {
   switch (columnIndex) {
     case 0:
       return array.getPdfObject(rowIndex);
     default:
       return null;
   }
 }
    public void invoke(
        PdfContentStreamProcessor processor, PdfLiteral operator, ArrayList<PdfObject> operands) {
      PdfName dictionaryName = (PdfName) operands.get(0);
      PdfDictionary extGState = processor.resources.getAsDict(PdfName.EXTGSTATE);
      if (extGState == null)
        throw new IllegalArgumentException(
            "Resources do not contain ExtGState entry. Unable to process operator " + operator);
      PdfDictionary gsDic = extGState.getAsDict(dictionaryName);
      if (gsDic == null)
        throw new IllegalArgumentException(
            dictionaryName + " is an unknown graphics state dictionary");

      PdfArray fontParameter = gsDic.getAsArray(PdfName.FONT);
      if (fontParameter != null) {
        CMapAwareDocumentFont font =
            new CMapAwareDocumentFont((PRIndirectReference) fontParameter.getPdfObject(0));
        float size = fontParameter.getAsNumber(1).floatValue();

        processor.gs().font = font;
        processor.gs().fontSize = size;
      }
    }