Forum Discussion

abitor's avatar
abitor
Copper Contributor
Nov 23, 2020

Document conversion

Hello!

We have been testing the Universal Print feature in combination with pull-print scenario. It worked, basically, all things considered. But we also wanted to test the document conversion and this particular feature failed.

We enabled the feature under the corresponding section in the Universal Print management view. We have also configured the virtual printer (used for pull-print) to accept only PDF as content type.

Still, when we spooled a print job using a Windows client, the job data remained in OpenXPS format.

Is something wrong with our approach / configuration? Or is the document conversion not supported yet?

Does anybody tested this and can confirm that it works?

5 Replies

  • AndrewCardy's avatar
    AndrewCardy
    Copper Contributor

    abitor I seem to get the same results as you. There appears to be documentation to suggest this should work:

     

    https://docs.microsoft.com/en-us/universal-print/fundamentals/universal-print-document-conversion

     

    I note this also seems to happen when I use the xps mime type application/vnd.ms-xpsdocument.

     

    The only content-type setting it seems to work with is application/oxps.

     

    Probably worth mentioning that when the printer's content type is set to anything other than application/oxps, the print on the client fails with 'Error - printing'.

    • Saurabh_Bansal's avatar
      Saurabh_Bansal
      Icon for Microsoft rankMicrosoft

      abitor / AndrewCardy First lets confirm a few things:

      1. The virtual printer you created supports PDF only as content-type.
      2. The virtual printer does contain OXPS as one of the supported content types
      3. Are you trying to implement task trigger? If yes, then are you accessing the document after completing the task trigger?

      Here is how it should work (if you have PDF only as the content type):

      • For Windows versions 2004 onwards (2004 and 20H2), Windows itself will upload PDF and you can access the payload in PDF format.
      • For Windows versions 1903 and 1909, Windows uploads OXPS. If you have task trigger, Universal Print will create a task and then wait for your application to complete the task. During all this time payload will continue to be in OXPS (unless you convert to another format and replace the payload). Once you have mark the task as complete, then Universal Print will process the job further and convert to PDF (if not already converted and document conversion is enabled). After conversion to PDF job will move to JobFetchable status.

       

      Hope this clarifies.

       

      Thanks,

      Saurabh

       

      • AndrewCardy's avatar
        AndrewCardy
        Copper Contributor

        Saurabh_Bansal 

         

        Thanks for the clarifications. I think I might be miss-understanding the flow for virtual printers where payload modification is needed.

         

        Currently my flow looks like:

         

        1) Poll taskDefinition for tasks

        2) Find a task in 'processing state', with a job that is 'paused'

        3) Modify payload

        4) Upload modified payload

        5) Either redirect or mark as complete

         

        Redirection in step 5 seems to work fine, and the job ends up with a completed status.

         

        However, if I want to send the job to OneDrive, for example, I attempt to mark the task as complete, but the job remains in a 'pending' state. Am I miss-understanding what a 'processing' and 'pending' task means? As a task, should I wait to modify a payload until it's 'fetchable' or is that just for the downstream printer to know when it can be fetched?

         

        Hope this makes sense. 🙂

         

        Thanks!

Resources