Need to ask the user to agree to the terms and conditions of a document upon printing or saving.
Once they agree we only want them to be print a subset of the pages in the document (not all).
At present I can only seem to make this happen so that the print range is set in the print dialog.
This is no good as we don't want them to be able to change the print range.
So I suppose I'm asking, is there any way to stop certain pages of a document being printed and/or saved when printing or saving the entire document - when the client is viewing the document in the reader?
There must be a way to do this in the DOM... I just can't find it.
Thanks you wonderful experts!
You can however make things difficult for everyone but the experts. For example, place full page opague watermarks over all the pages you don't want printed. User JavaScript from the [url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/javascript_console/]Console Window[/url] to rename the OCG Layers created by adding the watermark and turn them off.
Then use the "WillSave" and "WillPrint" events to turn the OCGs on right before printing or saving. In the case of saving you'll also have to change the default state of the OCGs to On. You may also need to play tricks with hidden fields to make sure the state sticks. Here's an article on OCGs
[url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/create_use_layers/]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/create_use_layers/[/url]
Turning off JavaScript and/or knowlege that's in the article above can defeat this mechanism. But only a few people will be able to do that.
Also, this method only applies to AcroForms
You can sort of force people to open the doc with JS. check out the "doc.addRequirment()" function in the Acrobat JavaScript Reference.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script