TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
D K
NA
2
497
C# - Pdfdocument - FileNotFound
Jan 18 2019 4:19 PM
public
static
void
CreatePDFx(string path)
{
PdfDocument outputDocumentx =
new
PdfDocument();
}
foreach (string pat_folder in pat_folders)
{
// Initially create PDFs
Console.WriteLine(
"Watching this folder {0}"
, pat_folder);
try
{
CreatePDFx(pat_folder);
}
catch
(FileNotFoundException ex)
{
// Write error.
System.IO.File.WriteAllLines(@
"C:\filenotfound.txt"
,
"Error"
);
Console.WriteLine(ex);
}
}
I have the problem that my function always thorugh an "FileNotFoundException". I have found out that it could be a problem with line 3 in the snippet. pat_folder is only a string with a path. Its not the complete code. I am using the PDFsharp class.
Could anyone help me and tell me, why it always throw an exception? Any ideas? Thanks in advance!
Reply
Answers (
3
)
How to store files (word,pdf) to mongodb using asp.net c#
how to get selected date and time from RadDatePicker(MM/dd/y