internal override void pdfWriteToDocument(PdfDocumentWriter document, PdfStreamWriter writer) { writer.WriteDictionaryBegin(); { writer.WriteName("Type"); writer.WriteName("Page"); writer.WriteName("Parent"); writer.WriteReference(document, Parent); writer.WriteName("MediaBox"); writer.WriteArrayBegin(); { writer.WriteInteger(0); writer.WriteInteger(0); writer.WriteNumber(_pageSize.width.pnts); writer.WriteNumber(_pageSize.height.pnts); } writer.WriteArrayEnd(); writer.WriteName("CropBox"); writer.WriteRectangle(_cropBox); if (_bleedBox != _cropBox) { writer.WriteName("BleedBox"); writer.WriteRectangle(_bleedBox); } if (_trimBox != _cropBox) { writer.WriteName("TrimBox"); writer.WriteRectangle(_trimBox); } if (_artBox != _cropBox) { writer.WriteName("ArtBox"); writer.WriteRectangle(_artBox); } writer.WriteName("Contents"); writer.WriteArrayBegin(); for (var curContent = this._content; curContent != null; curContent = curContent.Parent) { writer.WriteReference(document.GetReference(curContent)); } writer.WriteArrayEnd(); writer.WriteName("Resources"); writer.WriteDictionaryBegin(); { writer.WriteName("ProcSet"); writer.WriteArrayBegin(); { writer.WriteName("PDF"); writer.WriteName("Text"); writer.WriteName("ImageB"); writer.WriteName("ImageC"); } writer.WriteArrayEnd(); _content.Resources.pdfWriteResources(document, writer); } writer.WriteDictionaryEnd(); } writer.WriteDictionaryEnd(); }