Access to Advanced print setup in C++

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

  1. #1

    Default Access to Advanced print setup in C++

    Hi all,
    I'm developping an acrobat plugin (acrobat 8 pro) under C++, and I need to change some advanced print setup such as "Color Profile", "Simulate overprint" and forbid changing theses values.

    Thank's in advance
    Mohind@adobeforums.com Guest

  2. Similar Questions and Discussions

    1. Saving Print Settings in a Document via Print Advanced Menu
      I just discovered in the Help file you can do the above but it doesn't say how. I want to save the document so it can be printed on anyone's printer...
    2. Acrobat Pro 7.0.8 <FILE> <PRINT> <ADVANCED> = CRASH!!
      Dear Graffiti, I want to thank you for taking the time to respond to my question. Your suggestions clearly cured a very frustrating and time...
    3. Acrobat 6.0.2 won't save Advanced Print setups and Negative Doesn't work
      I am having lots of problems getting Acrobat 6.0.x to work. Mac OS 10.3.t. I tried all versions and updated to the current version. When I go to...
    4. Sco openserver print server setup
      Anyone have any idea on setting up an axis printer server connected to an Hp Laserjet printer. Which command do i use to set the ip addres...queue...
    5. setup a print que
      Very new to AIX and smit I need to setup a print que (dummy printer) that captures the job to a file. Is there a cookbook out there that tells...
  3. #2

    Default Re: Access to Advanced print setup in C++

    Read the AVDocPrintPagesWithParams section of the API reference. The AVPrintParams structure will allow you to control your documents destination color profile.
    PDL@adobeforums.com Guest

  4. #3

    Default Re: Access to Advanced print setup in C++

    Thank's for your answer PDL, But I'm looking for a method like AVAppSetPreference for example...
    I want let people change what they want in the advanced print setup except the color profile and "simulate overprinting".
    I' was looking for an event that occur when changing theses settings (like AVAppOldPrefDidChange >> preference) but can't find any hint nor idea
    Mohind@adobeforums.com Guest

  5. #4

    Default Re: Access to Advanced print setup in C++

    Unless I am mistaken ( and I am sure I will be corrected if I am ), Acrobat doesn't store the print setting as Preferences, as it just uses the OS print dialog and uses its defaults.

    Therefore the suggestion from PDL would be a work around, either that or use OS calls to change the printer settings.
    malkyt@adobeforums.com Guest

  6. #5

    Default Re: Access to Advanced print setup in C++

    Oh ok, So I prefer handling with the OS calls to change the printer settings.
    Thank's malkyt
    Mohind@adobeforums.com Guest

  7. #6

    Default Re: Access to Advanced print setup in C++

    Mohind,

    In that case, you will need to replace the current print dialogs with your own that only show the user what you want them to see, and use the AVPrintParams structure to manually control the settings you do not offer the user.

    There are also new APIs in Acrobat 9 that allow you more granular control of Windows DEVMODE printer settings.

    In either case, this is a fairly robust undertaking and is something you would want to thoroughly research before starting any development.
    PDL@adobeforums.com Guest

  8. #7

    Default Re: Access to Advanced print setup in C++

    that's right PDL, I'll see first what the new APIs in Acrobat 9 offers, then, see if I can replace the OS Printer default settings before showing the current print dialog(change settings in AVDocWillPrint event).
    anyway, Thank's a lot PDL and malkyt, and I let you know if i success in my task... (even if you found any previous experience in that :) )
    Mohind@adobeforums.com Guest

  9. #8

    Default Re: Access to Advanced print setup in C++

    Hi folk's,
    Seem's the OS print dialog stuff is not the good idea... can't set what i want there... :(
    however I have to handle with AVDocPrintPagesWithParams.
    I picked up this code from adobe Developer Knowledgebase and i placed it into the AVDocWillPrint event..

    AVDoc avDoc = AVAppGetActiveDoc();
    AVDocPrintParamsRec myParams;

    memset(&myParams, 0, sizeof(AVDocPrintParamsRec));
    myParams.size =sizeof(AVDocPrintParamsRec);
    myParams.emitToFile = true;
    myParams.firstPage = -1L;
    myParams.lastPage = -1L;
    myParams.psLevel = 2L; // specify for PS printer
    myParams.binaryOK = false; //binary channel to printer is not supported
    myParams.filePathName = ASPathFromPlatformPath ("C:\\out.ps");
    myParams.emitFileOption = kAVEmitFilePS;
    myParams.fileSysName = ASGetDefaultFileSys()->getFileSysName();
    strcpy(myParams.destProfile ,"Same as Source");
    myParams.printerSpec = NULL;

    AVDocPrintPagesWithParams(avDoc, &myParams);
    system("copy c:\\out.ps \\\\pcprint\\BOISE-GESSO-HPCOLOR5M-W6123-Q");

    the problem is that i get acrobat crach (like infinit loop or something like that)...

    Any idea ?
    Mohind@adobeforums.com Guest

  10. #9

    Default Re: Access to Advanced print setup in C++

    Don't use AVDocPrintPagesWithParams in a AVDocWillPrint event or you get a infinit loop.
    Bernd Alheit Guest

  11. #10

    Default Re: Access to Advanced print setup in C++

    Ok, Thank's Bernd, beacuse it's fire AVDocWillPrint i thing.
    I just set the code outside, but I was wondering what hapen's with AVDocPrintPagesWithParams ? because the file wasn't printed.

    is AVDocPrintPagesWithParams just set the new AVDocPrintParamsRec, waiting for print event fire ?
    Mohind@adobeforums.com Guest

  12. #11

    Default Re: Access to Advanced print setup in C++

    Can you explain why you want to do this? I am interested what sorts of pritning you are doing where these fatures should be disable...
    Leonard_Rosenthol@adobeforums.com Guest

  13. #12

    Default Re: Access to Advanced print setup in C++

    Hi Leonard,
    I'm coding a plugin in c++ which enable some settings and disable others... and among theses settings, the fact to allow users to edit advanced print seting except the color profile which must be "same as source" and the option "simulate the overprinting" enabled.

    malkyt said that the opening print window is an OS Window, but that's seem's wierd, because, when Click on print>>Advanced an acrobat custom window open's with acrobat spcific options.. i tried to open a same with C++ & MFC, but it's not the same(missing many options)...

    So, I try either to access to the advanced print setting options or set a new print menu!!!

    Than'k every body in advance
    Mohind@adobeforums.com Guest

  14. #13

    Default Re: Access to Advanced print setup in C++

    But WHY are you trying to enable & disable some settings? What sort of environment or solution are you building that requires this?

    The Print dialog is an EXTENDED print dialog from the OS - as you note, it has extra features. The Advanced panel is controlled by Adobe and we don't have any APIs to access it.

    What Malky suggested, and I second, is to put up your own Print dialog box with whatever controls you want (and don't want) and then call our APIs to print...
    Leonard_Rosenthol@adobeforums.com Guest

  15. #14

    Default Re: Access to Advanced print setup in C++

    Yeah, it seem's the best idea (unless if it'd the only one).
    thank's again guys
    Mohind@adobeforums.com Guest

  16. #15

    Default Re: Access to Advanced print setup in C++

    There is any stuff that allow us create cutom Window (labels, textbox,..) within the SDK ?
    If not, can i comunicate between acrobat and external window (Win32, or something like)?
    Mohind@adobeforums.com Guest

  17. #16

    Default Re: Access to Advanced print setup in C++

    [url]www.digitaleditor.com[/url] has some tips on creating this config.
    Dirk_Mieth@adobeforums.com Guest

  18. #17

    Default Re: Access to Advanced print setup in C++



    There is any stuff that allow us create cutom Window (labels, textbox,..)
    within the SDK ?




    You can just use standard Windows Forms dialogs in your plug-in project.
    PDL@adobeforums.com Guest

  19. #18

    Default Re: Access to Advanced print setup in C++

    Well I already tried that, visual studio show then a message box to convert the projet in order to be compatible with CLR, but some error's windows appear ("Object missing") °°??
    Mohind@adobeforums.com Guest

  20. #19

    Default Re: Access to Advanced print setup in C++

    You need to continue to use standard C/C++ - you can't use CLR stuff...
    Leonard_Rosenthol@adobeforums.com Guest

  21. #20

    Default Re: Access to Advanced print setup in C++

    thank's Leonard, it was VS stuff when creating the new form, I'll try with the standard as you said !
    if you have some piece of code like a sample i will really be grateful
    Mohind@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