SDK - Software Development Kit
Software developers creating assistive technologies can now easily give their users the ability to print in braille: simply follow a few straightforward instructions.
Some of the benefits of integrating Biblos braille printing
- Provide your users with a professional and reliable braille printing system with minimal effort
- Biblos is accessible software already used by blind and sighted people, professionals, associations, schools, and braille printing services
- Biblos is continuously updated, supports Windows XP, Vista, 7, 8, and 10, and is available in both 32-bit and 64-bit versions
- Biblos is a complete word processor that can help reduce costs by eliminating the need to purchase licenses for other software. For example, there is no need to purchase Office licenses
Biblos is always installed in the system "Program Files" folder: ..\DIGRANDE\BIBLOS5
The "Program Files" folder should always be determined using the system's own functions, never by using hard-coded paths. Biblos can therefore be launched by running the "Biblos.exe" executable file.
If the path and executable file do not exist, this means that Biblos is not installed on the system. Checking for the presence of the "Biblos.exe" file is useful for determining whether Biblos is installed. An example of code for retrieving the Biblos installation path, if present, is provided at the end of this document.
Biblos can also be launched using only its name from the system shell. For example, you can open the Windows "Run" dialog and enter the command "Biblos". This will launch Biblos. The name "Biblos" can also be used with the "ShellExecute" API function.
To automate opening and braille printing of documents, "Biblos.exe" accepts the following parameters:
Biblos.exe -p "%1" "%2"
- -p is the parameter that launches Biblos for braille printing
- "%1" is the parameter specifying the name of the file to open and print in braille. It is recommended to enclose the parameter in quotation marks so that Windows can identify the complete file name, including spaces
- "%2" is the optional parameter specifying the name of the Braille Table to select for braille printing. It is recommended to enclose this value in quotation marks, just like the file name. Biblos identifies the table to select in two ways: first, it searches by the table name; if no matching name is found, it searches by the table file name. In the latter case, the name must include the ".bbt" extension. If the %2 variable is not specified, Biblos selects the table saved in its options
How to Integrate Braille Printing into Your Software
- In your software's File menu, add the following menu command: Print in Braille with Biblos... Alternatively, you can place the command elsewhere in the menu, in a context menu, on a button, etc.
- When initializing the user interface, check whether Biblos is installed on the system by checking for the "Biblos.exe" executable file, as described above. If the file exists, enable the print command; if it does not exist, disable it
When the User Clicks the Braille Print Command
- Save the document to be printed to a temporary path and file
- It is recommended to save the document in a format supported by Biblos. RTF is a good compromise. In Biblos, you can also define a custom user format by associating a specific file extension with a predefined format
- Launch Biblos as explained above. The system focus then moves to Biblos, which displays the braille printing window. After the braille printing is completed or canceled, Biblos closes and the focus returns to your software
- To check whether Biblos is open and prevent other commands in your software from being used, you can check for the presence of Biblos windows or its system process. The window class name that is always present while Biblos is running is: "TBiblosHidden". You can use the system API FindWindow to check whether the window is present. An example of code that checks whether Biblos is running is provided below
A Delphi Function That Returns the Path to Biblos 5, If Installed
uses
Winapi.Windows, Winapi.Shlobj, System.Sysutils;
Function getBiblosPath: string;
{}Function getBP(cs: integer): string;
const
BiblosExe5 = 'digrande\biblos5\biblos.exe';
var
idl: pItemIdlist;
p: pChar;
begin
Result:= '';
Getmem(p,max_path);
Fillmemory(p,max_path,0);
if succeeded(shgetspecialfolderlocation(0, cs, idl)) then
if shgetpathfromidlist(idl,p) then
begin
Result:= IncludeTrailingPathDelimiter(string(p))+ BiblosExe5;
If fileExists(Result) = false then result:= '';
End;
Freemem(p,max_path);
End;
Begin
Result:= getBP(csidl_program_files);;
If Result = '' then
Result:= getBP(csidl_program_filesx86);;
End;
A Delphi Function That Returns True if Biblos Is Running
Uses
WinApi.Windows;
Function IsBiblosRun: boolean;
begin
result:= not(FindWindow('TBiblosHidden',nil)=0);
end;