self destructive pdf

Explorer ,
Dec 20, 2018

Copy link to clipboard

Copied

Hello all,

I would like to write Javascript or VBA code to Make pdf self destructive after specific time (5 mins), when pdf is sent via mail to specific persons.

After 5 mins pdf page should become blank , no contents should not be displayed.

is this possible if possible could anyone please give suggestions how to proceed.

Thanks and Regards,

Yogesh

TOPICS
Acrobat SDK and JavaScript, Windows

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

self destructive pdf

Explorer ,
Dec 20, 2018

Copy link to clipboard

Copied

Hello all,

I would like to write Javascript or VBA code to Make pdf self destructive after specific time (5 mins), when pdf is sent via mail to specific persons.

After 5 mins pdf page should become blank , no contents should not be displayed.

is this possible if possible could anyone please give suggestions how to proceed.

Thanks and Regards,

Yogesh

TOPICS
Acrobat SDK and JavaScript, Windows

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 20, 2018 0
Most Valuable Participant ,
Dec 20, 2018

Copy link to clipboard

Copied

It's possible, but there are so many ways around it it's not really worth the trouble of setting it up.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 20, 2018 0
Adobe Community Professional ,
Dec 20, 2018

Copy link to clipboard

Copied

You can't make a PDF self destruct.  You can however make it difficult to view.  One of the problems is that not all viewers support scripting, especially the scripting necessary to obscure PDF content, so a script will only work on compliant viewers, i.e. desktop Acrobat/Reader. 

So there are a few techniques, but they all come down to encrypting or obscuring the PDF upfront. Then some script or tool unlocks the PDF content if some given conditions are true. For example, a watermark can be added to every page that blocks all the content from being viewed. Then a document script hides the watermark on opening if conditions are met.

There's a tutorial and example of this technique here: Lite Document Security

But this method is not foolproof.

The most effective technique for hiding content is to use a service like Lock Lizard or the Adobe Security server, which encrypt the PDF, which is a very high bar to get around.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 20, 2018 0
Explorer ,
Dec 20, 2018

Copy link to clipboard

Copied

hello sir,

Thanks for your suggestions,i will try from my side , do you have any idea on itextsharp pdf  c# coding is possible for this question.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 20, 2018 0
Adobe Community Professional ,
Dec 20, 2018

Copy link to clipboard

Copied

If depends on your strategy for protecting the document. iText is a really good PDF library, so it can be used to add the water mark OCG layer, and it can be used to encrypt PDF content with a digital certificate.

So it can certainly be used to modify the PDF for the protection strategy, but the actual action of blocking the user from seeing content is up to the viewer and it's capabilities.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 20, 2018 0
Explorer ,
Dec 20, 2018

Copy link to clipboard

Copied

Thanks you so much !! i will come back once i finish

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 20, 2018 0
Explorer ,
Jan 01, 2019

Copy link to clipboard

Copied

hello sir ,

since i have no time to explore in it , i have written code in acrobat pro but this code works in console window but javascript editor throws security error could you please helpe me what is this error

var path1="D:/Public/Documents/jan.pdf";

var fileexists=0;

try

{

    var file1=app.openDoc(path1);

    fileexists=1;

    }

if(fileexists==1)

{

    this.closeDoc(true);

    }

else

{

    var rightNow = (new Date());

var minutes=rightNow.getMinutes();

var x=0;

while(x==0)

{

    var rightNow1 = (new Date());

var minutes1=rightNow1.getMinutes();

if(minutes1-minutes==2)

{

    var newDoc=app.newDoc();

newDoc.saveAs(path1);

newDoc.close(true);

   

    x=1;

   

this.closeDoc(true);

    }

}

}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 01, 2019 0
Most Valuable Participant ,
Jan 02, 2019

Copy link to clipboard

Copied

Are you trying to embed this in a PDF? It cannot possibly work, read the full notes for the saveAs method. You would need to install a script on each machine. There are many other things wrong too (you can't save a PDF with no pages, for instance, and Acrobat will not respond while you use this hard loop).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 02, 2019 1