pdf in <embed> and <iframe> is printed as vector graphics with text layer by Firefox native pdf.js plugin, however, pdf is printed as raster image without no text layer, if rendered by pdf.js in normal html. You may go to searchfox or Chrome extension to download source code to find out how to print pdf as vector graphics.
For this reason, I decide to use <embed> for TeX generated pdf on cjhb, but it has the following defect: if width of embedded pdf is larger than its height, and the top level HTML document printed in portrait orientation, then the embedded pdf will be rotated 90°. We can execute JS in console:
PDFViewerApplication.pdfViewer.enablePrintAutoRotate=false;
For example, this PDF shows a horizontal rectangle. It is a vertical rectangle if printed. After executing the above JS code, it is printed as is (a horizontal rectangle). The automatic rotation was added to pdf.js as a feature, but it hampers embedded pdf to be properly printed. Here is some discussion on this.
Print preview rotates the pdf content to the left
Github - pdf.js - Rotate landscape pages, during printing, by default in the viewer
Debugging PDF.js
To avoid manually execute JS in the embedded document each time, for Firefox, set/create a pdfjs.enablePrintAutoRotate setting as a boolean false in 'about:config'