Feb 23 2021 09:26 AM
Feb 23 2021 09:26 AM
I am new to universal print and I am trying to receive notifications when a print job is submitted by the user. So far, I have registered the virtual printer and defined the task definitions and task triggers. I also found out how to subscribe to the change notifications and the way I understand it is, the universal print service, using MS Graph API would send the notifications to the web app in the following scenarios -
1. Initial test notification for validation purposes when the web app subscribes for the notifications for the first time.
2. When the registered task is triggered like the jobStarted event.
Now the challenge I am facing is as follows -
The web app receiving the notifications precisely the notificationUrl is beyond the firewall and I can't open the ports on the firewall to allow the outside requests.
So is there a way to receive universal print change notifications from MS Graph without changing the firewall settings ? Does universal print send notifications over websockets or is there another way to do this ?
Any suggestions on this would be highly appreciated.
Thanks in advance.
Feb 23 2021 05:11 PM
@HimanJo the job notification subscription is a callback model so the URL needs to be reachable by the cloud service.
Are you able to look into hosting your application in the cloud?
Or, have a proxy that re-routes the incoming internet traffic into the local network so you only have to open port 443 or 80 which have well known methods for security lockdown/packet inspection.
Feb 24 2021 02:42 PM
@Jimmy_Wu Thank you so much for responding. However, I won't be able to host the application in the cloud nor have an intermediate proxy. This application is supposed to run on the printer which is beyond the firewall.
The problem that I am trying to solve is -
How would the physical printer know that a job has been submitted by the user and it needs to be fetched and printed?
In my case I don't want to use a connector but I need to write a program which runs on the printer and then fetches and prints the job after it has been submitted by the user.
Based on my knowledge, I can think of -
Notifications or would polling the virtual print queue for newer jobs (from the printer app) be a better approach ?
Feb 25 2021 10:09 AM
@HimanJo if the program runs on the physical printer, then you currently have 2 options.
The polling method will be easier to implement, but the overall print experience will need to be balanced between too many rapid poll requests (excess network traffic and power consumption) versus too long of a wait time between polls.
Hope that helps.
Feb 25 2021 04:20 PM
Feb 25 2021 04:22 PM
Feb 26 2021 03:07 PM