-
I'm having trouble confirming whether this extension can run in offline environment because importing library or sending handmade code(s) from/to external is prohibited in my team. The following page (https://github.com/PDConSec/vsc-print/blob/master/README.md) says "Print code. Print rendered Markdown. Local or remote." For example, does it mean calling local loopback address and don't communicate with external? Regards. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
For the purpose of printing source code with line numbers and syntax colouring, the Print extension does not use network services. There is an embedded webserver on the loopback address from which your web browser receives a formatted document. The embedded webserver will reject a connection from any host other than localhost. It will also close any established connection for which the HTTP request does not reference a current print session. It does not use SSL because everything happens on localhost. "Local or remote" refers to compatibility with Microsoft's support for "remote workspaces". For example, my workstation at home on which I develop the Print extension runs Windows, but my build server and docker host runs Ubuntu. I have various source code workspaces in the file system of the build server. I can open one of these remote workspaces directly using VS Code running on my workstation. A file share is not required, and when I compile this happens on the remote host. Print is compatible with these remote workspaces. You are not using remote workspaces so Print will use only local mode. Your source code will be rendered with line numbers and syntax colouring to a web browser running on your workstation, and you will print it from there. If you print rendered Markdown, then out of the box there is no dependence on networked services. However, this is affected by the Markdown extensions you have in your rendering pipeline. Many charting and diagramming extensions use web services. You only have two options for printing from VS Code. The other one uses CodeMirror (a web service) to render your code. |
Beta Was this translation helpful? Give feedback.
-
The Markdown rendering pipeline was recently replaced. If you need to use diagrams embedded in Markdown without internet access, then you will need to set up Kroki (a diagram rendering service) on the local network or on your workstation. Docker images are available, so this is very easy to do, and the software is free. |
Beta Was this translation helpful? Give feedback.
For the purpose of printing source code with line numbers and syntax colouring, the Print extension does not use network services. There is an embedded webserver on the loopback address from which your web browser receives a formatted document. The embedded webserver will reject a connection from any host other than localhost. It will also close any established connection for which the HTTP request does not reference a current print session. It does not use SSL because everything happens on localhost.
"Local or remote" refers to compatibility with Microsoft's support for "remote workspaces". For example, my workstation at home on which I develop the Print extension runs Windows, but my bu…