Skip navigation
Currently Being Moderated

Using Excel VBA to Programmatically change Adobe Print Properties

Apr 22, 2009 9:36 AM

Specifically I want to be able to uncheck the Adobe PDF Setting "Rely on system fonts only; do not use document fonts".  Is there any way to do this using Excel VBA?
I've seen many posts on the internet asking the same question but no solutions.

 

Any help would be appreciated.

Thank you!

 
Replies
  • Currently Being Moderated
    Apr 22, 2009 10:04 AM   in reply to brett_hinman

    That is a Distiller option, not Acrobat.  See the Distiller API Reference included with the Acrobat SDK documentation.  You can turn that option off, save it to a new .joboptions file and then tell Distiller to use that .joboptions file when printing through the Distiller APIs.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 22, 2009 12:42 PM   in reply to brett_hinman

    Where do you find this setting??    I don't see it in the Adobe PDF Printer - where do you?

     

    Please be specific about which version of Adobe Acrobat and a screen shot would be great!

     

    Also, what do you think this setting does and why do you wish to disable it?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 22, 2009 1:23 PM   in reply to brett_hinman

    Leonard, to see that setting bring up the print dialog in any application, choose the AdobePDF Printer, click "Properties" and it is on the "Adobe PDF Settings" tab of the printer properties dialog.  As I mentioned earlier in the thread, it's a Distiller setting not Acrobat.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 22, 2009 11:46 PM   in reply to brett_hinman

    Sorry - we apparently changed the name of that option in Acrobat 9's Adobe PDF Printer.

     

    My question was why you WANT that option turned off...Having that setting enabled (checked) as it comes by default is the correct behavior for producing the highest quality PDF documents.

     

    NOTE: Distiller has a similar option, but it's different...

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 23, 2009 7:55 AM   in reply to lrosenth

    Leonard...

    Per your reply to this posting - at my company (a larger aerospace corp), the default Distiller setting of "do not send fonts to the printer" causes constant grief.  without fail, it throws an error when we're programatically creating PostScript files, with Adobe PDF set as the default printer.  I assume this is because we have fonts in the documents that aren't standard system fonts - therefore, we need to include the fonts with the print job.  We try to educate users to uncheck this option, but with the hundreds of users involved (globally), and with SW upgrades, restaging of computers, etc., its an uphill battle.  It would be GREAT if Adobe could provide a command line switch to turn this option off.  Or (better, since many users have older versions of the Distiller), provide an automation method of programatically modifying the user's Distiller preference file, to turn the option off from code.

     

    Any help with this would be greatly appreciated.  And from the large no. of posts around the internet, many other users are having the same issue, and would appreciate it also.

     

    Thanks!

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 23, 2009 12:25 PM   in reply to KenMcD4

    Luckily Adobe already does provide a solution for your issue, specifically designed for administrators of large infrastructures.

     

    It's called Adobe Customization Wizard and allows you to customize your deployment of Acrobat.  The setting you are looking for is located in the Registry, so navigate to the Registry section in CustWiz and have it deploy the following setting:

     

    HKLM\SYSTEM\CurrentControlSet\Control\Print\Printers\Adobe PDF\PrinterDriverData\DistillerHostFontHasMostFonts: 0x00000000

     

    CustWiz will then generate an MST file you can use to deploy with the Acrobat MSI so that your settings are preserved through deployment and this option is then off by default on your systems.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 23, 2009 6:51 PM   in reply to KenMcD4

    I don't know why you are having problems with that setting but it EXTREMELY

    IMPORTANT that that setting be TURNED ON in order to produce documents with

    the correct fonts.

     

    If I understand you correctly, your application is using fonts that aren't

    actually installed in the system?  Is that correct?  If so, how are you

    telling Windows (I am assuming Windows here) to use them when drawing use

    native API calls? 

     

    As long as the font is installed in Windows - then it will work correctly

    with this option set.

     

    If you are having problems - then please contact our support staff and

    provide them details on version of Distiller, fonts, etc.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 24, 2009 3:24 PM   in reply to lrosenth

    Leonard...

     

    Thanks for your reply.  Here's a summary of our issue with this option.  Note that our problem is with creating PostScript files from Adobe PDF, not with creating PDF files directly.

     

    We have an Excel VBA utility which opens various MS Office files, selects a sheet or slide, creates a PostScript snapshot (using the VBA print to file command), then closes the file.  Ultimately, the PS files are distilled into a single PDF file.

     

    Prior to starting, the utility selects Adobe PDF as the default Windows printer.  If the PC running the utility has the "use only system fonts" option (or, in older Acrobat versions, "Do not send fonts to Adobe PDF") ENABLED, the following error message appears:

     

    <<Picture (Device Independent Bitmap)>>

     

    This error also occurs when another Acrobat user (with the above option ENABLED) has previously opened the file and saved it - for some reason, that user's Adobe PDF preferences is saved with the target file, instead of the preferences on the PC which is running the utility (I suspect this is a Windows issue).

     

    We have absolutely no font issues in the resulting PDF files, with this option disabled.  Our PDF files are used exclusively for electronic viewing, or the occasional hardcopy printout on a local printer.  (We don't do published-quality printing.)

     

    I tried manually creating a PS file with Adobe PDF (and clicking the Print to File option).  With the above option ENABLED, I got the same error as above, so it's not related to VBA.

     

    To avoid the above error messages (which halts the VBA utility), I want to be able to call the Distiller (when creating the PS files) with a definite instruction to NOT have the above option enabled.  What I'm considering is having the VBA utility create a Distiller options file from scratch (from code), save the file in the utility's folder, and instruct the Distiller to use that options file when called (via a command line argument).

     

    However, the only options files I've located are in the user's Distllr\Settings folder, with a name such as "Standard.joboptions."  I don't find an entry in this file (using a text editor) corresponding to the above fonts option.  Can you tell me which line is used, or else is there another options file where the font option is stored?  Or is it in the Windows Registry?

     

    Thanks for your help...

     

    Ken McDaniel

    FMS Sr. Engineering Support Specialist

    Honeywell Aerospace

    21111 N. 19th Ave. (MS Q34A3)

    Phoenix, AZ 85027

    Phone - (602) 436-2558

    Cell (602) 618-7392

    Fax - (602) 436-9296

    Ken.McDaniel@Honeywell.com

    >

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 24, 2009 3:46 PM   in reply to KenMcD4

    If the end result is PDF anyway, why are you screwing around with Postscript

    and Distiller?  Just print directly through the Adobe PDF printer.   Why are

    you adding all this complexity!??

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 25, 2009 12:39 PM   in reply to lrosenth

    We create dozens or hundreds of PS files from many servers (with a button click), then use the distiller to assemble them into a single PDF document. You can't do that any other way.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 25, 2009 1:13 PM   in reply to KenMcD4

    Of course you can!  You can assemble PDFs together - either manually or

    programatically.

     

    However, you need to be aware that Distiller is NOT LICENSED for this type

    of automated server usage and using it this was is a violation of the EULA

    for the product.   We instead have a separate "Distiller Server" product to

    address this need.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 28, 2009 7:03 AM   in reply to lrosenth

    Leonard...

     

    We don't use distiller for "automated server usage."  All of our users have licensed copies of Acrobat - we have many hundreds of licenses.  Each user who creates PDF files, by whatever method, has a licensed copy of Acrobat.  We aren't trying to use a single copy of Acrobat to service multiple users.  When a licensed user assembles his/her documents from multiple locations into a single PDF document, whether manually or programatically, this is one of the functions that Acrobat was designed for.  We're simply using techniques described in the Acrobat SDK.

     

    I'll look into your suggestion for assembling multiple PDFs programatically - Distiller Server might provide a way to do that, without the printer font issues.  Thanks for your help.

     

    Ken McDaniel

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 9, 2010 11:23 AM   in reply to brett_hinman

    Hi,

     

    It was very hard to find, but look at this document:

    http://support.adobe.com/devsup/devsup.nsf/docs/53549.htm

     

    So in order to change the "Rely on system fonts only; do not use documents fonts" I had to change this key:

     

    HKEY_CURRENT_USER\Printers\DevModePerUser\Adobe PDF

     

    Now, it is a binary key and it should be different for each version of Acrobat.

     

    In Acrobat 9.0 Professional I had to change only one byte in the binary data, and it was located at the index 0x0472.

    0 Value = Off / Disabled

    1 Value = On / Enabled

     

    Hope that helps.

     

    Cheers,

    Doron Ori Tal

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 11, 2010 3:57 AM   in reply to Doron Ori Tal

    A small mistake: the index number is: 0x046C (1132)

     

    Cheers,

    Doron Ori Tal

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points