Programatically activating accessibility options.

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

aaronmcgranaghan
User
Posts: 15
Joined: Wed Oct 31, 2012 9:58 am

Programatically activating accessibility options.

Post by aaronmcgranaghan »

Hi, I have another accessibility question:

Is there anyway I can programatically set the accessibility options in the accessibility menu? Such as "Use Windows Color Scheme"? Or "Use Predefined High-Contrast Color Scheme" ?

If this is not possible, is it possible to programatically set the colour of the page background and the colour of the text?

Thanks.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19876
Joined: Mon Jan 12, 2009 8:07 am

Re: Programatically activating accessibility options.

Post by Stefan - PDF-XChange »

Hi aaronmcgranaghan,

I am not aware of any way to achieve this, but have passed your question to one of the interface specialists and we will post back here as soon as we have any further info.

Best,
Stefan
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Programatically activating accessibility options.

Post by Vasyl - PDF-XChange »

Hi, Aaron.

You may use next way (undocumented):

Code: Select all

pdfViewer.SetProperty("PageDisplay.Colors.Overrides.Use", "true", 0); // to enable color overriding

// to enable the "Use Windows Color Sheme"
pdfViewer.SetProperty("PageDisplay.Colors.Overrides.Mode", "Windows", 0);

// OR to setup "Predefined High-Contrast..."
pdfViewer.SetProperty("PageDisplay.Colors.Overrides.Mode", "Predefined", 0);

pdfViewer.SetProperty("PageDisplay.Colors.Overrides.Predefined", "WhiteTextOnBlack", 0);
// possible values: "GreenTextOnBlack", "YellowTextOnBlack", "WhiteTextOnBlack", "BlackTextOnWhite"

// and trick to apply these changes in runtime:
pdfViewer.SetProperty("PageDisplay.BoxesAlpha", 0.5, 0);
pdfViewer.SetProperty("PageDisplay.BoxesAlpha", 1.0, 0); // restore normal value
HTH
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
aaronmcgranaghan
User
Posts: 15
Joined: Wed Oct 31, 2012 9:58 am

Re: Programatically activating accessibility options.

Post by aaronmcgranaghan »

Vasyl-Tracker Dev Team wrote:Hi, Aaron.

You may use next way (undocumented):

Code: Select all

pdfViewer.SetProperty("PageDisplay.Colors.Overrides.Use", "true", 0); // to enable color overriding

// to enable the "Use Windows Color Sheme"
pdfViewer.SetProperty("PageDisplay.Colors.Overrides.Mode", "Windows", 0);

// OR to setup "Predefined High-Contrast..."
pdfViewer.SetProperty("PageDisplay.Colors.Overrides.Mode", "Predefined", 0);

pdfViewer.SetProperty("PageDisplay.Colors.Overrides.Predefined", "WhiteTextOnBlack", 0);
// possible values: "GreenTextOnBlack", "YellowTextOnBlack", "WhiteTextOnBlack", "BlackTextOnWhite"

// and trick to apply these changes in runtime:
pdfViewer.SetProperty("PageDisplay.BoxesAlpha", 0.5, 0);
pdfViewer.SetProperty("PageDisplay.BoxesAlpha", 1.0, 0); // restore normal value
HTH
Thanks, that works perfect!
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19876
Joined: Mon Jan 12, 2009 8:07 am

Re: Programatically activating accessibility options.

Post by Stefan - PDF-XChange »

:)