Click here to Skip to main content
15,886,574 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello.I want to read pdf in file.How to read in file?

For example: D\\A.file\\ include 3 pdf.

How to read pdf count c#?

I want to pdf count and write pdf count

What I have tried:

I read pdf but dont count.ı read pdf bur count not read and not write
Posted
Updated 3-Mar-19 21:57pm
Comments
OriginalGriff 4-Mar-19 2:31am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
You've asked enough questions here to know that we need actual information, not a vague "I dun this" statement.

Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did. Show us the code you used and explain exactly what it does that you didn't expect, or doesn't do that you did.

Use the "Improve question" widget to edit your question and provide better information.
Wastedtalent 4-Mar-19 3:18am    
Are you trying to count the number of PDF files in a directory?
[no name] 4-Mar-19 3:54am    
Yes I want get pdf count

1 solution

You can use Directory.GetFiles[^]:
C#
string[] pdfFiles = Directory.GetFiles("your directory", "*.pdf");
int count = pdfFiles.Count;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900