Skip to main content
Known Participant
Jul 26, 2019 2:23 PM UTC
Question

Can a PDF file be opened and hidden from view?

I want to open a pdf, read from it,  but keep it hidden from view. Can this be done?

This topic is closed to new replies. Start a new post to keep the conversation going.

19 replies

Jim_MacD1Author
Known Participant
Apr 4, 2020 7:09 PM UTC

Still can't get bHidden to work. Yes, I put this.disclosed=true in document level.

 

Anyone have SIMPLE sample code using bHidden?

Translate
Thom Parker
Community Expert
Community Expert
Apr 4, 2020 10:40 PM UTC

Where are you using this code?

Please post the complete script.  

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Jim_MacD1Author
Known Participant
Apr 9, 2020 8:08 PM UTC

"this.disclosed = true" in docuemt level script

 

var otherDoc = app.openDoc("SampleDoc.pdf", bHidden:true);

otherDoc.closeDoc(true);

 

I get SyntaxError: missing ) after argument list

Translate
Joel Geraci
Community Expert
Community Expert
Jul 26, 2019 4:33 PM UTC

You can use JavaScript to open a PDF file and keep it hidden but in your use case, the document wll also need to be "disclosed" in order to use JavaScript to communicate data between documents.

Translate
try67
Community Expert
Community Expert
Jul 26, 2019 2:49 PM UTC

No.

Translate
Jim_MacD1Author
Known Participant
Jul 26, 2019 3:32 PM UTC

Can a pdf be hidden using "bHidden" command? The following is taken from

Adobe Acrobat 7.0.5

Acrobat JavaScript Scripting Reference

Manual

Example 3 (Acrobat 7.0)

Open a hidden PDF document, extract information from it, and close it.

oDoc = app.openDoc({

cPath:"/C/myDocs/myInfo.pdf",

bHidden: true

});

var v = oDoc.getField("myTextField").value;

this.getField("yourTextField").value = v;

oDoc.closeDoc();

Translate
Bernd Alheit
Community Expert
Community Expert
Jul 26, 2019 4:32 PM UTC

Yes, this is possible.

Translate