Document conversion

%3CLINGO-SUB%20id%3D%22lingo-sub-1924237%22%20slang%3D%22en-US%22%3EDocument%20conversion%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1924237%22%20slang%3D%22en-US%22%3E%3CP%3EHello!%3C%2FP%3E%3CP%3EWe%20have%20been%20testing%20the%20Universal%20Print%20feature%20in%20combination%20with%20pull-print%20scenario.%20It%20worked%2C%20basically%2C%20all%20things%20considered.%20But%20we%20also%20wanted%20to%20test%20the%20document%20conversion%20and%20this%20particular%20feature%20failed.%3C%2FP%3E%3CP%3EWe%20enabled%20the%20feature%20under%20the%20corresponding%20section%20in%20the%20Universal%20Print%20management%20view.%20We%20have%20also%20configured%20the%20virtual%20printer%20(used%20for%20pull-print)%20to%20accept%20only%20PDF%20as%20content%20type.%3C%2FP%3E%3CP%3EStill%2C%20when%20we%20spooled%20a%20print%20job%20using%20a%20Windows%20client%2C%20the%20job%20data%20remained%20in%20OpenXPS%20format.%3C%2FP%3E%3CP%3EIs%20something%20wrong%20with%20our%20approach%20%2F%20configuration%3F%20Or%20is%20the%20document%20conversion%20not%20supported%20yet%3F%3C%2FP%3E%3CP%3EDoes%20anybody%20tested%20this%20and%20can%20confirm%20that%20it%20works%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2196042%22%20slang%3D%22en-US%22%3ERe%3A%20Document%20conversion%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2196042%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F878929%22%20target%3D%22_blank%22%3E%40abitor%3C%2FA%3E%26nbsp%3BI%20seem%20to%20get%20the%20same%20results%20as%20you.%20There%20appears%20to%20be%20documentation%20to%20suggest%20this%20should%20work%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Funiversal-print%2Ffundamentals%2Funiversal-print-document-conversion%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Funiversal-print%2Ffundamentals%2Funiversal-print-document-conversion%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20note%20this%20also%20seems%20to%20happen%20when%20I%20use%20application%2Fxps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20only%20content-type%20setting%20it%20seems%20to%20work%20with%20is%20application%2Foxps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETa%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAndy%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2208028%22%20slang%3D%22en-US%22%3ERe%3A%20Document%20conversion%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2208028%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F878929%22%20target%3D%22_blank%22%3E%40abitor%3C%2FA%3E%26nbsp%3B%2F%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F991795%22%20target%3D%22_blank%22%3E%40AndyGGS%3C%2FA%3E%26nbsp%3BFirst%20lets%20confirm%20a%20few%20things%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EThe%20virtual%20printer%20you%20created%20supports%20PDF%20only%20as%20content-type.%3C%2FLI%3E%0A%3CLI%3EThe%20virtual%20printer%20does%20contain%20OXPS%20as%20one%20of%20the%20supported%20content%20types%3C%2FLI%3E%0A%3CLI%3EAre%20you%20trying%20to%20implement%20task%20trigger%3F%20If%20yes%2C%20then%20are%20you%20accessing%20the%20document%20after%20completing%20the%20task%20trigger%3F%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EHere%20is%20how%20it%20should%20work%20(if%20you%20have%20PDF%20only%20as%20the%20content%20type)%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EFor%20Windows%20versions%202004%20onwards%20(2004%20and%2020H2)%2C%20Windows%20itself%20will%20upload%20PDF%20and%20you%20can%20access%20the%20payload%20in%20PDF%20format.%3C%2FLI%3E%0A%3CLI%3EFor%20Windows%20versions%201903%20and%201909%2C%20Windows%20uploads%20OXPS.%20If%20you%20have%20task%20trigger%2C%20Universal%20Print%20will%20create%20a%20task%20and%20then%20wait%20for%20your%20application%20to%20complete%20the%20task.%20During%20all%20this%20time%20payload%20will%20continue%20to%20be%20in%20OXPS%20(unless%20you%20convert%20to%20another%20format%20and%20replace%20the%20payload).%20Once%20you%20have%20mark%20the%20task%20as%20complete%2C%20then%20Universal%20Print%20will%20process%20the%20job%20further%20and%20convert%20to%20PDF%20(if%20not%20already%20converted%20and%20document%20conversion%20is%20enabled).%20After%20conversion%20to%20PDF%20job%20will%20move%20to%20JobFetchable%20status.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHope%20this%20clarifies.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%2C%3C%2FP%3E%0A%3CP%3ESaurabh%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

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!