Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing with Microsoft Office Document Image Writer messes up file references  RSS feed

Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I have a MailFolder which has an ArrayList of Email objects inside it. Each MailFolder has an attribute called folderFile which is a reference to a folder in the operating system. Each Email has an attribute called parentFile which is a reference to a file in the operating system.

Now, I am trying to put printing into my application.

When I print using a normal printer like my HP Deskjet or the likes - an actual physical printer - everything works fine. But when I print using the Microsoft Office Document Image Writer, things go wierd. The following things happen;

I call myMailFolder.getFolderFile().exists() and this = false. But if I (in the debugger) make a new file pointing to the same path, .exists() = true. Also if I look in the OS, the file exists. So somehow in the job.print() this Document Image writer seems to be messing up this file reference. The same thing happens to the myEmail.getParentFile().

Can anyone tell me why this is happening only with the Document Image Writer?

Many thanks!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!