Sysnet.TouchScreen/AppCode/PDFMode/PDFDocument.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sysnet.TouchScreen
{
/// <summary>
/// Contains properties and methods for working with the PDF document.
/// </summary>
public class PDFDocument
{
public PDFDocument(string fileName)
{
this.FullName = fileName;
this.LoadInfo(fileName);
}
/// <summary>
/// Get the informations from the pdf file
/// </summary>
/// <param name="pdfFilePath">Path of the pdf file to get information from</param>
private void LoadInfo(string pdfFilePath)
{
PDFFileInfo info = PDFActions.GetPDFFileInfo(pdfFilePath);
this.NumberOfPages = info.NumberOfPages;
this.PageLabelStart = info.PageLabelStart;
this.PageRanges = new List<string>();
this.HasInfo = true;
if (this.NumberOfPages == 0)
{
this.HasInfo = false;
}
}
#region Properties
/// <summary>
/// Tells if it was possible to get informations about the pdf file
/// using the dump_data function. If this value is FALSE, no operation can be
/// done on the file.
/// </summary>
public bool HasInfo { get; private set; }
/// <summary>
/// Full path of the pdf file.
/// </summary>
public string FullName { get; private set; }
/// <summary>
/// Name of the pdf file.
/// </summary>
public string FileName
后面还有 97 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
