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).