Programmatically encrypt PDF using User Certifcate

Hi all,
I would like to programmatically encrypt a pdf using a user certificate (.cer), where the user certificate is stored in a specified directory. Is there a way to do it using vb.net? I had a look at the the acrobat sdk, but couldn't find relevant coding samples to perform the above.
Please help.
Thanks.
Jess

I now try to write the pass the AcroJS script in my vb.net code through the addScript function of the JSObject:
Dim jso As Object = pdDoc.GetJSObject
Dim JSScript As String = "security.getHandler(""Adobe.PPKMS"", true); "
jso.addScript("Test", JSScript)
However, it gave an error when i tried to execute the getHandler function. I tried putting the code directly into Acrobat as well and that didn't work either.
Am I missing something? Please help.
Thanks.
Jess

Similar Messages

  • Preserving filename when encrypting PDFs in Preview

    Dear All,
    When I encrypt PDFs using Preview in the normal way (Print -> PDF -> Set Security) everything works fine and the filename is preserved. However if I do this in Automator the filename gets given an alphanumeric name. I don't understand why this is. When I open that file, it asks for the password that I had originally set and it reveals the document.
    My workflow is like the following:
    Get Selected Finder Items (i am only selecting doc not docx)
    Convert Format of Word Documents (to pdfs)
    Encrypt PDF (Picked out from the Documet list)
    Move Finder Items (To desktop)
    Quit Application (Word in this case)
    All of the above seems to be just fine only that the filename gets converted to something else.
    On the system.log file I get the following entries (hope this helps!)
    Feb 1 12:07:10 Macintosh [0x0-0x300300].com.apple.Preview[17593]: Sun Feb 1 12:07:10 Macintosh.home Preview[17593] <Error>: CGCryptorProcessBytes: CCCryptorUpdate failed: error -4300.
    Feb 1 12:07:42: --- last message repeated 2 times ---
    Feb 1 12:09:38 Macintosh mdworker[17730]: (Error) Import: Importer force killed!
    Feb 1 12:09:38 Macintosh com.apple.launchd[1] (0x1004a0.mdworker[17730]): Exited with exit code: 1
    Feb 1 12:10:42 Macintosh /Applications/Microsoft Office 2008/Microsoft Word.app/Contents/MacOS/Microsoft Word[18057]: CPSGetProcessInfo(): This call is deprecated and should not be called anymore.
    Feb 1 12:10:42 Macintosh /Applications/Microsoft Office 2008/Microsoft Word.app/Contents/MacOS/Microsoft Word[18057]: CPSPBGetProcessInfo(): This call is deprecated and should not be called anymore.
    Feb 1 12:10:54 Macintosh /Applications/Automator.app/Contents/MacOS/Automator[4259]: setting security information: /Users/rjani5/Desktop/1zwCC1.pdf: Operation not permitted
    Many thanks in advance.
    Kind regards,
    Vnayak

    I played with the encrypt pdf action and it seems buggy. it can't replace the original (non-encrypted) pdf. instead it creates a temp file with a random alpha-numeric name and passes it to the next action. the way around it as i see it should be to first save the name of your word file in a text variable and after the encrypt action (or maybe after the move action) rename the resulting file. "rename finder items" doesn't seem to want to accept variables so you'll have to do the renaming via apple or shell script.

  • Unable to save a copy of encrypted pdf with Acrobat Pro 10.0

    I create an encrypted pdf using prince a tool to convert HTML documents to pdf. I am unable to save a copy of the pdf file when i use Acrobat Pro 10.0.
    It displays the following error
    "The document could not be saved. There was a problem reading this document(21)."
    However Acrobat Reader (basic) allows me to do so.
    I am also able to save a copy of the document with Acrobat pro 7. I raised this issue with Prince and they told me that it could probably be a bug/unwanted behaviour with Acrobat Pro 10.0
    My system environment details:
    OS: Windows xp
    Acrobat Pro: 10.0.0
    Acrobat Reader: 10.1.0

    Use the forum for Adobe Acrobat.

  • Unable to save a copy of encrypted pdf with Acrobat Pro

    I create an encrypted pdf using princexml a tool to convert HTML documents to pdf. I am unable to save a copy of the pdf file when i use Acrobat Pro 10.0.
    It displays the following error
    "The document could not be saved. There was a problem reading this document(21)."
    However Acrobat Reader (basic) allows me to do so. I am also able to save a copy of the document with Acrobat pro 7. I raised this issue with Prince and they told me that it could most probably be a bug/unwanted behaviour with Acrobat Pro 10.0
    My system environment details:
    OS: Windows xp
    Acrobat Pro: 10.0.0
    Acrobat Reader: 10.1.0

    Use the forum for Adobe Acrobat.

  • Have an Adobe PRO 11 user converting a word Document to PDF using PDFMAKER and all of the numbering is disappearing from left column,.  Has anyone had this happen and if so what is the fix?

    have an Adobe PRO 11 user converting a word Document to PDF using PDFMAKER and all of the numbering is disappearing from left column,.  Has anyone had this happen and if so what is the fix?

    Is it possible to post a sample page some place for us to try out (dropbox or acrobat.com)? Is your Acrobat updated? What version of WORD are you using?

  • Can we programmatically search, hightlight text and make annotations in PDF using JQuery?

    How can i  programmatically search, hightlight text and make annotations in PDF using JQuery?

    JQuery is part of the OS and Acrobat/Reader is very isolated from the contact with the OS. If you were to write a plug-in in and add it to your copy of Acrobat/Reader you could then use that plug-in to access the OS shell.

  • View Encrypted PDF in Flex

    Hi,
    I'm trying to find out how to view an encrypted PDF programmatically in Flex. I would like to be able to do several things:
    1) View an encrypted pdf on my local machine and do it by decrypting with the password through ActionScript.
    2) Allow for viewing a pdf from a memory stream.
    So far, I have been able to view a PDF using the HTMLLoader class, but I don't think this allows me to enter the decryption password for a pdf programmatically. I already have a PDF that was encrypted using Adobe Acrobat's encryption. Any help would be greatly appreciated. Thanks
    -Aaron

    kilyas, I to once thought it would be simple to load pdf's
    into flex however there is no easy way to accomplish this task.
    Whenever a pdf is loaded acrobat reader is always going to want to
    take over the control of this. The one solution that I however did
    come up with is by using one of the HTML component renderers within
    flex. Something like this
    http://www.flexcapacitor.com/htmlcomponent/examples/HTMLFrameInApplication.html
    once you have that component loading html urls correctly you can
    then set the url straight to the pdf. This will then launch adobe
    reader inside of your html component and allow the user to "view a
    pdf within flex" kind of... The major flaw I've found with this is
    it seems to lag when the browser window containing the flex
    application is moved around as well as resized. If anyone has a
    better solution though I would also like to hear it.

  • Metadata of encrypted PDF in iBooks

    Hello everyone,
    I got some encrypted PDF-files (document's content without meta-data is encrypted, opening files without keyword is possible, keyword required for modifying the file).
    The meta-data of these files (author, title) are readable in applications as like Adobe Reader oder Adobe Digital Editions.
    Using a Text Editor, I can see the meta-data in the XMP of the PDF-file.
    Unfortunately, the author and title are shown in cryptic letters in iBooks.
    Does that mean, iBooks doesn't support the XMP-Meta-data?
    Is this a possible feature of upcoming versions of iBooks?
    Anybody out there knowing about an other App supporting XMP in PDF?
    Thanks for your input,
    Thomas Mertens

    Is this a possible feature of upcoming versions of iBooks?
    You are just talking to other users like yourself here, and nobody knows what Apple plans for future improvements in this app. Tell them you want it via feedback:
    http://www.apple.com/feedback/

  • Encrypt PDF missing from menu?

    Hello all. I'm having a slight problem here. When I go to the print screen in any application, and go to the PDF menu, The option to Encrypt PDF is missing. I have Yojimbo installed (http://www.barebones.com/products/yojimbo/), and in the menu is "Send PDF to Yojimbo". Did Yojimbo possibly remove these items? Can't see why it would. Anyone know how I can get these back? Any help would be greatly appreciated. Thanks.
    Brett

    Could be system corruption. You could try doing an Archive and Install:
    How to Perform an Archive and Install
    1. Be sure to use Disk Utility first to repair the disk before performing the Archive and Install.
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior (4.0 for Tiger) and/or TechTool Pro (4.5.2 for Tiger) to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Do not proceed with an Archive and Install if DU reports errors it cannot fix. In that case use Disk Warrior and/or TechTool Pro to repair the hard drive. If neither can repair the drive, then you will have to erase the drive and reinstall from scratch.
    3. Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When you reach the screen to select a destination drive click once on the destination drive then click on the Option button. Select the Archive and Install option. You have an option to preserve users and network preferences. Only select this option if you are sure you have no corrupted files in your user accounts. Otherwise leave this option unchecked. Click on the OK button and continue with the OS X Installation.
    4. Upon completion of the Archive and Install you will have a Previous System Folder in the root directory. You should retain the PSF until you are sure you do not need to manually transfer any items from the PSF to your newly installed system.
    5. After moving any items you want to keep from the PSF you should delete it. You can back it up if you prefer, but you must delete it from the hard drive.
    6. You can now download a Combo Updater directly from Apple's download site to update your new system to the desired version as well as install any security or other updates. You can also do this using Software Update.

  • How do I encrypt pdf form on Submit by email

    Hi,
    Is there anyway to encrypt the pdf form after the user clicks on the "Submit by Email" button?
    I have Acrobat 9.

    Though an encrypted PDF (i.e. one with security settings) does nothing to protect your data in transit. The PDF can still be opened by anyone who intercepts the mail.
    If data is sensitive email isn't suitable. You need to submit to a web site, using the secure https protocol.

  • Acrobat DC, encryption, PDF forms

    Can someone who has a paid subscription to Acrobat DC fill out a PDF form that has password protection?
    Can they edit a PDF that does not have password protection?

    George,
    Just to make sure I understand --
    Never in previous versions was it possible to fill out an encrypted PDF form on a mobile device.
    I read Adobe's FAQs for Acrobat DC at FAQ | Acrobat DC mobile app. It does not say that it is possible to fill out an encrypted PDF on a mobile device.
    Is it truly -- finally -- possible to fill out an encrypted PDF form on a mobile device using the subscription version?
    More importantly for most form developers and form users -- is it possible to fill out an encrypted PDF form on a mobile device using the FREE version? (Now THAT would be useful!)

  • Permissions with problem when encrypting pdf with certificate

    I am using the following javascript code to encrypt a pdf using a certificate:
                        var thePermissions = {
                             allowAll: false,
                             allowAccessibility: false,
                             allowContentExtraction: false,
                             allowChanges: "none",
                             allowPrinting: "none"
                         var theCertificate = security.importFromFile(
                             "Certificate",
                             "/c/user.cer"
                         var theUserEntity = {
                             firstName: "The",
                             lastName: "User",
                             fullName: "The User",
                             certificates: theCertificate,
                             defaultEncryptCert: theCertificate
                         var theGroup = { userEntities: [ theUserEntity ], permissions: thePermissions };
                         encryptForRecipients( { oGroups: [ theGroup ] } );
                        saveAs("encrypted.pdf");
    The file "encrypted.pdf" resulting is in fact encrypted, but the permissions doesn't seem to be correct. For instance, the Document Properties show that there are no document restrictions (DocumentProperties.PNG), but when the details are shown, it seems that the correct restrictions apply (DocumentSecurity.PNG). As can be seen in the permissions variable, there should be no permissions to the pdf generated. Can someone possibly help me with this?
    Additional info: there should have no human interaction in the process, the certificate is not fixed (preventing using encryptUsingPolicy), and will be selected based on the file name of the original pdf.

    Hi Leonard,
    I see the same thing executing the script from the JavaScript console. There is a slight wrinkle in the steps to reproduce. Even if everything worked as it's supposed to, you would still need to close and then reopen the file in order to get the perm restrictions to take effect. This is because when you initially encrypt the file you are still the document owner, and thus none of the perms have yet taken effect. However, once you do close and then reopen the file (thus forcing an authentication), the file should open with the perms being enforced, but alas, they are not.
    Interestingly, if you go into the Document Properties and then select the Security tab (or just click the Permissions Details button in the DMB) you see that the Restriction Summary shows that everything is allowed, but when you click the Show Details button, which just displays the restrictions applicable to the encryption handler, it shows the correct settings. Of course the real bug isn't that the restriction summary is incorrect, but rather that it is correct and all of the supposedly restricted operations are allowable.
    I'll enter this as a bug against 10 along with the ER to add the encryption algorithm as an option to the encryptForRecipients JS function.
    Steve

  • Convert smartform output in to PDF using CONVERT_OTF function  how to do it

    Hi Anil , and  Hi All
             I am trying to display smartforms output in java webdynpro
             for that i have got the following code in sdn.
               can anybody please clarify these doubts in the  below code
               1) What are the mandatory input and output parameters
                   I have to pass here in this code to my application
               2) please check my previous post also in this regards please
       . Please reply at the very earliest. Check the below code
    Convert smartform output in to PDF using CONVERT_OTF function module and you can write pdf using parameter 'binfile' of this function in WebDynpro using the following code:
    It is copied from my prg. I hope you understand it.
    public void onActionGetQuote(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionGetQuote(ServerEvent)
    wdThis.wdGetOppt_QwriterCustController().executeZquote_Writer_Input();
    String fileName = wdContext.currentZquote_Writer_InputElement().getOrder().toString().trim() + System.currentTimeMillis() + ".pdf";
    String pdfOutput = new String(wdContext.currentOutputElement().getBinfile());
    if (pdfOutput != null)
    try
    String pdfResoucePath = WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(), fileName);
    FileOutputStream fileOutputStream = new FileOutputStream(new File(pdfResoucePath));
    PrintStream ps = new PrintStream(fileOutputStream);
    ps.print(pdfOutput);
    ps.close();
    //Display the PDF to the browser
    String fileURL = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getDeployableObjectPart(), fileName);
    IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(fileURL, "Pdf Browser", false);
    window.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
    window.removeWindowFeature(WDWindowFeature.MENU_BAR);
    window.removeWindowFeature(WDWindowFeature.STATUS_BAR);
    window.removeWindowFeature(WDWindowFeature.TOOL_BAR);
    window.open();
    // To collect all the file created in the server by user
    quoteFiles.add(quoteFiles.size(), pdfResoucePath);
    } catch (Exception e)
    throw new WDRuntimeException(e);
    //@@end

    Hi
        ABAPers prepared a BAPI function module which calls Smart form , how can i execute it from java Webdynpro, so that I can display the smart form in Webdynpro. Pleas reply at the very earliest.  Every answer will be rewarded.
    regards
    jalandhar

  • Report Title and Text Area issue when exported to pdf using Viewer

    Hi there,
    We are using OracleBI Discoverer Version 10.1.2.55.26
    We have reports that displays Report title containing the following
    - Report Title
    - Runt Date and Time
    - Page No
    And text area which displays 'Last Page'
    Following properties are set at the worksheet level using page setup
    Report Title --> 'Print on every Page'
    Text Area --> 'Print on last page'
    The report when exported to PDF using Discoverer plus works fine and displays report title and text area as defeined.
    But when we try to export the same report to pdf from Discoverer viewer, it displays
    - Report title on first page only.
    - text area on all pages
    All our users accesses report using discoverer viewer so we cannot open discoverer plus to them.
    Is there a solution which will enable us to export the report in pdf using discoverer viewer and displays the same output as discoverer plus.
    Please let me know... If you have any questions then please feel free to ask.
    Thanks in advance for your help...
    Manish

    but when opened on other os x machines some text is colored differently than it should be
    Well, if typographic objects are colour managed, the colour appearance is dependent on the source ICC profile that describes the colourants in the typographic objects and the destination ICC profile that describes the colours the display is able to form and the RBC colourant combinations that will form those colours.
    In general, typographic objects should have special treatment, since the expectation is not that typographic objects should be colour managed, but that typographic objects should simple be set to the maximum density of dark. On a display, that is R=0 G=0 B=0 and on a seperations device (a lithographic press) that is C=0 M=0 Y=0 K=100.
    If for some reason typographic objects are colour managed, and if the ICC profiles for the displays are off by half a mile or more in relation to the actual state of the display system, then the colours will not be the same. On the other hand, if those displays are calibrated and characterized, then the colourants will be converted to form the same colours on the displays.
    /hh

  • We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader.

    We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader.
    For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer.
    "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>".
    Current Situation: The above command line parameter when executed is working as expected in a User's Workspace.
    When executed in a command line on the Application Server, it is working as expected.
    But, the same is not working while executing it from Deployed environment.
    Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2.
    Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.

    This is the Acrobat.com forum.  Your question will have a much better chance being addressed in the Acrobat SDK forum.

Maybe you are looking for

  • My purchased movies are no longer available to stream on my Apple TV

    I purchased Apple TV (Version 3) about 3-4 weeks ago. For the first few weeks I could access and stream all of my iTunes purchased movies through my Apple TV. This week, out of the blue, when I got to Movies > Purchased I get the message "You have no

  • I'm Scott Leiken and my iphone broke

    Hello Everyone, Im despareately in need of some quick help! I'm a fisherman and I leaned over the boat today (in shallow water) and dropped my phone into it I grabbed it quickly and then wiped it off. I've heard all those rumors about putting your ph

  • Accouting issue on goods movement

    There is one scenario in my client. They are some material in the stock and want to withdraw for the consumption. Right now, The issue is they do goods movement in the legacy system and balance is 0. they want to transfer all data to SAP including go

  • Service Account for SQL Server Agent on SQL Server 2008 R2

    This SQL Server instance is SQL Server 2008 R2 (10.50.4000).  We had Active Domain Service accounts created to run the service accounts for SQL Server and SQL Server Agent. It has become company policy to alter the service accounts that run SQL Serve

  • Glossary reports

    I don't find an option in RH X5 to run a report listing glossary terms and which topics contain glossary hotspots link to each term.  Does anyone know how to obtain such information? Thanks for any help. Diane