PHP - Capturing the moment of print?

PHP - Capturing the moment of print?

Author
Discussion

Famous Graham

26,553 posts

227 months

Monday 6th September 2010
quotequote all
Lol...googled for "onafterprint firefox" to see if there was an equivalent and guess what I found, from 2007 tongue out


Famous Graham

26,553 posts

227 months

Monday 6th September 2010
quotequote all
Thinking a bit laterally...are all the docs going to be PDF now? And can you enforce the use of Acrobat whichever-version-you-could-embed-JS-from or newer?

http://forums.adobe.com/message/2558663#2558663


Edited by Famous Graham on Monday 6th September 17:07

Keith Lard

197 posts

218 months

Monday 6th September 2010
quotequote all
Famous Graham said:
Lol...googled for "onafterprint firefox" to see if there was an equivalent and guess what I found, from 2007 tongue out
Wow this is some conundrum - I spy a 3 year old post from someone who sounds familiar http://forums.mozillazine.org/viewtopic.php?f=38&a...

BliarOut

Original Poster:

72,857 posts

241 months

Monday 6th September 2010
quotequote all
They've lost my user weeping

That embedded js might come in very handy, I'll have a look when I'm back in the office biggrin

BliarOut

Original Poster:

72,857 posts

241 months

Tuesday 7th September 2010
quotequote all
Well JS led me to the Adobe JS API which has just led me to this:

{{{

function Print() {
print();
this.getURL('llogit.php?RecordNo=$RecordNo&DBForLogit=db04',false);
}

}}}

Which works! OK, it's only attached to a print button at the moment but I'm sure a PDF has a print event to tie it to bounce

Famous Graham

26,553 posts

227 months

Wednesday 8th September 2010
quotequote all
thumbup

I'm pretty sure there's a handler for executing code irrespective of how it was printed.

You might have already found this, but just in case :
http://partners.adobe.com/public/developer/en/acro...

There's a bit on page 81 that looks useful to you as well (given what I've understood about the process so far), in reference to silent printing.

Edited by Famous Graham on Wednesday 8th September 14:35

BliarOut

Original Poster:

72,857 posts

241 months

Wednesday 8th September 2010
quotequote all
I'm up to my neck in the API at the moment and it appears that the DidPrint may not trigger with a document created on the fly banghead

Every route I head down seems to have a roadblock after about two days weeping