當前位置: 首頁>>代碼示例>>C#>>正文


C# pdf.PageResources類代碼示例

本文整理匯總了C#中iTextSharp.text.pdf.PageResources的典型用法代碼示例。如果您正苦於以下問題:C# PageResources類的具體用法?C# PageResources怎麽用?C# PageResources使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PageResources類屬於iTextSharp.text.pdf命名空間,在下文中一共展示了PageResources類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Type3Glyph

 internal Type3Glyph(PdfWriter writer, PageResources pageResources, float wx, float llx, float lly, float urx, float ury, bool colorized) : base(writer) {
     this.pageResources = pageResources;
     this.colorized = colorized;
     if (colorized) {
         content.Append(wx).Append(" 0 d0\n");
     }
     else {
         content.Append(wx).Append(" 0 ").Append(llx).Append(' ').Append(lly).Append(' ').Append(urx).Append(' ').Append(ury).Append(" d1\n");
     }
 }
開發者ID:Gianluigi,項目名稱:dssnet,代碼行數:10,代碼來源:Type3Glyph.cs

示例2: PageStamp

 internal PageStamp(PdfStamperImp stamper, PdfReader reader, PdfDictionary pageN) {
     this.pageN = pageN;
     pageResources = new PageResources();
     PdfDictionary resources = pageN.GetAsDict(PdfName.RESOURCES);
     pageResources.SetOriginalResources(resources, stamper.namePtr);
 }
開發者ID:yu0410aries,項目名稱:itextsharp,代碼行數:6,代碼來源:PdfStamperImp.cs

示例3: InitPage

        /**
        * Initializes a page.
        * <P>
        * If the footer/header is set, it is printed.
        * @throws DocumentException on error
        */
        
        protected internal void InitPage() {
            // the pagenumber is incremented
            pageN++;
            
            // initialisation of some page objects
            annotationsImp.ResetAnnotations();
            pageResources = new PageResources();

            writer.ResetContent();
            if (IsTagged(writer)) {
                graphics = writer.DirectContentUnder.Duplicate;
                writer.DirectContent.duplicatedFrom = graphics;
            } else{
                graphics = new PdfContentByte(writer);
            }

            SetNewPageSizeAndMargins();
            imageEnd = -1;
            indentation.imageIndentRight = 0;
            indentation.imageIndentLeft = 0;
            indentation.indentBottom = 0;
            indentation.indentTop = 0;
            currentHeight = 0;
            
            // backgroundcolors, etc...
            thisBoxSize = new Dictionary<String, PdfRectangle>(boxSize);
            if (pageSize.BackgroundColor != null
            || pageSize.HasBorders()
            || pageSize.BorderColor != null) {
                Add(pageSize);
            }

            float oldleading = leading;
            int oldAlignment = alignment;
            pageEmpty = true;
            // if there is an image waiting to be drawn, draw it
            if (imageWait != null) {
                Add(imageWait);
                imageWait = null;
            }
            leading = oldleading;
            alignment = oldAlignment;
            CarriageReturn();
            
            IPdfPageEvent pageEvent = writer.PageEvent;
            if (pageEvent != null) {
                if (firstPageEvent) {
                    pageEvent.OnOpenDocument(writer, this);
                }
                pageEvent.OnStartPage(writer, this);
            }
            firstPageEvent = false;
        }
開發者ID:NelsonSantos,項目名稱:fyiReporting-Android,代碼行數:60,代碼來源:PdfDocument.cs

示例4: StampContent

 /** Creates a new instance of StampContent */
 internal StampContent(PdfWriter writer, PageResources pageResources)
     : base(writer)
 {
     this.pageResources = pageResources;
 }
開發者ID:boecko,項目名稱:iTextSharp,代碼行數:6,代碼來源:PdfCopy.cs

示例5: GetUnderContent

 public PdfContentByte GetUnderContent()
 {
     if (under == null) {
         if (pageResources == null) {
             pageResources = new PageResources();
             PdfDictionary resources = pageN.GetAsDict(PdfName.RESOURCES);
             pageResources.SetOriginalResources(resources, cstp.namePtr);
         }
         under = new PdfCopy.StampContent(cstp, pageResources);
     }
     return under;
 }
開發者ID:boecko,項目名稱:iTextSharp,代碼行數:12,代碼來源:PdfCopy.cs

示例6: AddPage

 /**
  * Adds a blank page.
  * @param	rect The page dimension
  * @param	rotation The rotation angle in degrees
  * @since	2.1.5
  */
 public void AddPage(Rectangle rect, int rotation)
 {
     PdfRectangle mediabox = new PdfRectangle(rect, rotation);
     PageResources resources = new PageResources();
     PdfPage page = new PdfPage(mediabox, new Dictionary<String, PdfRectangle>(), resources.Resources, 0);
     page.Put(PdfName.TABS, Tabs);
     root.AddPage(page);
     ++currentPageNumber;
 }
開發者ID:boecko,項目名稱:iTextSharp,代碼行數:15,代碼來源:PdfCopy.cs

示例7: PdfTemplate

 /**
 * Creates new PdfTemplate
 *
 * @param wr the <CODE>PdfWriter</CODE>
 */
 
 internal PdfTemplate(PdfWriter wr) : base(wr) {
     type = TYPE_TEMPLATE;
     pageResources = new PageResources();
     pageResources.AddDefaultColor(wr.DefaultColorspace);
     thisReference = writer.PdfIndirectReference;
 }
開發者ID:nicecai,項目名稱:iTextSharp-4.1.6,代碼行數:12,代碼來源:PdfTemplate.cs

示例8: InitPage

        /**
        * Initializes a page.
        * <P>
        * If the footer/header is set, it is printed.
        * @throws DocumentException on error
        */
        
        protected internal void InitPage() {
            // the pagenumber is incremented
            pageN++;
            
            // initialisation of some page objects
            annotationsImp.ResetAnnotations();
            pageResources = new PageResources();

            writer.ResetContent();
            graphics = new PdfContentByte(writer);
            text = new PdfContentByte(writer);
            text.Reset();
            text.BeginText();
            textEmptySize = text.Size;

            markPoint = 0;
            SetNewPageSizeAndMargins();
            imageEnd = -1;
            indentation.imageIndentRight = 0;
            indentation.imageIndentLeft = 0;
            indentation.indentBottom = 0;
            indentation.indentTop = 0;
            currentHeight = 0;
            
            // backgroundcolors, etc...
            thisBoxSize = new Hashtable(boxSize);
            if (pageSize.BackgroundColor != null
            || pageSize.HasBorders()
            || pageSize.BorderColor != null) {
                Add(pageSize);
            }

            float oldleading = leading;
            int oldAlignment = alignment;
            // we move to the left/top position of the page
            text.MoveText(Left, Top);
            pageEmpty = true;
            // if there is an image waiting to be drawn, draw it
            if (imageWait != null) {
                Add(imageWait);
                imageWait = null;
            }
            leading = oldleading;
            alignment = oldAlignment;
            CarriageReturn();
            
            IPdfPageEvent pageEvent = writer.PageEvent;
            if (pageEvent != null) {
                if (firstPageEvent) {
                    pageEvent.OnOpenDocument(writer, this);
                }
                pageEvent.OnStartPage(writer, this);
            }
            firstPageEvent = false;
        }
開發者ID:pusp,項目名稱:o2platform,代碼行數:62,代碼來源:PdfDocument.cs

示例9: StampContent

 /** Creates a new instance of StampContent */
 internal StampContent(PdfStamperImp stamper, PdfStamperImp.PageStamp ps)
     : base(stamper)
 {
     this.ps = ps;
     pageResources = ps.pageResources;
 }
開發者ID:bmictech,項目名稱:iTextSharp,代碼行數:7,代碼來源:StampContent.cs


注:本文中的iTextSharp.text.pdf.PageResources類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。