本文整理匯總了C#中iTextSharp.text.pdf.PdfStream.GetAsDict方法的典型用法代碼示例。如果您正苦於以下問題:C# PdfStream.GetAsDict方法的具體用法?C# PdfStream.GetAsDict怎麽用?C# PdfStream.GetAsDict使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類iTextSharp.text.pdf.PdfStream
的用法示例。
在下文中一共展示了PdfStream.GetAsDict方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: HandleXObject
public void HandleXObject(PdfContentStreamProcessor processor, PdfStream stream, PdfIndirectReference refi) {
PdfDictionary resources = stream.GetAsDict(PdfName.RESOURCES);
// we read the content bytes up here so if it fails we don't leave the graphics state stack corrupted
// this is probably not necessary (if we fail on this, probably the entire content stream processing
// operation should be rejected
byte[] contentBytes;
contentBytes = ContentByteUtils.GetContentBytesFromContentObject(stream);
PdfArray matrix = stream.GetAsArray(PdfName.MATRIX);
new PushGraphicsState().Invoke(processor, null, null);
if (matrix != null){
float a = matrix.GetAsNumber(0).FloatValue;
float b = matrix.GetAsNumber(1).FloatValue;
float c = matrix.GetAsNumber(2).FloatValue;
float d = matrix.GetAsNumber(3).FloatValue;
float e = matrix.GetAsNumber(4).FloatValue;
float f = matrix.GetAsNumber(5).FloatValue;
Matrix formMatrix = new Matrix(a, b, c, d, e, f);
processor.Gs().ctm = formMatrix.Multiply(processor.Gs().ctm);
}
processor.ProcessContent(contentBytes, resources);
new PopGraphicsState().Invoke(processor, null, null);
}