How convert pdf to media object

In my experience, when any file operation fails unexpectedly, the first thing to check is “Did I provide the full path to the file?” In this case, the answer is “no”, so now there are two things to check:

  1. What is the current drive and directory at the time the above function is called?
  2. Where did the file end up? Is it in the then-current directory? Or somewhere else?

With those answers, it should be easy to make sure that the function is receiving the correct filename and path. There may be other issues, but at least you’ve eliminated one (very common) possibility.

1 Like