Inheritance: PdfStream
示例#1
0
 /**
  * Adds some <CODE>PdfContents</CODE> to this Writer.
  * <P>
  * The document has to be open before you can begin to add content
  * to the body of the document.
  *
  * @return a <CODE>PdfIndirectReference</CODE>
  * @param page the <CODE>PdfPage</CODE> to add
  * @param contents the <CODE>PdfContents</CODE> of the page
  * @throws PdfException on error
  */
  internal virtual PdfIndirectReference Add(PdfPage page, PdfContents contents) {
      if (!open) {
          throw new PdfException(MessageLocalization.GetComposedMessage("the.document.is.not.open"));
      }
      PdfIndirectObject objecta;
      objecta = AddToBody(contents);
      page.Add(objecta.IndirectReference);
      if (group != null) {
          page.Put(PdfName.GROUP, group);
          group = null;
      }
      else if (rgbTransparencyBlending) {
          PdfDictionary pp = new PdfDictionary();
          pp.Put(PdfName.TYPE, PdfName.GROUP);
          pp.Put(PdfName.S, PdfName.TRANSPARENCY);
          pp.Put(PdfName.CS, PdfName.DEVICERGB);
          page.Put(PdfName.GROUP, pp);
      }
      root.AddPage(page);
      currentPageNumber++;
      return null;
  }
 /// <summary>
 /// Signals that the  Document  was closed and that no other
 ///  Elements  will be added.
 ///
 /// The pages-tree is built and written to the outputstream.
 /// A Catalog is constructed, as well as an Info-object,
 /// the referencetable is composed and everything is written
 /// to the outputstream embedded in a Trailer.
 /// </summary>
 internal override PdfIndirectReference Add(PdfPage page, PdfContents contents)
 {
     return(null);
 }
示例#3
0
 internal override PdfIndirectReference Add(PdfPage page, PdfContents contents)
 {
     return null;
 }
示例#4
0
 /**
 * Adds some <CODE>PdfContents</CODE> to this Writer.
 * <P>
 * The document has to be open before you can begin to add content
 * to the body of the document.
 *
 * @return a <CODE>PdfIndirectReference</CODE>
 * @param page the <CODE>PdfPage</CODE> to add
 * @param contents the <CODE>PdfContents</CODE> of the page
 * @throws PdfException on error
 */
 internal virtual PdfIndirectReference Add(PdfPage page, PdfContents contents)
 {
     if (!open) {
         throw new PdfException("The document isn't open.");
     }
     PdfIndirectObject objecta;
     objecta = AddToBody(contents);
     page.Add(objecta.IndirectReference);
     if (group != null) {
         page.Put(PdfName.GROUP, group);
         group = null;
     }
     root.AddPage(page);
     currentPageNumber++;
     return null;
 }