Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Learn More

printing PDF document directly to a specific printer using Firefox internal PDF viewer (PDF Javascript statements)

  • 1 odpoveď
  • 1 má tento problém
  • 9 zobrazení
  • Posledná odpoveď od cor-el

more options

Hi, I need printing a PDF document directly to a specific printer bypassing the printing dialog. In order to do it I enclosed some JavaScript code within the PDF document (see below).

This is working when using the Adobe Reader Firefox plugin (which has been dismissed in the lastest versions of FireFox).

I tried to use the embedded Firefox PDF viewer and everything is working fine except for the printer selection. In other words the printing dialog box does not appear (I had to change some configuration in about:config) but the PDF gets always printed to the default printer, thus ignoring the JavaScript statement below "pp.printerName").

Any hint to solve my issue ?

Thanks, Alberto



%PDF-1.4 %âãÏÓ 1 0 obj <</S/JavaScript/JS(var pp = this.getPrintParams\(\);)>> endobj 2 0 obj <</S/JavaScript/JS(pp.NumCopies = 1;)>> endobj 3 0 obj <</S/JavaScript/JS(pp.interactive = 2;)>> endobj 4 0 obj <</S/JavaScript/JS(pp.pageHandling = 3;)>> endobj 5 0 obj <</S/JavaScript/JS(pp.printerName = 'SAMPLEPRINTER';)>> endobj 6 0 obj <</S/JavaScript/JS(this.print\(pp\);)>> endobj 7 0 obj <</Names[(0000000000000000) 1 0 R(0000000000000001) 2 0 R(0000000000000002) 3 0 R(0000000000000003) 4 0 R(0000000000000004) 5 0 R(0000000000000005) 6 0 R]>> endobj 8 0 obj <</Type/Metadata/Subtype/XML/Length 2952>>stream <x:xmpmeta xmlns:x="adobe:ns:meta/">

  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
     <rdf:RDF rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/">
        <dc:format>application/pdf</dc:format>

... ... ...

Hi, I need printing a PDF document directly to a specific printer bypassing the printing dialog. In order to do it I enclosed some JavaScript code within the PDF document (see below). This is working when using the Adobe Reader Firefox plugin (which has been dismissed in the lastest versions of FireFox). I tried to use the embedded Firefox PDF viewer and everything is working fine except for the printer selection. In other words the printing dialog box does not appear (I had to change some configuration in about:config) but the PDF gets always printed to the default printer, thus ignoring the JavaScript statement below "pp.printerName"). Any hint to solve my issue ? Thanks, Alberto ---------------------------------------------------- %PDF-1.4 %âãÏÓ 1 0 obj <</S/JavaScript/JS(var pp = this.getPrintParams\(\);)>> endobj 2 0 obj <</S/JavaScript/JS(pp.NumCopies = 1;)>> endobj 3 0 obj <</S/JavaScript/JS(pp.interactive = 2;)>> endobj 4 0 obj <</S/JavaScript/JS(pp.pageHandling = 3;)>> endobj 5 0 obj <</S/JavaScript/JS(pp.printerName = 'SAMPLEPRINTER';)>> endobj 6 0 obj <</S/JavaScript/JS(this.print\(pp\);)>> endobj 7 0 obj <</Names[(0000000000000000) 1 0 R(0000000000000001) 2 0 R(0000000000000002) 3 0 R(0000000000000003) 4 0 R(0000000000000004) 5 0 R(0000000000000005) 6 0 R]>> endobj 8 0 obj <</Type/Metadata/Subtype/XML/Length 2952>>stream <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:RDF rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:format>application/pdf</dc:format> ... ... ...

Všetky odpovede (1)

more options