Exemplo n.º 1
0
        public virtual void BeginMarkerContentOperatorTest()
        {
            PdfCanvasProcessor processor       = new _PdfCanvasProcessor_42(new FilteredEventListener());
            IContentOperator   contentOperator = processor.RegisterContentOperator("BMC", null);

            processor.RegisterContentOperator("BMC", contentOperator);
            contentOperator.Invoke(processor, null, JavaCollectionsUtil.SingletonList((PdfObject)null));
        }
        /**
         * Registers a content oper that will be called when the specified oper string is encountered during content processing.
         * <br>
         * If you register an oper, it is a very good idea to pass the call on to the existing registered oper (returned by this call), otherwise you
         * may inadvertently change the internal behavior of the processor.
         * @param operatorString the oper id, or DEFAULTOPERATOR for a catch-all oper
         * @param oper the oper that will receive notification when the oper is encountered
         * @return the existing registered oper, if any
         * @since 2.1.7
         */
        public IContentOperator RegisterContentOperator(String operatorString, IContentOperator oper)
        {
            IContentOperator value = null;

            if (operators.ContainsKey(operatorString))
            {
                value = operators[operatorString];
            }
            operators[operatorString] = oper;
            return(value);
        }
Exemplo n.º 3
0
 /**
  * Registers a content oper that will be called when the specified oper string is encountered during content processing.
  * <br>
  * If you register an oper, it is a very good idea to pass the call on to the existing registered oper (returned by this call), otherwise you
  * may inadvertently change the internal behavior of the processor.
  * @param operatorString the oper id, or DEFAULTOPERATOR for a catch-all oper
  * @param oper the oper that will receive notification when the oper is encountered
  * @return the existing registered oper, if any
  * @since 2.1.7
  */
 public IContentOperator RegisterContentOperator(String operatorString, IContentOperator oper){
     IContentOperator value = null;
     if (operators.ContainsKey(operatorString))
         value = operators[operatorString];
     operators[operatorString] = oper;
     return value;
 }
Exemplo n.º 4
0
        //
        // Overrides of PdfContentStreamProcessor methods
        //

        public override IContentOperator RegisterContentOperator(string operatorString, IContentOperator newOperator)
        {
            var wrapper = new ContentOperatorWrapper()
            {
                OriginalOperator = newOperator
            };
            var formerOperator = base.RegisterContentOperator(operatorString, wrapper);

            return(formerOperator is ContentOperatorWrapper operatorWrapper ? operatorWrapper.OriginalOperator : formerOperator);
        }
Exemplo n.º 5
0
 /**
  * Registers a content oper that will be called when the specified oper string is encountered during content processing.
  * <br>
  * If you register an oper, it is a very good idea to pass the call on to the existing registered oper (returned by this call), otherwise you
  * may inadvertently change the internal behavior of the processor.
  * @param operatorString the oper id, or DEFAULTOPERATOR for a catch-all oper
  * @param oper the oper that will receive notification when the oper is encountered
  * @return the existing registered oper, if any
  * @since 2.1.7
  */
 public IContentOperator RegisterContentOperator(String operatorString, IContentOperator oper)
 {
     return(operators[operatorString] = oper);
 }
Exemplo n.º 6
0
 /**
  * Registers a content oper that will be called when the specified oper string is encountered during content processing.
  * <br>
  * If you register an oper, it is a very good idea to pass the call on to the existing registered oper (returned by this call), otherwise you
  * may inadvertently change the internal behavior of the processor.
  * @param operatorString the oper id, or DEFAULTOPERATOR for a catch-all oper
  * @param oper the oper that will receive notification when the oper is encountered
  * @return the existing registered oper, if any
  * @since 2.1.7
  */
 public IContentOperator RegisterContentOperator(String operatorString, IContentOperator oper){
     return operators[operatorString] = oper;
 }
 public void SetOriginalOperator(IContentOperator op)
 {
     this._originalOperator = op;
 }