How to select some settings programmatically at startup?

Ask a Question related to Adobe Acrobat SDK, Design and Development.

  1. #1

    Default How to select some settings programmatically at startup?

    I developed a plugin which performs some stuff upon a PDF being opened. I would like to add at least one action: "clicking" the option called "Click to show one page at a time" every time certain class of PDF files is opened. How is this performed programmatically?

    The question is actually more general. Where are the settable settings documented?

    TIA,

    -RFH
    RamonHerrera@adobeforums.com Guest

  2. Similar Questions and Discussions

    1. programmatically apply security settings.
      Hello I want to build a add in for adding custom security settings for pdf files. I have few questions about how this can be achieved. 1 How...
    2. Settings wont stay changed in Settings manager
      I keep trying to change the settings for my flash player but they never stay changed. It just keeps going back to the default settings. What do i...
    3. #25474 [Fbk->Opn]: posting arrays from a select box with multiple select is not working properly
      ID: 25474 User updated by: fmuller at cisco dot com Reported By: fmuller at cisco dot com -Status: Feedback...
    4. Select datagrid item programmatically in ASP.NET
      Hi all, I have a question on ASP.NET Datagrid. Here goes nothing :- I have a datagrid with a SELECTCOMMAND on the first column. Whenever i...
    5. SELECT DISTINCT + ORDER BY gives ERROR 145: ORDER BY items mustappear in the select list if SELECT DISTINCT is specified.
      Dan, You should be able to do this: SELECT Id, FaxID, ReceivedTime, Pages FROM ( SELECT DISTINCT .Id AS Id,
  3. #2

    Default Re: How to select some settings programmatically at startup?

    If you mean preferences, see AVAppGet/SetPref
    Leonard_Rosenthol@adobeforums.com Guest

  4. #3

    Default Re: How to select some settings programmatically at startup?

    This is how it is done in JavaScript:

    this.layout = "SinglePage"

    but I need to place the preference setting in a C++ plugin.

    Following Leonard's tip, this is what I found:

    void AVAppSetPreference (
    AVPrefsType preference,
    void* newValue
    );

    This is the statement that I have guessed so far:

    AVAppSetPreference(xxyyzz, PDLayoutSinglePage);

    where xxyyzz is still to be determined.

    I tried this:

    AVAppSetPreference(PDLayoutMode, PDLayoutSinglePage);

    but the compiler didn't like it.

    -Ramon
    RamonHerrera@adobeforums.com Guest

  5. #4

    Default Re: How to select some settings programmatically at startup?

    This statement compiles:

    AVAppSetPreference(PDLayoutSinglePage, 0);

    -RFH
    RamonHerrera@adobeforums.com Guest

  6. #5

    Default Re: How to select some settings programmatically at startup?

    My only consolation if that you folks Google:

    "worst documentation ever"

    The first hit will be:

    (AVPrefsType) Adobe Acrobat SDK.

    So, I guess I am not the only dumb one.

    -Ramon
    RamonHerrera@adobeforums.com Guest

  7. #6

    Default Re: How to select some settings programmatically at startup?

    Be aware that if the PDF has the necessary langauge features in it - it will (as required by the PDFRef/ISO 32K) override your preference.
    Leonard_Rosenthol@adobeforums.com Guest

  8. #7

    Default Re: How to select some settings programmatically at startup?

    Thanks for your kind assistance, Leonard.

    This is the situation: all the PDF files that will be processed by the system I am developing will be generated by a server program that I am writing.

    Therefore, all the PDF files will contain the necessary statement to be shown in "SinglePage" view. I will make sure to insert the view mode in every created file.

    HOWEVER, the sample files that I am dealing with right now do not have such instruction in the PDF "code".

    That's why I am looking for a way to program Acrobat itself, and I seem to be pretty darn close. All I am missing is the 2nd. parameter in this statement:

    AVAppSetPreference(PDLayoutSinglePage, <what the heck goes here>);

    Thanks,

    -Ramon
    RamonHerrera@adobeforums.com Guest

  9. #8

    Default Re: How to select some settings programmatically at startup?

    0?
    Leonard_Rosenthol@adobeforums.com Guest

Posting Permissions

  • You may not post new threads
  • You may 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