Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

XPS Printer files locked and unusable in Win 8, 8.1

$
0
0

My application functions perfectly on a wide variety of XP, Vista, 7, Server 2008 R2. It is failing in one area with regard to Windows 8 or 8.1.

Something seems to be terribly wrong with the new XPS printer driver for 8/8.1.

It is apparently preventing the XPS print file result from being accessed in a normal manner.

The intent of the code is to produce an XPS file and convert it to PDF in case the user wishes to email an attached PDF. Attaching as an XPS file works fine. However, the PDF converter cannot open the XPS print file even though MAPI has no trouble attaching it. And only on Win 8 or 8.1.

In testing, even attempting to copy the XPS print file fails with ACCESS_DENIED. The file is complete and can be viewed, but any other read seems to be hampered.

I know the function that produces the PDF works. I am using GhostXPS. It functions properly from a command line in Windows 8 or 8.1. The only thing preventing it from operating is proper access to the XPS file from within the program.

I have tested using various combinations of user rights, folder rights and file attributes. The problem persists in all cases.

Steps to reproduce:

1. Set "default" printer to XPS.

2. Print file using the device context. Output directed to AppData\Local\Temp\"tempfile.xps"

3. Attempt to convert the xps file using ShellFileExecuteEx with appropriate command line parameters.

4. PDF converter attempts to open and read file contents but cannot. If it had, then step 5 would follow.

5. Printed or Converted file is attached to email for distribution.

Again, all of these steps perform flawlessly on systems not using Windows 8 or 8.1.

Is there something just flawed with the XPS printer driver or is there some other mechanism that needs to be addressed regarding the new XPS printer driver?

Thank you in advance.


Viewing all articles
Browse latest Browse all 15302

Trending Articles