mirror of
https://github.com/wmjordan/PDFPatcher.git
synced 2026-10-18 21:52:34 +08:00
35 lines
937 B
C#
35 lines
937 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using iTextSharp.text.pdf;
|
|
using PDFPatcher.Model;
|
|
|
|
namespace PDFPatcher.Processor
|
|
{
|
|
internal sealed class OperatorGroup : PdfContentStreamProcessor.IContentOperator
|
|
{
|
|
/// <summary>
|
|
/// 处理内容的 <see cref="PdfContentStreamProcessor.IContentOperator"/> 列表。
|
|
/// </summary>
|
|
public List<PdfContentStreamProcessor.IContentOperator> Operators { get; private set; }
|
|
|
|
public OperatorGroup(IEnumerable<PdfContentStreamProcessor.IContentOperator> operators) {
|
|
Operators = new List<PdfContentStreamProcessor.IContentOperator>();
|
|
if (operators != null) {
|
|
Operators.AddRange(operators);
|
|
}
|
|
}
|
|
|
|
#region IContentOperator 成员
|
|
|
|
public void Invoke(PdfContentStreamProcessor processor, PdfLiteral oper, List<PdfObject> operands) {
|
|
foreach (var item in Operators) {
|
|
item.Invoke(processor, oper, operands);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
}
|