protected internal PdfIndirectReference GetReferenceJBIG2Globals(byte[] content)
{
if (content == null) return null;
foreach (PdfStream str in JBIG2Globals.Keys) {
if (Org.BouncyCastle.Utilities.Arrays.AreEqual(content, str.GetBytes())) {
return JBIG2Globals[str];
}
}
PdfStream stream = new PdfStream(content);
PdfIndirectObject refi;
try {
refi = AddToBody(stream);
} catch (IOException) {
return null;
}
JBIG2Globals[stream] = refi.IndirectReference;
return refi.IndirectReference;
}