[英]how to get the particular paragraph in pdf file using iTextSharp in C#?
[英]how to get pdf file size after generating using C#
如何获取PDF文件大小。 我正在通过直接的pdf网址..任何想法吗? 请
FileInfo info = new FileInfo("C:\\file.txt");
FileAttributes attributes = info.Attributes;
Console.WriteLine(attributes);
info = new FileInfo("C:\\");
在上面的代码中,我没有获取文件信息。.所以请给我一个想法,如何获取pdf文件大小?
试试这个,将返回文件大小(以字节为单位)
FileInfo info = new FileInfo("PDF file path");
long size = info.Length
要使用C#获取文件大小,请使用:
long fileSize = (new FileInfo(fileName)).Length;
这不行吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.