Quantcast
Channel: Adobe Community : All Content - Acrobat SDK
Viewing all articles
Browse latest Browse all 2571

Encrypt PDF file by elements

$
0
0

Hi all
I need decrypt a pdf file and I don’t want use embedded encryption api algorithm or sample program in api folders

I do this steps I want to know are this steps are correct or not

  1. 1-  Load file with this

AVDoc myAVDoc=AVDocOpenFromFile(pathName, fileSys, titleText);      

  1. 2-  export PDDoc by using this

 

       PDDoc myPDDoc2 =AVDocGetPDDoc(myAVDoc);

  1. 3-  acquire page by this

       PDPage p = PDDocAcquirePage(myPDDoc2,0);

  1. 4- acquire content

       PDEContent g= PDPageAcquirePDEContent(p,0);

  1. 5- get elementd

       g3=PDEContentGetElem(g,2);

  1. 6- after this with switch case I determine type of element

   ASInt32 tt = PDEObjectGetType(reinterpret_cast<PDEObject>(g3));

  1. 7- for example if the type is text by following casting , export PDEText

gali = reinterpret_cast<PDEText>(g3);

Now I need to know how can I encrypt PDEText , or how can I cast this type of data to binary data for encryption

Another question I want to know are this steps are correct? Or not, what is the correct solution and steps

 

I new in adobe api and PDF file structures and I need do this project as soon as possible. The project is this “get PDF file encrypt this file , not by default method. Encrypt elements or any pdf Components possible ”

  Regards


Viewing all articles
Browse latest Browse all 2571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>