本文整理汇总了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");
}
}
示例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);
}
示例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;
}
示例4: StampContent
/** Creates a new instance of StampContent */
internal StampContent(PdfWriter writer, PageResources pageResources)
: base(writer)
{
this.pageResources = pageResources;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例9: StampContent
/** Creates a new instance of StampContent */
internal StampContent(PdfStamperImp stamper, PdfStamperImp.PageStamp ps)
: base(stamper)
{
this.ps = ps;
pageResources = ps.pageResources;
}