IDocumentInfo
İçindekiler
[
Saklamak
]
IDocumentInfo interface
Temel belge bilgilerini almak için gerekli yöntemleri tanımlar.
public interface IDocumentInfo
Özellikleri
| İsim | Tanım |
|---|---|
| FileType { get; } | Dosya biçimi açıklamasını alır. |
| PageCount { get; } | Toplam sayfa sayısını alır. |
| Pages { get; } | listesini alırPageInfo sayfa bilgisi. |
| Size { get; } | Belge boyutunu bayt cinsinden alır. |
Notlar
Daha fazla bilgi edin
Örnekler
Aşağıdaki örnek, kullanılarak genel belge bilgilerinin nasıl alınacağını gösterir.IDocumentInfo.
try
{
using (Redactor red = new Redactor(@"C:\Temp\testfile.doc"))
{
IDocumentInfo docInfo = red.GetDocumentInfo();
Console.WriteLine("Document size: {0}", docInfo.Size);
Console.WriteLine("Document format: {0}", docInfo.FileType.FileFormat);
Console.WriteLine("Document contains {0} pages", docInfo.PageCount);
foreach (PageInfo page in docInfo.Pages)
{
Console.WriteLine("Page {0} size is {1}x{2}", page.PageNumber, page.Width, page.Height);
}
}
}
catch (GroupDocs.Redaction.Exceptions.PasswordRequiredException)
{
Console.WriteLine("You are trying to access document which is password protected. Please, set the password.");
}
catch (GroupDocs.Redaction.Exceptions.IncorrectPasswordException)
{
Console.WriteLine("The provided password is not valid.");
}
Ayrıca bakınız
- ad alanı GroupDocs.Redaction
- toplantı GroupDocs.Redaction