Skip to main content
Known Participant
July 26, 2019
Question

Can a PDF file be opened and hidden from view?

  • July 26, 2019
  • 3 replies
  • 2535 views

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

This topic has been closed for replies.

3 replies

Jim_MacD1Author
Known Participant
April 4, 2020

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

 

Anyone have SIMPLE sample code using bHidden?

Thom Parker
Community Expert
April 4, 2020

Where are you using this code?

Please post the complete script.  

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Jim_MacD1Author
Known Participant
April 9, 2020

"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

Joel Geraci
Community Expert
July 26, 2019

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.

try67
Community Expert
July 26, 2019

No.

Jim_MacD1Author
Known Participant
July 26, 2019

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();

Bernd Alheit
Community Expert
July 26, 2019

Yes, this is possible.