public PdfContentWriter(DocumentRenderingContext context, PdfDictionary contentDictionary)
{
if (!(contentDictionary is IContentStream))
throw new ArgumentException("contentDictionary must implement IContentStream.");
this.context = context;
this.contentDictionary = contentDictionary;
this.contentStreamDictionary = (IContentStream)contentDictionary;
this.renderMode = RenderMode.Default;
//this.colorMode = page.document.Options.ColorMode;
//this.options = options;
this.content = new StringBuilder();
this.graphicsState = new PdfGraphicsState(this);
}