this is exactly my question: why did the pdf generation need to be server side?
this is exactly my question: why did the pdf generation need to be server side?
We certainly could do the work on the client, but they're making this request in a context where neither the label nor the libraries need to be loaded; in fact, in our server-side implementation, it could be done with a single api call. Doing it all client side would strongly couple the client to the technology.
Also, we re-used this api in two applications, one of which never loaded the editor (along with its dependencies).
TLDR; a weird hack was better than violating separation of conerns.
is the printing service a real physical service?
anyway i'm doing basically exactly this same thing except all client side (i send the serialized "label file" and data to the client) but printing is being done using the user's printer
The reason we did it this way is 1. we have a web app so we can't print directly to their printer without a print dialog, and 2. we want to print to potentially a different device than the user is on.