Planet PDF Forum Archive

Planet PDF  ForumThe page you are viewing is part of our 160,000 page discussion forum archive. See below for PDF-related discussions spanning 1999-2008. To ask questions and get help, head to the live Planet PDF Forum.


How to search this archive. The quickest way is to use the filters on our Advanced Search page so that only archive pages are included in the results.


Previous | Next | (P-PDF) JavaScript


Topic: Re: close document impossible? (Via Email)
Conf: (P-PDF) JavaScript, Msg: 152018
From: cdahl
Date: 7/12/2006 10:10 PM

Hi Laurie,

Yes you can, the trick is with the object referencing. What you want to
do is create a JavaScript variable (in example below this is
'targetDoc') to store the Doc object of the PDF document you're wanting
to open in, then use the this.closeDoc() to close the current PDF.
Here's some code, hopefully you can follow...

--------------------

// the PDF you want to open
var targetDoc = app.openDoc("/c/temp/targetpdf.pdf");

// now close the current PDF that is open
this.closeDoc();

--------------------

You would just put that JavaScript under the Mouse Up event of whatever
annotation (link, form field, etc) you're getting the user to click.

- Chris.
___________________________________

Chris Dahl
ARTS PDF / Nitro PDF
http://www.artspdf.com/
-----------------------------------
3x FASTER THAN ACROBAT, 1/3 THE PRICE.
Winner of PC User magazine's "Top Buy" award.
Get Nitro PDF by ARTS PDF now: www.nitropdf.com


PDF In-Depth Free Product Trials Ubiquitous PDF

Pitstop Pro

Now graphic arts professionals have even broader and more expert control over their PDF documents. With...

Download free demo

ARTS PDF Aerialist

The ultimate plug-in for Adobe Acrobat and #1 selling product at PDF Store. Advanced splitting, merging,...

Download free demo

Ubiquitous PDF: Free short film distribution guide released

Nigel Smith, an award-winning producer of short films, has released a free PDF guidebook to help budding filmmakers find wider audiences for their short films.

December 04, 2008
Search Planet PDF
more searching options...




PDF Resources
Platinum Sponsor
Create & Edit PDF - Nitro PDF Software

ARTS PDF

Silver Sponsors

PDF-Tools enfocus

FileOpen PDFNet SDK: PDF Component. Cross-platform PDF library

PDF Converter: Create, Convert PDF to Word/Excel Visual Integrity: Convert, Create, Extract, Merge and Modify PDF

Debenu: Desktop Document Management, Archiving and Tagging Software SmartSoft

Get Nitro PDF Professional
Featured Product

NITRO PDF Professional

Built from the ground up, the perfect desktop PDF product for business and enterprise. Nitro PDF Professional has an uncompromising feature set so you can create, combine, edit, collaborate on and...

Featured Event

No upcoming events

PDF Store Categories