Document conversion

Copper Contributor

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

@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'.

@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

 

@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!

@AndrewCardy Thats more or less correct. A few clarifications/suggestions though:

  1. Setup Graph change notifications to be notified for a new print job in the queue (instead of Polling)

  2. When notified about a task that is created for a new job (in paused state), get job details and download the payload

  3. Modify payload - please note that if your printer is PDF, then

    1. Job will be in PDF format already if coming from Windows versions 2004 or 20H2

    2. Jobs will be in OXPS format if coming from Windows versions 1903 or 1909. Universal Print converts OXPS to PDF after the task is marked complete and if doc conversion is enabled.
  4. Upload modified payload (has to be compatible with the printer including supported format)

  5. Either redirect or mark as complete

Hope this clarifies.

 

THanks

Saurabh

 

That does help, thanks! So in a full implementation, it'd likely be a cloud or server deployment where the using notifications make a lot of sense. I'll be sure to mention that in onward conversations.

Thanks!