Professional Web Applications Themes

PDDOCSAVE -throwing unhandled exception - Adobe Acrobat SDK

Hi Everybody, When i am using PDDOCSAVE in my application to secure a file using Acrobat 9.0 in VC++ i am getting unhandled exception The code is given below: { acroPdfFileFullPath = ASFileSysCreatePathName( NULL, ASAtomFromString ("Cstring"), buff, 0); PDDoc pdDoc = PDDocOpen(acroPdfFileFullPath, ASGetDefaultFileSys(), IfEncr , true); PDDocSave(pdDoc,PDSaveFull | PDSaveCollectGarbage , acroPdfFileFullPath,ASGetDefaultFileSys(),NULL,NUL L); } When i am using the same piece of code to secure a file iusing Acrobat 7.0 and 8.0 it is working fine but for 9.0 it is not working, Can u please tell how to proceed further? Regards Nethaji...

  1. #1

    Default PDDOCSAVE -throwing unhandled exception

    Hi Everybody,

    When i am using PDDOCSAVE in my application to secure a file using Acrobat 9.0 in VC++ i am getting unhandled exception

    The code is given below:
    {
    acroPdfFileFullPath = ASFileSysCreatePathName( NULL, ASAtomFromString
    ("Cstring"), buff, 0);
    PDDoc pdDoc = PDDocOpen(acroPdfFileFullPath, ASGetDefaultFileSys(),
    IfEncr , true);
    PDDocSave(pdDoc,PDSaveFull | PDSaveCollectGarbage , acroPdfFileFullPath,ASGetDefaultFileSys(),NULL,NUL L);

    }

    When i am using the same piece of code to secure a file iusing Acrobat 7.0 and 8.0 it is working fine but for 9.0 it is not working,

    Can u please tell how to proceed further?

    Regards
    Nethaji
    Nethaji@adobeforums.com Guest

  2. #2

    Default Re: PDDOCSAVE -throwing unhandled exception

    Unhandled exception - you mean an Acrobat exception? Be sure to use a
    DURING ... HANDLER wrapper, and report the error returned.

    Or do you mean an actual crash of Acrobat? If so, which was the actual
    last item called?

    Aandi Inston
    Aandi_Inston@adobeforums.com Guest

  3. #3

    Default Re: PDDOCSAVE -throwing unhandled exception

    Hi Aandi,

    DURING AND HANDLER is also handled in the code

    I believe the unhandled exception is acrobat exception

    Below is the exception what my application throws when executing this PDDOCSAVE(pdDoc,PDSaveFull | PDSaveCollectGarbage , acroPdfFileFullPath,ASGetDefaultFileSys(),NULL,NUL L)

    Unhandled exception at 0x03733371 in Acrobat.exe: 0xC0000005: Access violation reading location 0x00000214.

    Regards,
    Nethaji
    Nethaji@adobeforums.com Guest

  4. #4

    Default Re: PDDOCSAVE -throwing unhandled exception

    What if you put that complete snippet inside of DURING/HANDLER blocks? Exceptions should NOT be getting back those blocks.

    Also, have you verified that the values you are passing PDDocSave are all valid?
    Leonard_Rosenthol@adobeforums.com Guest

  5. #5

    Default Re: PDDOCSAVE -throwing unhandled exception

    Hi Leo & Aandi,

    Thanks for ur input,

    The values of the PDDocSave(pdDoc,PDSaveFull |
    PDSaveCollectGarbage ,acroPdfFileFullPath,
    ASGetDefaultFileSys(),NULL,NULL);
    are listed below plz help me further how to proceed with Acrobat 9.0

    pdDoc=It is an handler
    PDSaveFull = 1
    PDSaveCollectGarbage = 32
    acroPdfFileFullPath = path for the pdf file eg:c:\user1\aa.pdf
    ASGetDefaultFileSys()= i dont have idea reg this.

    and more over is there any other parameters need to be added/removed as far as Acrobat 9.0 considered?because

    The PDDOCSave is WORKING fine under the following scenarios
    1.Acrobat 7.0 exe with Acrobat 7.0 SDK
    2.Acrobat 8.0 exe with Acrobat 7.0 SDK and 8.0 SDK

    The PDDOCSave is NOT WORKING under the following scenarios
    1.Acrobat 9.0 exe with Acrobat 7.0 SDK
    and when i am compiling the using Acrobat 9.0 exe with Acrobat 9.0 SDK i am getting C2010 ERROR.

    Please guide me how to solve this issue of PDDOC save().

    Regards,
    Nethaji
    Nethaji@adobeforums.com Guest

  6. #6

    Default Re: PDDOCSAVE -throwing unhandled exception

    Are you checking that PDDocOpen returns Non-NULL?

    Aandi Inston
    Aandi_Inston@adobeforums.com Guest

  7. #7

    Default Re: PDDOCSAVE -throwing unhandled exception

    What if you rebuild with Acrobat 8 SDK. Does it work with Acrobat 9?
    Leonard_Rosenthol@adobeforums.com Guest

  8. #8

    Default Re: PDDOCSAVE -throwing unhandled exception

    Hi Aandi,

    PDDocOpen is a handler and has non-NULL junk values as in Acrobat 7.0 SDK.
    Nethaji@adobeforums.com Guest

  9. #9

    Default Re: PDDOCSAVE -throwing unhandled exception



    PDDocOpen is a handler and has non-NULL junk values as in Acrobat 7.0
    SDK.




    No, actually the return value from PDDocOpen (in Acrobat 8.x / 9.x) is the opened PDDoc or NULL if it could not open the doent.
    PDL@adobeforums.com Guest

  10. #10

    Default Re: PDDOCSAVE -throwing unhandled exception

    Then how do we check if its NULL? Or does this mean that its NULL in my scenario?
    Nethaji@adobeforums.com Guest

  11. #11

    Default Re: PDDOCSAVE -throwing unhandled exception



    Then how do we check if its NULL?




    PDDoc pdDoc;
    pdDoc = PDDocOpen(...);

    if ( pdDoc == NULL ) {...}
    PDL@adobeforums.com Guest

  12. #12

    Default Re: PDDOCSAVE -throwing unhandled exception

    I have checked it like this:

    PDDoc pdDoc = PDDocOpen(...);
    if(!pdDoc) {...}
    Nethaji@adobeforums.com Guest

  13. #13

    Default Re: PDDOCSAVE -throwing unhandled exception

    What are the parameters for PDDocSave() in Acrobat 9.0?
    Nethaji@adobeforums.com Guest

  14. #14

    Default Re: PDDOCSAVE -throwing unhandled exception



    What are the parameters for PDDocSave() in Acrobat 9.0?




    You will find this information in the doentation.
    Bernd Alheit Guest

Similar Threads

  1. Replies: 3
    Last Post: December 15th, 10:25 AM
  2. Replies: 0
    Last Post: January 9th, 09:15 AM
  3. An unhandled exception has occured Unknown Server tag
    By mna in forum ASP.NET Building Controls
    Replies: 0
    Last Post: July 21st, 07:17 PM
  4. Replies: 1
    Last Post: December 14th, 01:09 PM
  5. Unhandled Exception HELP!!
    By Kevin_JD webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 1
    Last Post: October 4th, 08:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139