Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Learn More

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

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

  • 1 antwoord
  • 1 heeft dit probleem
  • 9 weergaven
  • Laatste antwoord van 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> ... ... ...

Alle antwoorden (1)

more options