![](/img/trans.png)
[英]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.