Class Document

Class Document

Tên không gian: Aspose.Pdf Tổng hợp: Aspose.PDF.dll (25.4.0)

Lớp đại diện cho tài liệu PDF.

public sealed class Document : IDisposable

Inheritance

object Document

Implements

IDisposable

Thành viên thừa kế

object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

Document(Stream)

Bắt đầu mẫu tài liệu mới từ dòng nhập .

public Document(Stream input)

Parameters

input Stream

Stream với PDF tài liệu.

Document(Lời bài hát: Bool)

Bắt đầu mẫu tài liệu mới từ dòng nhập .

public Document(Stream input, bool isManagedStream)

Parameters

input Stream

Stream với PDF tài liệu.

isManagedStream bool

Nếu thiết lập cho dòng bên trong ’thực tế’ được đóng trước khi rời đi; nếu không, thì không.

Document(dòng, string)

Bắt đầu mẫu tài liệu mới từ dòng nhập .

public Document(Stream input, string password)

Parameters

input Stream

Input stream object, tương ứng pdf là mật khẩu được bảo vệ.

password string

Người dùng hoặc mật khẩu chủ sở hữu.

Document(Stream, dòng, ICustomSecurityHandler)

Bắt đầu mẫu tài liệu mới từ dòng nhập .

public Document(Stream input, string password, ICustomSecurityHandler customSecurityHandler)

Parameters

input Stream

Input stream object, tương ứng pdf là mật khẩu được bảo vệ.

password string

Người dùng hoặc mật khẩu chủ sở hữu.

customSecurityHandler ICustomSecurityHandler

Công ty bảo mật tiêu chuẩn.

Document(dòng, string, bool)

Bắt đầu mẫu tài liệu mới từ dòng nhập .

public Document(Stream input, string password, bool isManagedStream)

Parameters

input Stream

Stream với PDF tài liệu.

password string

Người dùng hoặc mật khẩu chủ sở hữu.

isManagedStream bool

Nếu được thiết lập để “thực sự” dòng bên trong được đóng trước khi rời đi; nếu không, không.

Document(Stream, string, bool, ICustomSecurityHandler)

Bắt đầu mẫu tài liệu mới từ dòng nhập .

public Document(Stream input, string password, bool isManagedStream, ICustomSecurityHandler customSecurityHandler)

Parameters

input Stream

Stream với PDF tài liệu.

password string

Người dùng hoặc mật khẩu chủ sở hữu.

isManagedStream bool

Nếu được thiết lập để “thực sự” dòng bên trong được đóng trước khi rời đi; nếu không, không.

customSecurityHandler ICustomSecurityHandler

Công ty bảo mật tiêu chuẩn.

Document(String)

Chỉ cần init Tài liệu sử dụng filename’. tương tự như Aspose.Pdf.Document.#ctor(System.IO.Stream).

public Document(string filename)

Parameters

filename string

Tên của tệp tài liệu pdf.

Document(Lời bài hát: Bool)

Chỉ cần init Tài liệu sử dụng filename’. tương tự như Aspose.Pdf.Document.#ctor(System.IO.Stream).

public Document(string filename, bool isManagedStream)

Parameters

filename string

Tên của tệp tài liệu pdf.

isManagedStream bool

Nếu được thiết lập để “thực sự” dòng bên trong được đóng trước khi rời đi; nếu không, không.

Document(Thẻ, string, ICustomSecurityHandler)

Bắt đầu một trường hợp mới của lớp Aspose.Pdf.Document để làm việc với tài liệu mã hóa.

public Document(string filename, string password, ICustomSecurityHandler customSecurityHandler)

Parameters

filename string

Tài liệu file name.

password string

Người dùng hoặc mật khẩu chủ sở hữu.

customSecurityHandler ICustomSecurityHandler

Công ty bảo mật tiêu chuẩn.

Document(Thẻ, string)

Bắt đầu một trường hợp mới của lớp Aspose.Pdf.Document để làm việc với tài liệu mã hóa.

public Document(string filename, string password)

Parameters

filename string

Tài liệu file name.

password string

Người dùng hoặc mật khẩu chủ sở hữu.

Document(string, string, bool)

Bắt đầu một trường hợp mới của lớp Aspose.Pdf.Document để làm việc với tài liệu mã hóa.

public Document(string filename, string password, bool isManagedStream)

Parameters

filename string

Tài liệu file name.

password string

Người dùng hoặc mật khẩu chủ sở hữu.

isManagedStream bool

Nếu thiết lập cho dòng bên trong ’thực tế’ được đóng trước khi rời đi; nếu không, thì không.

Document(Thẻ, string, bool, ICustomSecurityHandler)

Bắt đầu một trường hợp mới của lớp Aspose.Pdf.Document để làm việc với tài liệu mã hóa.

public Document(string filename, string password, bool isManagedStream, ICustomSecurityHandler customSecurityHandler)

Parameters

filename string

Tài liệu file name.

password string

Người dùng hoặc mật khẩu chủ sở hữu.

isManagedStream bool

Nếu thiết lập cho dòng bên trong ’thực tế’ được đóng trước khi rời đi; nếu không, thì không.

customSecurityHandler ICustomSecurityHandler

Công ty bảo mật tiêu chuẩn.

Document()

Bắt đầu một tài liệu trống rỗng

public Document()

Document(PdfVersion)

Bắt đầu tài liệu trống theo phiên bản.

public Document(PdfVersion version)

Parameters

version PdfVersion

Phiên bản PDF

Document(LoadOptions, LoadOptions)

Mở một tài liệu hiện có từ một tệp cung cấp các tùy chọn chuyển đổi cần thiết để có được tài liệu pdf.

public Document(string filename, LoadOptions options)

Parameters

filename string

Nhập tệp để chuyển đổi thành tài liệu PDF.

options LoadOptions

Nó đại diện cho các thuộc tính để chuyển đổi filename’ sang tài liệu pdf.

Document(LoadOptions, LoadOptions)

Mở một tài liệu hiện có từ một dòng cung cấp chuyển đổi cần thiết để có được tài liệu pdf.

public Document(Stream input, LoadOptions options)

Parameters

input Stream

Input stream để chuyển đổi thành tài liệu pdf.

options LoadOptions

Nó đại diện cho các thuộc tính để chuyển đổi input’ thành tài liệu pdf.

Fields

DefaultNodesNumInSubtrees

public const byte DefaultNodesNumInSubtrees = 10

Giá trị Field

byte

Properties

Actions

Tài sản này là ví dụ của lớp DocumentActions cho phép bạn có được / đặt BeforClosing, BeforSaving, vv. hành động.

public DocumentActionCollection Actions { get; }

Giá trị bất động sản

DocumentActionCollection

Examples

Ví dụ này cho thấy làm thế nào để có được sau khi hành động mở của tài liệu:

Aspose.Pdf.Document document = new Aspose.Pdf.Document("d:\\work\\aspose\\aspose.pdf.kit.net.new\\trunk\\testdata\\Aspose.Pdf\\PdfWithOpenAction.pdf");
Aspose.Pdf.Annotations.DocumentActionCollection actions = document.Actions;
Aspose.Pdf.Annotations.PdfAction afterSavingAction = actions.AfterSaving;

AllowReusePageContent

Cho phép kết hợp nội dung trang để tối ưu hóa kích cỡ docuement. nếu được sử dụng thì các trang khác nhau nhưng lặp lại có thể đề cập đếnVui lòng lưu ý rằng chế độ này có thể gây ra tác dụng phụ như thay đổi nội dung trang khi trang khác được thay đổi.

public bool AllowReusePageContent { get; set; }

Giá trị bất động sản

bool

Background

Nhận hoặc đặt màu nền của tài liệu.

public Color Background { get; set; }

Giá trị bất động sản

Color

CenterWindow

Nhận hoặc đặt lá cờ để xác định vị trí của cửa sổ tài liệu sẽ được tập trung vào màn hình.

public bool CenterWindow { get; set; }

Giá trị bất động sản

bool

Examples

Ví dụ cho thấy làm thế nào để có được cờ CenterWindow:

Document document = new Document("sample.pdf");
bool value = document.CenterWindow;

Collection

Nhận bộ sưu tập tài liệu.

public Collection Collection { get; set; }

Giá trị bất động sản

Collection

CryptoAlgorithm

Nhận cài đặt bảo mật nếu tài liệu được mã hóa.Nếu tài liệu không được mã hóa thì ngoại lệ tương ứng sẽ được tải lên trong .net 1.1hoặc CryptoAlgorithm sẽ không có cho các phiên bản .net khác.

public CryptoAlgorithm? CryptoAlgorithm { get; }

Giá trị bất động sản

CryptoAlgorithm ?

CustomSecurityHandler

Nhận được một giao dịch an ninh tùy chỉnh.

public ICustomSecurityHandler CustomSecurityHandler { get; }

Giá trị bất động sản

ICustomSecurityHandler

Destinations

Nhận được bộ sưu tập các điểm đến.Vui lòng sử dụng NamedDestinations.

public DestinationCollection Destinations { get; }

Giá trị bất động sản

DestinationCollection

Direction

Nhận hoặc đặt lệnh đọc văn bản: L2R (trên trái) hoặc R2L (trên trái).

public Direction Direction { get; set; }

Giá trị bất động sản

Direction

DisableFontLicenseVerifications

Nhiều hoạt động với font không thể được thực hiện nếu các hoạt động này bị cấm bởi giấy phép của font này.Ví dụ, một số phông chữ không thể được nhúng vào tài liệu PDF nếu các quy tắc cấp phép không thể nhúng cho phông chữ này.Bảng này được sử dụng để vô hiệu hóa bất kỳ hạn chế giấy phép nào cho tất cả các phông chữ trong tài liệu PDF hiện tại.Hãy cẩn thận khi sử dụng lá cờ này.Khi nó được đặt nó có nghĩa là người đặt lá cờ này,Tự chịu trách nhiệm về bất kỳ vi phạm pháp luật / giấy phép nào có thể xảy ra.Vì vậy, anh ta chấp nhận nó trên rủi ro của riêng mình.Chúng tôi khuyên bạn nên sử dụng lá cờ này chỉ khi bạn hoàn toàn tự tin rằng bạn không phá vỡ.Luật bản quyền.Theo mặc định là giả.

public bool DisableFontLicenseVerifications { get; set; }

Giá trị bất động sản

bool

DisplayDocTitle

Nhận hoặc đặt cờ để xác định xem thanh tiêu đề cửa sổ của tài liệu có nên hiển thị tiêu đề tài liệu không.

public bool DisplayDocTitle { get; set; }

Giá trị bất động sản

bool

Examples

Ví dụ cho thấy làm thế nào để có được lá cờ DisplayDocTitle:

Document document = new Document("sample.pdf");
bool value = document.DisplayDocTitle;

Duplex

Nhận hoặc đặt tùy chọn xử lý chế độ duplex in để sử dụng khi in tệp từ đối thoại in.

public PrintDuplex Duplex { get; set; }

Giá trị bất động sản

PrintDuplex

EmbedStandardFonts

Tài sản tuyên bố tài liệu đó phải bao gồm tất cả các phông chữ tiêu chuẩn Type1có lá cờ IsEmbedded được thiết lập thành thực. Tất cả các phông chữ PDF có thể được nhúngtrong tài liệu đơn giản thông qua cài đặt lá cờ IsEmbedded thành thực, nhưng PDF tiêu chuẩn Type1 phông chữ là một ngoại lệ từ quy tắc này.Tiêu chuẩn Type1 phông chữ tích hợp đòi hỏi rất nhiều thời gian, vì vậy để tích hợp các phông chữ này nó là cần thiếtkhông chỉ thiết lập lá cờ IsEmbedded thành true cho các phông chữ cụ thể mà còn thiết lậpmột lá cờ bổ sung ở mức tài liệu - EmbedStandardFonts = true;Tài sản này chỉ có thể được thiết lập một lần cho tất cả các phông chữ.Theo mặc định là giả.

public bool EmbedStandardFonts { get; set; }

Giá trị bất động sản

bool

EmbeddedFiles

Nhận bộ sưu tập các tập tin tích hợp vào tài liệu.

public EmbeddedFileCollection EmbeddedFiles { get; }

Giá trị bất động sản

EmbeddedFileCollection

EnableObjectUnload

Nhận hoặc đặt lá cờ cho phép tài liệu một phần bị xóa khỏi bộ nhớ.Điều này cho phép giảm sử dụng bộ nhớ nhưng có thể có tác động tiêu cực đến sự phát triển.

public bool EnableObjectUnload { get; set; }

Giá trị bất động sản

bool

EnableSignatureSanitization

Nhận hoặc đặt lá cờ để quản lý sanitization các trường chữ ký.

public bool EnableSignatureSanitization { get; set; }

Giá trị bất động sản

bool

FileName

Tên của tệp PDF gây ra tài liệu này

public string FileName { get; }

Giá trị bất động sản

string

FileSizeLimitToMemoryLoading

Nhận và đặt giới hạn kích thước tệp để tải toàn bộ tệp vào bộ nhớ.Giá trị được đặt trong megabytes.Giá trị mặc định là 210 MB.

public static int FileSizeLimitToMemoryLoading { get; set; }

Giá trị bất động sản

int

FitWindow

Nhận hoặc đặt lá cờ để xác định liệu cửa sổ tài liệu phải được chuyển đổi để phù hợp với trang được hiển thị đầu tiên.

public bool FitWindow { get; set; }

Giá trị bất động sản

bool

Examples

Ví dụ cho thấy làm thế nào để có được lá cờ FitWindow:

Document document = new Document("sample.pdf");
bool value = document.FitWindow;

FontUtilities

IDocumentNhững điều cần biết

public Document.IDocumentFontUtilities FontUtilities { get; }

Giá trị bất động sản

Document . IDocumentFontUtilities

Form

Nhận dạng Acro của tài liệu.

public Form Form { get; }

Giá trị bất động sản

Form

HandleSignatureChange

Thả Ngoại lệ nếu tài liệu sẽ được lưu với các thay đổi và có chữ ký

public bool HandleSignatureChange { get; set; }

Giá trị bất động sản

bool

HideMenubar

Nhận hoặc đặt lá cờ cho biết liệu thanh menu nên ẩn khi tài liệu hoạt động hay không.

public bool HideMenubar { get; set; }

Giá trị bất động sản

bool

Examples

Ví dụ cho thấy làm thế nào để có được HideMenubar lá cờ:

Document document = new Document("sample.pdf");
bool value = document.HideMenubar;

HideToolBar

Nhận hoặc đặt lá cờ cho biết liệu thanh công cụ nên ẩn khi tài liệu hoạt động hay không.

public bool HideToolBar { get; set; }

Giá trị bất động sản

bool

Examples

Ví dụ cho thấy làm thế nào để có được HideToolBar lá cờ:

Document document = new Document("sample.pdf");
bool value = document.HideToolBar;

Lời bài hát HideWindow

Nhận hoặc đặt cờ để xác định liệu các yếu tố giao diện người dùng nên ẩn khi tài liệu hoạt động hay không.

public bool HideWindowUI { get; set; }

Giá trị bất động sản

bool

Examples

Ví dụ cho thấy làm thế nào để có được HideWindowUI lá cờ:

Document document = new Document("sample.pdf");
bool value = document.HideWindowUI;

Id

nhận được ID.

public Id Id { get; }

Giá trị bất động sản

Id

IgnoreCorruptedObjects

Nhận hoặc đặt lá cờ của việc bỏ qua các lỗi trong các tệp nguồn.Khi các trang từ tài liệu nguồn được sao chép vào tài liệu đích, quá trình sao chép bị ngừng với ngoại lệnếu một số đối tượng trong các tệp nguồn bị hư hỏng khi lá cờ này là giả.Ví dụ: dest.Pages.Add(src.Pages)Nếu lá cờ này được thiết lập để thực hiện thì các đối tượng bị hư hỏng sẽ được thay thế bằng giá trị trống.Theo mặc định: True.

public bool IgnoreCorruptedObjects { get; set; }

Giá trị bất động sản

bool

Info

Nhận thông tin tài liệu.

public DocumentInfo Info { get; }

Giá trị bất động sản

DocumentInfo

IsEncrypted

Nhận trạng thái mã hóa của tài liệu. đúng nếu tài liệu được mã hóa.

public bool IsEncrypted { get; }

Giá trị bất động sản

bool

IsLicensed

Trở lại đúng là hệ thống hoạt động trong chế độ cấp phép và giả khác.

public static bool IsLicensed { get; }

Giá trị bất động sản

bool

IsLinearized

Nhận hoặc đặt một giá trị cho thấy liệu tài liệu có trực tuyến hay không.

public bool IsLinearized { get; set; }

Giá trị bất động sản

bool

IsPdfUaCompliant

Gets the is document pdfua compliant.

public bool IsPdfUaCompliant { get; }

Giá trị bất động sản

bool

IsPdfaCompliant

Gets the is document pdfa compliant.

public bool IsPdfaCompliant { get; }

Giá trị bất động sản

bool

IsXrefGapsAllowed

Gets hoặc set the is document pdfa compliant.

public bool IsXrefGapsAllowed { get; set; }

Giá trị bất động sản

bool

JavaScript

Bộ sưu tập JavaScript cấp tài liệu.

public JavaScriptCollection JavaScript { get; }

Giá trị bất động sản

JavaScriptCollection

LogicalStructure

Nhận được cấu trúc logic của tài liệu.

public RootElement LogicalStructure { get; }

Giá trị bất động sản

RootElement

Metadata

Tài liệu metadata(Một tài liệu PDF có thể chứa thông tin chung,Ví dụ như tiêu đề tài liệu, tác giả, và ngày tạo và sửa đổi.Thông tin toàn cầu về tài liệu (như trái ngược với nội dung hoặc cấu trúc của nó) được gọi là metadata.và được thiết kế để hỗ trợ trong việc phân loại và tìm kiếm các tài liệu trong cơ sở dữ liệu bên ngoài.)

public Metadata Metadata { get; }

Giá trị bất động sản

Metadata

NamedDestinations

Bộ sưu tập danh mục đích trong tài liệu.

public NamedDestinationCollection NamedDestinations { get; }

Giá trị bất động sản

NamedDestinationCollection

NonFullScreenPageMode

Nhận hoặc đặt chế độ trang, xác định làm thế nào để hiển thị tài liệu trên chế độ màn hình đầy đủ.

public PageMode NonFullScreenPageMode { get; set; }

Giá trị bất động sản

PageMode

OpenAction

Nhận hoặc thiết lập các hành động được thực hiện khi mở tài liệu.

public IAppointment OpenAction { get; set; }

Giá trị bất động sản

IAppointment

Examples

Ví dụ cho thấy làm thế nào để có được cờ CenterWindow:

Document document = new Document("sample.pdf");
IAppointment value = document.OpenAction;

OptimizeSize

Nhận hoặc đặt cờ tối ưu hóa.Khi các trang được thêm vào tài liệu, dòng tài nguyên tương đương trong tệp kết quả làkết hợp vào một đối tượng PDF nếu cờ này được thiết lập.Điều này cho phép giảm kích thước tệp kết quả nhưng có thể gây ra việc thực hiện chậm hơn và yêu cầu bộ nhớ lớn hơn.Giá trị giả: giả

public bool OptimizeSize { get; set; }

Giá trị bất động sản

bool

Outlines

Nhận tài liệu outlines.

public OutlineCollection Outlines { get; }

Giá trị bất động sản

OutlineCollection

OutputIntents

Nhận bộ sưu tập mục tiêu xuất trong tài liệu.

public OutputIntents OutputIntents { get; }

Giá trị bất động sản

OutputIntents

PageInfo

Nhận hoặc đặt thông tin trang (chỉ cho máy phát, không được điền vào khi đọc tài liệu)

public PageInfo PageInfo { get; set; }

Giá trị bất động sản

PageInfo

PageLabels

Nhận các nhãn trang trong tài liệu.

public PageLabelCollection PageLabels { get; }

Giá trị bất động sản

PageLabelCollection

PageLayout

Nhận hoặc thiết lập bố trí trang mà sẽ được sử dụng khi tài liệu được mở.

public PageLayout PageLayout { get; set; }

Giá trị bất động sản

PageLayout

PageMode

Nhận hoặc đặt chế độ trang, cụ thể như thế nào tài liệu nên được hiển thị khi mở.

public PageMode PageMode { get; set; }

Giá trị bất động sản

PageMode

Pages

Nhận hoặc thiết lập bộ sưu tập các trang tài liệu.Lưu ý rằng các trang được số từ 1 trong bộ sưu tập.

public PageCollection Pages { get; }

Giá trị bất động sản

PageCollection

Examples

Ví dụ dưới đây cho thấy làm thế nào để hoạt động với các trang tài liệu:Làm thế nào để có được số trang và làm thế nào để có được góc thẳng của trang đầu của tài liệu.

Aspose.Pdf.Document document = new Aspose.Pdf.Document("sample.pdf");
Aspose.Pdf.PageCollection pages = document.Pages;
System.Console.WriteLine("Document contains " + pages.Count);
Page page = pages[1];
Rectangle rect = page.Rect;

PdfFormat

Có định dạng PDF

public PdfFormat PdfFormat { get; }

Giá trị bất động sản

PdfFormat

Permissions

Nhận được giấy phép của tài liệu.

public int Permissions { get; }

Giá trị bất động sản

int

PickTrayByPdfSize

Nhận hoặc đặt một lá cờ cho biết liệu kích thước trang PDF sẽ được sử dụng để chọn dòng giấy nhập.

public bool PickTrayByPdfSize { get; set; }

Giá trị bất động sản

bool

PrintScaling

Nhận hoặc đặt tùy chọn quy mô trang mà sẽ được chọn khi một đối thoại in được hiển thị cho tài liệu này.

public PrintScaling PrintScaling { get; set; }

Giá trị bất động sản

PrintScaling

TaggedContent

Có quyền truy cập vào TaggedPdf content.

public ITaggedContent TaggedContent { get; }

Giá trị bất động sản

ITaggedContent

Examples

Ví dụ này cho thấy cách sử dụng nội dung được nhãn để tạo tài liệu mới với tiêu đề, đoạn và hình ảnh.

// Create new document
Document document = new Document();

// Get the tagged content
ITaggedContent taggedContent = document.TaggedContent;

// Set language for document
taggedContent.SetLanguage("en-US");

// Set title for PDF document
taggedContent.SetTitle("Example document");

// Creating and adding Section
SectElement sect = taggedContent.CreateSectElement();
taggedContent.RootElement.AppendChild(sect);

// Create Header
HeaderElement h1 = taggedContent.CreateHeaderElement(1);
h1.SetText("The Header");
sect.AppendChild(h1);

// Create paragraph
ParagraphElement p = taggedContent.CreateParagraphElement();
p.SetTag("Paragraph");
p.SetText("The text of paragraph.");
sect.AppendChild(p);

// Create illustration
IllustrationElement figure1 = taggedContent.CreateFigureElement();
sect.AppendChild(figure1);
figure1.AlternativeText = "Figure 1";
figure1.Title = "Image 1";
figure1.SetTag("Fig");
figure1.SetImage("path/of/image.jpg");

// Save document
document.Save("example.pdf");

Version

Nhận một phiên bản PDF từ tiêu đề tệp PDF.

public string Version { get; }

Giá trị bất động sản

string

Methods

BindXml(String)

Kết nối xml với tài liệu

public void BindXml(string file)

Parameters

file string

Tệp XML

BindXml(Thẻ, string)

Kết nối xml/xsl với tài liệu

public void BindXml(string xmlFile, string xslFile)

Parameters

xmlFile string

Tệp XML

xslFile string

Tệp xsl nếu XSLT được sử dụng.

BindXml(Stream , Stream)

Kết nối xml/xsl với tài liệu

public void BindXml(Stream xmlStream, Stream xslStream)

Parameters

xmlStream Stream

dòng xml.

xslStream Stream

dòng xsl nếu XSLT được sử dụng.

BindXml(Stream, Stream, XmlReaderSettings)

Kết nối xml/xsl với tài liệu

public void BindXml(Stream xmlStream, Stream xslStream, XmlReaderSettings settings)

Parameters

xmlStream Stream

dòng xml.

xslStream Stream

dòng xsl nếu XSLT được sử dụng.

settings XmlReaderSettings

Cài đặt xml reader.

BindXml(Stream)

Kết nối xml với tài liệu

public void BindXml(Stream stream)

Parameters

stream Stream

dòng xml.

ChangePasswords(String, String và String)

Thay đổi mật khẩu tài liệu.Hành động này chỉ có thể được thực hiện bằng mật khẩu chủ sở hữu.

public void ChangePasswords(string ownerPassword, string newUserPassword, string newOwnerPassword)

Parameters

ownerPassword string

mật khẩu chủ

newUserPassword string

mật khẩu người dùng mới

newOwnerPassword string

mật khẩu chủ mới

Check(Bool)

xác nhận tài liệu.

public bool Check(bool doRepair)

Parameters

doRepair bool

Nếu thực sự tìm thấy các vấn đề sẽ được sửa chữa.

Returns

bool

Đúng - nếu tài liệu được sửa chữa; nếu không, giả.

Convert(Thẻ, PdfFormat, ConvertErrorAction, ConvertTransparencyAction)

Chuyển đổi tài liệu và lưu lỗi vào tệp cụ thể.

public bool Convert(string outputLogFileName, PdfFormat format, ConvertErrorAction action, ConvertTransparencyAction transparencyAction)

Parameters

outputLogFileName string

Cách để file nơi các bình luận sẽ được lưu trữ.

format PdfFormat

định dạng pdf.

action ConvertErrorAction

Hoạt động đối với các đối tượng không thể chuyển đổi

transparencyAction ConvertTransparencyAction

Hoạt động cho hình ảnh mặt nạ đối tượng

Returns

bool

Kết quả hoạt động

Convert(Stream, PdfFormat, ConvertErrorAction, ConvertTransparencyAction)

Chuyển đổi tài liệu và lưu lỗi vào tệp cụ thể.

public bool Convert(Stream outputLogStream, PdfFormat format, ConvertErrorAction action, ConvertTransparencyAction transparencyAction)

Parameters

outputLogStream Stream

Stream nơi các bình luận sẽ được lưu trữ.

format PdfFormat

định dạng pdf.

action ConvertErrorAction

Hoạt động đối với các đối tượng không thể chuyển đổi

transparencyAction ConvertTransparencyAction

Hoạt động cho hình ảnh mặt nạ đối tượng

Returns

bool

Kết quả hoạt động

Convert(Thẻ, PdfFormat, ConvertErrorAction)

Chuyển đổi tài liệu và lưu lỗi vào tệp cụ thể.

public bool Convert(string outputLogFileName, PdfFormat format, ConvertErrorAction action)

Parameters

outputLogFileName string

Cách để file nơi các bình luận sẽ được lưu trữ.

format PdfFormat

định dạng pdf.

action ConvertErrorAction

Hoạt động đối với các đối tượng không thể chuyển đổi

Returns

bool

Kết quả hoạt động

Convert(PdfFormatConversionOptions)

Chuyển đổi tài liệu bằng cách sử dụng các tùy chọn chuyển đổi cụ thể

public bool Convert(PdfFormatConversionOptions options)

Parameters

options PdfFormatConversionOptions

Một số tùy chọn để chuyển đổi tài liệu PDF

Returns

bool

Kết quả hoạt động

Convert(Tải về CallBackGetHocrWithPage)

Nhận ra hình ảnh bên trong tài liệu và thêm các sợi hocr trên nó.

public bool Convert(Document.CallBackGetHocrWithPage callback, bool flattenImages = false)

Parameters

callback Document . CallBackGetHocrWithPage

Hoạt động cho hình ảnh sẽ được xử lý bởi hocr nhận dạng.

flattenImages bool

Văn bản trong hình ảnh pdf có thể được vẽ bằng cách sử dụng cơ khí của mặt nạ, trong trường hợp này các hình ảnh phải được vẽ.

Returns

bool

Kết quả hoạt động. nếu không có hình ảnh trong tài liệu trở lại giả.

Convert(Lời bài hát: CallBackGetHocr)

Nhận ra hình ảnh bên trong tài liệu và thêm các sợi hocr trên nó.

public bool Convert(Document.CallBackGetHocr callback, bool flattenImages = false)

Parameters

callback Document . CallBackGetHocr

Hoạt động cho hình ảnh sẽ được xử lý bởi hocr nhận dạng.

flattenImages bool

Văn bản trong hình ảnh pdf có thể được vẽ bằng cách sử dụng cơ khí của mặt nạ, trong trường hợp này các hình ảnh phải được vẽ.

Returns

bool

Kết quả hoạt động. nếu không có hình ảnh trong tài liệu trở lại giả.

Convert(Stream, PdfFormat, Chuyển đổiErrorAction)

Chuyển đổi tài liệu và lưu lỗi vào dòng cụ thể.

public bool Convert(Stream outputLogStream, PdfFormat format, ConvertErrorAction action)

Parameters

outputLogStream Stream

Stream nơi các bình luận sẽ được lưu trữ.

format PdfFormat

định dạng PDF.

action ConvertErrorAction

Hoạt động đối với các đối tượng không thể chuyển đổi

Returns

bool

Kết quả hoạt động

Convert(Fixup, Stream, Bool, đối tượng[])

Chuyển đổi tài liệu bằng cách áp dụng Fixup.

public bool Convert(Fixup fixup, Stream outputLog, bool onlyValidation = false, object[] parameters = null)

Parameters

fixup Fixup

Các loại Fixup

outputLog Stream

Log của quá trình.

onlyValidation bool

Chỉ có giấy chứng nhận.

parameters object [ ]

Các thuộc tính cho Fixup không thể được thiết lập.

Returns

bool

Kết quả hoạt động

Convert(Fixup, string, bool, đối tượng[])

Chuyển đổi tài liệu bằng cách áp dụng Fixup.

public bool Convert(Fixup fixup, string outputLog, bool onlyValidation = false, object[] parameters = null)

Parameters

fixup Fixup

Các loại Fixup

outputLog string

Log của quá trình.

onlyValidation bool

Chỉ có giấy chứng nhận.

parameters object [ ]

Các thuộc tính cho Fixup không thể được thiết lập.

Returns

bool

Kết quả hoạt động

Convert(string, LoadOptions, string, SaveOptions)

Chuyển đổi tệp nguồn trong định dạng nguồn thành tệp đích trong định dạng đích.

public static void Convert(string srcFileName, LoadOptions loadOptions, string dstFileName, SaveOptions saveOptions)

Parameters

srcFileName string

Tên tập tin nguồn.

loadOptions LoadOptions

Định dạng file nguồn.

dstFileName string

Tên tập tin đích.

saveOptions SaveOptions

Định dạng tập tin đích.

Convert(Stream, LoadOptions, string, SaveOptions)

Chuyển đổi dòng trong định dạng nguồn thành tệp đích trong định dạng đích.

public static void Convert(Stream srcStream, LoadOptions loadOptions, string dstFileName, SaveOptions saveOptions)

Parameters

srcStream Stream

Nguồn dòng chảy.

loadOptions LoadOptions

Định dạng nguồn stream.

dstFileName string

Tên tập tin đích.

saveOptions SaveOptions

Định dạng tập tin đích.

Convert(string, LoadOptions, Stream, SaveOptions)

Chuyển đổi tệp nguồn trong định dạng nguồn thành dòng trong định dạng đích.

public static void Convert(string srcFileName, LoadOptions loadOptions, Stream dstStream, SaveOptions saveOptions)

Parameters

srcFileName string

Tên tập tin nguồn.

loadOptions LoadOptions

Định dạng file nguồn.

dstStream Stream

Mục đích dòng chảy

saveOptions SaveOptions

Định dạng dòng đích.

Convert(Stream, LoadOptions, Stream, SaveOptions)

Chuyển đổi dòng trong định dạng nguồn sang dòng trong định dạng đích.

public static void Convert(Stream srcStream, LoadOptions loadOptions, Stream dstStream, SaveOptions saveOptions)

Parameters

srcStream Stream

Nguồn dòng chảy.

loadOptions LoadOptions

Định dạng nguồn stream.

dstStream Stream

Mục đích dòng chảy

saveOptions SaveOptions

Định dạng tập tin đích.

Chuyển đổiPageToPNGMemoryStream(Page)

Chuyển đổi trang sang PNG cho dòng hình ảnh DSR, OMR, OCR.

public MemoryStream ConvertPageToPNGMemoryStream(Page page)

Parameters

page Page

Trang để chuyển đổi

Returns

MemoryStream

Hình ảnh Stream

Decrypt()

Xóa tài liệu.Call sau đó Save để có được phiên bản xóa của tài liệu.

public void Decrypt()

Dispose()

Tắt tất cả các tài nguyên được sử dụng trong tài liệu này.

public void Dispose()

Encrypt(Tính năng, dòng, DocumentPrivilege, ICustomSecurityHandler)

Mã hóa tài liệu.Call then Save to get encrypted version of the document.

public void Encrypt(string userPassword, string ownerPassword, DocumentPrivilege privileges, ICustomSecurityHandler customHandler)

Parameters

userPassword string

mật khẩu người dùng.

ownerPassword string

mật khẩu chủ

privileges DocumentPrivilege

Giấy phép tài liệu, xem Aspose.Pdf.Document.Permissions cho chi tiết.

customHandler ICustomSecurityHandler

Công ty bảo mật tiêu chuẩn.

Encrypt(string, dòng, giấy phép, ICustomSecurityHandler)

Mã hóa tài liệu.Call then Save to get encrypted version of the document.

public void Encrypt(string userPassword, string ownerPassword, Permissions permissions, ICustomSecurityHandler customHandler)

Parameters

userPassword string

mật khẩu người dùng.

ownerPassword string

mật khẩu chủ

permissions Permissions

Giấy phép tài liệu, xem Aspose.Pdf.Document.Permissions cho chi tiết.

customHandler ICustomSecurityHandler

Công ty bảo mật tiêu chuẩn.

Encrypt(string, string, DocumentPrivilege, CryptoAlgorithm, bool)

Mã hóa tài liệu.Call then Save to get encrypted version of the document.

public void Encrypt(string userPassword, string ownerPassword, DocumentPrivilege privileges, CryptoAlgorithm cryptoAlgorithm, bool usePdf20)

Parameters

userPassword string

mật khẩu người dùng.

ownerPassword string

mật khẩu chủ

privileges DocumentPrivilege

Giấy phép tài liệu, xem Aspose.Pdf.Document.Permissions cho chi tiết.

cryptoAlgorithm CryptoAlgorithm

Các thuật toán mã hóa, xem Aspose.Pdf.Document.CryptoAlgorithm để biết chi tiết.

usePdf20 bool

Hỗ trợ sửa đổi 6 (Phần 8).

Encrypt(string, string, giấy phép, CryptoAlgorithm)

Mã hóa tài liệu.Call then Save to get encrypted version of the document.

public void Encrypt(string userPassword, string ownerPassword, Permissions permissions, CryptoAlgorithm cryptoAlgorithm)

Parameters

userPassword string

mật khẩu người dùng.

ownerPassword string

mật khẩu chủ

permissions Permissions

Giấy phép tài liệu, xem Aspose.Pdf.Document.Permissions cho chi tiết.

cryptoAlgorithm CryptoAlgorithm

Các thuật toán mã hóa, xem Aspose.Pdf.Document.CryptoAlgorithm để biết chi tiết.

Encrypt(string, string, Permissions, CryptoAlgorithm, bool)

Mã hóa tài liệu.Call then Save to get encrypted version of the document.

public void Encrypt(string userPassword, string ownerPassword, Permissions permissions, CryptoAlgorithm cryptoAlgorithm, bool usePdf20)

Parameters

userPassword string

mật khẩu người dùng.

ownerPassword string

mật khẩu chủ

permissions Permissions

Giấy phép tài liệu, xem Aspose.Pdf.Document.Permissions cho chi tiết.

cryptoAlgorithm CryptoAlgorithm

Các thuật toán mã hóa, xem Aspose.Pdf.Document.CryptoAlgorithm để biết chi tiết.

usePdf20 bool

Hỗ trợ sửa đổi 6 (Phần 8).

ExportAnnotationsToXfdf(String)

Xuất tất cả các ghi chú tài liệu vào tệp XFDF

public void ExportAnnotationsToXfdf(string fileName)

Parameters

fileName string

Tên tập tin XFDF

ExportAnnotationsToXfdf(Stream)

Xuất khẩu tất cả các ghi chú tài liệu vào dòng.

public void ExportAnnotationsToXfdf(Stream stream)

Parameters

stream Stream

Stream nơi lưu trữ XFDF.

Flatten()

Xóa tất cả các trường từ tài liệu và đặt giá trị của họ thay thế.

public void Flatten()

Flatten(FlattenSettings)

Xóa tất cả các trường (và ghi chú) từ tài liệu và đặt giá trị của họ thay vào đó.

public void Flatten(Form.FlattenSettings flattenSettings)

Parameters

flattenSettings Form . FlattenSettings

Cài đặt cho quá trình flashing.

FlattenTransparency()

Thay thế nội dung minh bạch với đồ họa raster và vector không minh bạch.

public void FlattenTransparency()

FreeMemory()

Tẩy sạch bộ nhớ

public void FreeMemory()

GetCatalogValue(String)

Trả lại giá trị mục từ từ điển catalog.

public object GetCatalogValue(string key)

Parameters

key string

Chìa khóa của mục

Returns

object

Giá trị mục - nếu chìa khóa đã được tìm thấy thành công; nếu không, không.

GetObjectById(String)

Nhận một đối tượng với ID cụ thể trong tài liệu.

public object GetObjectById(string id)

Parameters

id string

Đối tượng ID.

Returns

object

Đối tượng với ID cụ thể: Null nếu ID không được tìm thấy.

GetXmpMetadata(Stream)

Nhận dữ liệu XMP từ tài liệu.

public void GetXmpMetadata(Stream stream)

Parameters

stream Stream

Stream nơi các metadata sẽ được lưu trữ.

HasIncrementalUpdate()

Kiểm tra xem tài liệu PDF hiện tại đã được lưu với các bản cập nhật gia tăng.

public bool HasIncrementalUpdate()

Returns

bool

’truyền’ nếu tài liệu PDF có bản cập nhật liên tục; nếu không, ’truyền'.

ImportAnnotationsFromXfdf(String)

nhập các ghi chú từ tệp XFDF vào tài liệu.

public void ImportAnnotationsFromXfdf(string fileName)

Parameters

fileName string

Tên tập tin XFDF

ImportAnnotationsFromXfdf(Stream)

Import ghi chú từ dòng chảy đến tài liệu.

public void ImportAnnotationsFromXfdf(Stream stream)

Parameters

stream Stream

Stream chứa dữ liệu XFDF.

IsRepairNeeded(Tùy chọn RepairOptions)

Kiểm tra nếu tài liệu yêu cầu gọi phương pháp sửa chữa.

public bool IsRepairNeeded(out Document.RepairOptions options)

Parameters

options Document . RepairOptions

Chọn RepairOptions được khuyến khích để được sử dụng trong phương pháp Repair

Returns

bool

Trả lại các tùy chọn đã điền để được sử dụng trong phương pháp sửa chữa

LoadFrom(LoadOptions, LoadOptions)

Tải một tập tin, chuyển đổi nó sang PDF.

public void LoadFrom(string filename, LoadOptions options)

Parameters

filename string

Đường đến file để mở.

options LoadOptions

Các tùy chọn tải.

Exceptions

PdfException

Nếu file không thể tải lên.

FileNotFoundException

Nếu file không được tìm thấy.

Merge(MergeOptions, Params Tài liệu[])

Nhập tài liệu

public void Merge(Document.MergeOptions mergeOptions, params Document[] documents)

Parameters

mergeOptions Document . MergeOptions

Các lựa chọn hợp nhất.

documents Document [ ]

Các tài liệu để kết hợp.

Merge(MergeOptions, params string[])

Nhập tài liệu

public void Merge(Document.MergeOptions mergeOptions, params string[] files)

Parameters

mergeOptions Document . MergeOptions

Các lựa chọn hợp nhất.

files string [ ]

Các tập tin PDF để kết hợp.

Merge(tài liệu params[])

Nhập tài liệu

public void Merge(params Document[] documents)

Parameters

documents Document [ ]

Các tài liệu để kết hợp.

Merge(params dòng[])

Tải file pdf.

public void Merge(params string[] files)

Parameters

files string [ ]

Các tập tin PDF để kết hợp.

MergeDocuments(MergeOptions, params string[])

Nhập tài liệu

public static Document MergeDocuments(Document.MergeOptions mergeOptions, params string[] files)

Parameters

mergeOptions Document . MergeOptions

Các lựa chọn hợp nhất.

files string [ ]

Các tập tin PDF để kết hợp.

Returns

Document

Tài liệu kết hợp

MergeDocuments(MergeOptions, Params Tài liệu[])

Nhập tài liệu

public static Document MergeDocuments(Document.MergeOptions mergeOptions, params Document[] files)

Parameters

mergeOptions Document . MergeOptions

files Document [ ]

Các tài liệu để kết hợp.

Returns

Document

Tài liệu kết hợp

MergeDocuments(params dòng[])

Tải file pdf.

public static Document MergeDocuments(params string[] files)

Parameters

files string [ ]

Các tập tin PDF để kết hợp.

Returns

Document

Tài liệu kết hợp

MergeDocuments(tài liệu params[])

Nhập tài liệu

public static Document MergeDocuments(params Document[] documents)

Parameters

documents Document [ ]

Các tài liệu để kết hợp.

Returns

Document

Tài liệu kết hợp

Optimize()

Linear hóa tài liệu để

  • Mở trang đầu tiên càng nhanh càng tốt;
  • hiển thị trang tiếp theo hoặc theo dõi bằng cách liên kết đến trang tiếp theo càng nhanh càng tốt;
  • hiển thị trang liên tục khi nó đến khi dữ liệu cho một trang được cung cấp qua một kênh chậm (xem dữ liệu hữu ích nhất đầu tiên);
  • cho phép tương tác người dùng, chẳng hạn như theo một liên kết, được thực hiện ngay cả trước khi toàn bộ trang đã được nhận và hiển thị.Tạo ra phương pháp này không thực sự tiết kiệm tài liệu. Ngược lại, tài liệu chỉ được chuẩn bị để có cấu trúc tối ưu,gọi sau đó Save để có được tài liệu tối ưu hóa.
public void Optimize()

OptimizeResources()

Tối ưu hóa tài nguyên trong tài liệu:

  • Các tài nguyên không được sử dụng trên các trang tài liệu được loại bỏ;
  • Các tài nguyên bình đẳng được kết hợp vào một đối tượng;
  • Các đối tượng chưa sử dụng sẽ bị xóa.
public void OptimizeResources()

OptimizeResources(OptimizationOptions)

Tối ưu hóa tài nguyên trong tài liệu theo chiến lược tối ưu hóa được xác định.

public void OptimizeResources(OptimizationOptions strategy)

Parameters

strategy OptimizationOptions

Chiến lược tối ưu hóa

PageNodesToBalancedTree(byte)

Tổ chức các nút cây trang trong một tài liệu thành một cây cân bằng.Chỉ nếu tài liệu có nhiều hơn các nútNumInSubtrees trang đối tượng, nếu không nó không làm gì cả.Đừng gọi phương pháp này trong khi iterating trên các yếu tố Pages, nó có thể cung cấp kết quả không thể dự đoán được

public void PageNodesToBalancedTree(byte nodesNumInSubtrees = 10)

Parameters

nodesNumInSubtrees byte

Ưu tiên số lượng subnodes. giá trị mặc định là mười.

ProcessParagraphs()

Các đoạn xử lý cho máy phát điện.

public void ProcessParagraphs()

RemoveMetadata()

Xóa các metadata từ tài liệu.

public void RemoveMetadata()

RemovePdfUaCompliance()

Xóa PDFUa tuân thủ từ tài liệu

public void RemovePdfUaCompliance()

RemovePdfaCompliance()

Xóa tuân thủ pdfa từ tài liệu

public void RemovePdfaCompliance()

Repair(RepairOptions)

sửa chữa tài liệu bị hỏng.

public void Repair(Document.RepairOptions options = null)

Parameters

options Document . RepairOptions

Một thông số tùy chọn của loại Aspose.Pdf.Document.RepairOptions để xác định cài đặt sửa chữa.Nếu không được cung cấp, cài đặt mặc định sẽ được sử dụng.

Save(Stream)

Lưu tài liệu vào dòng.

public void Save(Stream output)

Parameters

output Stream

Stream nơi tài liệu shell được lưu trữ.

Save(String)

Lưu tài liệu vào tệp cụ thể.

public void Save(string outputFileName)

Parameters

outputFileName string

Cách để lưu trữ nơi tài liệu sẽ được lưu trữ.

Save()

Lưu tài liệu theo cách liên tục (ví dụ: sử dụng kỹ thuật cập nhật liên tục).

public void Save()

Remarks

Để lưu tài liệu một cách liên tục, chúng ta nên mở tệp tài liệu để viết.Do đó, Tài liệu phải được khởi động với dòng có thể viết như trong đoạn mã sau:Tài liệu doc = tài liệu mới (FileStream mới (“document.pdf”, FileMode.Open, FileAccess.ReadWrite));// thực hiện một số thay đổi và lưu tài liệu một cách gia tăngTiếp theoSave( )

Save(SaveOptions)

Tiết kiệm tài liệu bằng cách tiết kiệm tùy chọn.

public void Save(SaveOptions options)

Parameters

options SaveOptions

Tiết kiệm các tùy chọn

Save(Nhãn hiệu: SaveFormat)

Lưu tài liệu với một tên mới cùng với định dạng tệp.

public void Save(string outputFileName, SaveFormat format)

Parameters

outputFileName string

Cách để lưu trữ nơi tài liệu sẽ được lưu trữ.

format SaveFormat

Định dạng tùy chọn

Save(Thông tin, SaveFormat)

Lưu tài liệu với một tên mới cùng với định dạng tệp.

public void Save(Stream outputStream, SaveFormat format)

Parameters

outputStream Stream

Stream nơi tài liệu sẽ được lưu trữ.

format SaveFormat

Định dạng tùy chọn

Exceptions

ArgumentException

System.ArgumentException when Aspose.Pdf.HtmlSaveOptions is passed to a method. Lưu một tài liệu to the html stream is not supported. Please use the method save to the file.

Save(Lời bài hát: SaveOptions)

Lưu tài liệu với một tên mới thiết lập các tùy chọn lưu nó.

public void Save(string outputFileName, SaveOptions options)

Parameters

outputFileName string

Cách để lưu trữ nơi tài liệu sẽ được lưu trữ.

options SaveOptions

Tiết kiệm các tùy chọn

Save(Stream, SaveOptions)

Tiết kiệm tài liệu đến một dòng với một tùy chọn tiết kiệm.

public void Save(Stream outputStream, SaveOptions options)

Parameters

outputStream Stream

Stream nơi tài liệu sẽ được lưu trữ.

options SaveOptions

Tiết kiệm các tùy chọn

Exceptions

ArgumentException

System.ArgumentException when Aspose.Pdf.HtmlSaveOptions is passed to a method. Lưu một tài liệu to the html stream is not supported. Please use the method save to the file.

SaveAsync(Lời bài hát: CancellationToken)

Lưu tài liệu vào dòng.

public Task SaveAsync(Stream output, CancellationToken cancellationToken)

Parameters

output Stream

Stream nơi tài liệu shell được lưu trữ.

cancellationToken CancellationToken

Caclellation token.

Returns

Task

Nhiệm vụ không đồng bộ

SaveAsync(Thẻ: CancellationToken)

Lưu tài liệu vào tệp cụ thể.

public Task SaveAsync(string outputFileName, CancellationToken cancellationToken)

Parameters

outputFileName string

Cách để lưu trữ nơi tài liệu sẽ được lưu trữ.

cancellationToken CancellationToken

Caclellation token.

Returns

Task

Nhiệm vụ không đồng bộ

SaveAsync(CancellationToken)

Lưu tài liệu theo cách liên tục (ví dụ: sử dụng kỹ thuật cập nhật liên tục).

public Task SaveAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Caclellation token.

Returns

Task

Nhiệm vụ không đồng bộ

Remarks

Để lưu tài liệu một cách liên tục, chúng ta nên mở tệp tài liệu để viết.Do đó, Tài liệu phải được khởi động với dòng có thể viết như trong đoạn mã sau:Tài liệu doc = tài liệu mới (FileStream mới (“document.pdf”, FileMode.Open, FileAccess.ReadWrite));// thực hiện một số thay đổi và lưu tài liệu một cách gia tăngTiếp theoSave( )

SaveAsync(SaveOptions, CancellationToken)

Tiết kiệm tài liệu bằng cách tiết kiệm tùy chọn.

public Task SaveAsync(SaveOptions options, CancellationToken cancellationToken)

Parameters

options SaveOptions

Tiết kiệm các tùy chọn

cancellationToken CancellationToken

Caclellation token.

Returns

Task

Nhiệm vụ không đồng bộ

SaveAsync(Thẻ, SaveFormat, CancellationToken)

Lưu tài liệu với một tên mới cùng với định dạng tệp.

public Task SaveAsync(string outputFileName, SaveFormat format, CancellationToken cancellationToken)

Parameters

outputFileName string

Cách để lưu trữ nơi tài liệu sẽ được lưu trữ.

format SaveFormat

Định dạng tùy chọn

cancellationToken CancellationToken

Caclellation token.

Returns

Task

Nhiệm vụ không đồng bộ

SaveAsync(Stream, SaveFormat, CancellationToken)

Lưu tài liệu với một tên mới cùng với định dạng tệp.

public Task SaveAsync(Stream outputStream, SaveFormat format, CancellationToken cancellationToken)

Parameters

outputStream Stream

Stream nơi tài liệu sẽ được lưu trữ.

format SaveFormat

Định dạng tùy chọn

cancellationToken CancellationToken

token hủy

Returns

Task

Nhiệm vụ không đồng bộ

Exceptions

ArgumentException

System.ArgumentException when Aspose.Pdf.HtmlSaveOptions is passed to a method. Lưu một tài liệu to the html stream is not supported. Please use the method save to the file.

SaveAsync(string, SaveOptions, CancellationToken)

Lưu tài liệu với một tên mới thiết lập các tùy chọn lưu nó.

public Task SaveAsync(string outputFileName, SaveOptions options, CancellationToken cancellationToken)

Parameters

outputFileName string

Cách để lưu trữ nơi tài liệu sẽ được lưu trữ.

options SaveOptions

Tiết kiệm các tùy chọn

cancellationToken CancellationToken

Caclellation token.

Returns

Task

Nhiệm vụ không đồng bộ

SaveAsync(Stream, SaveOptions, CancellationToken)

Tiết kiệm tài liệu đến một dòng với một tùy chọn tiết kiệm.

public Task SaveAsync(Stream outputStream, SaveOptions options, CancellationToken cancellationToken)

Parameters

outputStream Stream

Stream nơi tài liệu sẽ được lưu trữ.

options SaveOptions

Tiết kiệm các tùy chọn

cancellationToken CancellationToken

Caclellation token.

Returns

Task

Nhiệm vụ không đồng bộ

Exceptions

ArgumentException

System.ArgumentException when Aspose.Pdf.HtmlSaveOptions is passed to a method. Lưu một tài liệu to the html stream is not supported. Please use the method save to the file.

SaveXml(String)

Lưu tài liệu vào XML.

public void SaveXml(string file)

Parameters

file string

Tài liệu mô hình XML file

SendTo(Tài liệu, Stream)

Gửi toàn bộ tài liệu đến thiết bị tài liệu để xử lý.

public void SendTo(DocumentDevice device, Stream output)

Parameters

device DocumentDevice

Thiết bị tài liệu được sử dụng để xử lý tài liệu.

output Stream

Stream output chứa kết quả của việc xử lý tài liệu với một thiết bị cụ thể.

SendTo(Thiết bị, int, int, Stream)

Gửi các trang nhất định của tài liệu đến thiết bị tài liệu để xử lý.

public void SendTo(DocumentDevice device, int fromPage, int toPage, Stream output)

Parameters

device DocumentDevice

Thiết bị tài liệu được sử dụng để xử lý tài liệu.

fromPage int

Trang đầu tiên để xử lý.

toPage int

Trang cuối cùng để xử lý.

output Stream

Stream output chứa kết quả của các trang tài liệu được xử lý với thiết bị cụ thể.

SendTo(Thiết bị tài liệu, string)

Gửi toàn bộ tài liệu đến thiết bị tài liệu để xử lý.

public void SendTo(DocumentDevice device, string outputFileName)

Parameters

device DocumentDevice

Thiết bị tài liệu được sử dụng để xử lý tài liệu.

outputFileName string

Tên tệp xuất khẩu với kết quả xử lý.

SendTo(Thiết bị tài liệu, int, int, string)

Gửi toàn bộ tài liệu đến thiết bị tài liệu để xử lý.

public void SendTo(DocumentDevice device, int fromPage, int toPage, string outputFileName)

Parameters

device DocumentDevice

Thiết bị tài liệu được sử dụng để xử lý tài liệu.

fromPage int

Trang đầu tiên để xử lý.

toPage int

Trang cuối cùng để xử lý.

outputFileName string

Tên tệp xuất khẩu với kết quả xử lý.

SetDefaultFileSizeLimitToMemoryLoading()

Thiết lập giới hạn kích thước tệp để tải toàn bộ tệp vào bộ nhớ để giá trị mặc định là 210 Mb.

public static void SetDefaultFileSizeLimitToMemoryLoading()

SetTitle(String)

Thiết lập tiêu đề cho PDF Document

public void SetTitle(string title)

Parameters

title string

Tiêu đề tài liệu

SetXmpMetadata(Stream)

Thiết lập XMP metadata của tài liệu.

public void SetXmpMetadata(Stream stream)

Parameters

stream Stream

Stream có chứa metadata XMP.

Validate(Thẻ, PdfFormat)

Chứng nhận tài liệu vào tệp cụ thể.

public bool Validate(string outputLogFileName, PdfFormat format)

Parameters

outputLogFileName string

Cách để file nơi các bình luận sẽ được lưu trữ.

format PdfFormat

định dạng pdf.

Returns

bool

Kết quả hoạt động

Validate(Thông tin, PdfFormat)

Chứng nhận tài liệu vào tệp cụ thể.

public bool Validate(Stream outputLogStream, PdfFormat format)

Parameters

outputLogStream Stream

Stream nơi các bình luận sẽ được lưu trữ.

format PdfFormat

định dạng pdf.

Returns

bool

Kết quả hoạt động

Validate(PdfFormatConversionOptions)

Chứng nhận tài liệu vào tệp cụ thể.

public bool Validate(PdfFormatConversionOptions options)

Parameters

options PdfFormatConversionOptions

Một số tùy chọn để chuyển đổi tài liệu PDF

Returns

bool

Kết quả hoạt động

FontSubstitution

Nó xảy ra khi phông chữ thay thế phông chữ khác trong tài liệu.

public event Document.FontSubstitutionHandler FontSubstitution

Sự kiện Type

Document . FontSubstitutionHandler

 Tiếng Việt