⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pdfpage.cs

📁 PDF文档生成解析使用的库,可以用来改写自己的文档格式
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using AnotherPDFLib.PdfGraphics;

namespace AnotherPDFLib
{
	public partial class PdfPage : PdfPageBase
	{
		public PdfPage() : base("Page")
		{
		}

		public DateTime LastModified
		{
			get
			{
				PdfDateTime lastmodified = this["LastModified"] as PdfDateTime;
				if (lastmodified != null)
				{
					return lastmodified.Value;
				}
				return DateTime.MinValue;
			}
			set
			{
				this["LastModified"] = new PdfDateTime(value);
			}
		}

		/// <summary>
		/// specify page's Contents as a single stream.
		/// </summary>
		public PdfContentStream Content
		{
			get
			{
				return this["Contents"] as PdfContentStream;
			}
			set
			{
				this["Contents"] = value;
			}
		}

		/// <summary>
		/// specify page's Contents as an array of streams.
		/// </summary>
		public PdfArray Contents
		{
			get
			{
				PdfArray contents = this["Contents"] as PdfArray;
				if (contents == null)
				{
					contents = new PdfArray();
					this["Contents"] = contents;
				}
				return contents;
			}
			set
			{
				this["Contents"] = value;
			}
		}

		/// <summary>
		/// A rectangle, expressed in default user space units,
		/// defining the region to which the contents of the page should be clipped
		/// when output in a production environment.
		/// Default value: the value of CropBox.
		/// </summary>
		public PdfRectangle BleedBox
		{
			get
			{
				return this["BleedBox"] as PdfRectangle;
			}
			set
			{
				this["BleedBox"] = value;
			}
		}

		/// <summary>
		/// A rectangle, expressed in default user space units,
		/// defining the intended dimensions of the finished page after trimming.
		/// Default value: the value of CropBox.
		/// </summary>
		public PdfRectangle TrimBox
		{
			get
			{
				return this["TrimBox"] as PdfRectangle;
			}
			set
			{
				this["TrimBox"] = value;
			}
		}

		/// <summary>
		/// A rectangle, expressed in default user space units,
		/// defining the extent of the page's meaningful content as intended by the page's creator.
		/// Default value: the value of CropBox.
		/// </summary>
		public PdfRectangle ArtBox
		{
			get
			{
				return this["ArtBox"] as PdfRectangle;
			}
			set
			{
				this["ArtBox"] = value;
			}
		}

		/// <summary>
		/// An array of annotations associated with the page.
		/// </summary>
		public PdfArray Annots
		{
			get
			{
				PdfArray annots = this["Annots"] as PdfArray;
				if (annots == null)
				{
					annots = new PdfArray();
					this["Annots"] = annots;
				}
				return annots;
			}
			set
			{
				this["Annots"] = value;
			}
		}

		/// <summary>
		/// The page's preferred zoom (magnification) factor:
		/// the factor by which it should be scaled to achieve the natural display magnification.
		/// </summary>
		public double ZoomFactor
		{
			get
			{
				PdfReal zoomfactor = this["PZ"] as PdfReal;
				if (zoomfactor != null)
				{
					return zoomfactor.Value;
				}
				return 0;
			}
			set
			{
				this["PZ"] = new PdfReal(value);
			}
		}

		/// <summary>
		/// A positive number giving the size of default user space units,
		/// in multiples of 1/72 inch.
		/// </summary>
		public double UserUnit
		{
			get
			{
				PdfReal userunit = this["UserUnit"] as PdfReal;
				if (userunit != null)
				{
					return userunit.Value;
				}
				return 0;
			}
			set
			{
				this["UserUnit"] = new PdfReal(value);
			}
		}

	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -