pdfbingo – Generate Bingo Cards in PDF

Version: 3

Part of DaVince Tools
Web Site: www.davince.com

Last Modified: June 14, 2004

Image of bingo cards generated by pdfbingo

Command Syntax

Description

Additional Information

About DaVince Tools
 
 


Command Syntax:

(Please note that the square brackets "[" and "]" specify optional parameters; do not enter the brackets as part of the command)

pdfbingo [-i key:value [-i key:value]] [-o outputfile] [-p profile] [-?] [count]

Arguments:

-i: Specify Info dictionary attribute values like title and author of document. The following attributes are available for use:
 
 
Attribute
Description
Author The name of the person who created the document.
Keywords Key words associated with the document.
Subject The subject of the document.
Title The title of the document.

Note that the attribute names are case sensitive (first character in uppercase). This option can be specified multiple times when setting multiple dictionary attribute values. To specify an attribute along with its data, separate the two with a colon ":". You will need to enclose the string in quotes if there are spaces in the data. For example, to set the title of a document to "Jumbo Mazes", use the following parameter:

-i "Title:Bingo Games"

In addition to these tags, custom tags can be used with this option; however, Acrobat Reader will not recognize them. The "CreationDate" and "Creator" attributes are automatically filled in by the program and cannot be overridden with this option.

-o: Specify the name of the PDF file to create. The ".pdf" extension should be included in the filename. If this option is not specified, the filename "maze.pdf" in the current directory is assumed.

-p: Specify a profile to use in the creation of the PDF file. Profiles contain maze page layout information such as margin and line widths and reside in the "pdfmaze.ini" file located in the windows base directory (typically "C:\WINDOWS"). The default profile "default" is used when this option is not specified.

-?: A brief summary of arguments is displayed.

[count]: Specify the number of mazes to generate. When a count is not specified, then a count of one is assumed.

Description:

pdfbingo is a command line program that creates a PDF file of Bingo cards.  Features of this program include:
The program utilizes an initialization file named "pdfbingo.ini", which is located in either the same directory as the pdfbingo program or in the Windows’ root directory (typically "C:\WINDOWS" for Windows 9x/XP, "C:\WINNT" for Windows NT/2000). This file contains settings dealing with page layout and other options. The file is divided into profiles, which can be specified by name on the command line. A profile begins with the name of the profile surrounded by square brackets. An example file is shown below:

[2cardcolor]
paper=letter
cardsperpage=1
leftmargin=36
rightmargin=36
topmargin=36
bottommargin=36
cellsize=80
borderlinewidth=.5
linewidth=.3
compression=true
cardsperpage=2
sequential=true
cardcolor=blue,red

Multiple profiles can exist in the file. The "-p" command line option determines which profile the program will use.

The screen output can be redirected to a file adding the DOS syntax ">filename" to the end of the command line. This can used to redirect output to a log file. The program returns an error code of 1 when a fatal error occurs, used in batch programs to test the success of the program.

The default profile is used when no profile is specified. The common profile (labeled "_common" in the ini file) defines options common to all profiles.  In addition to the default  and common profiles, the following profiles are defined in the pdfbingo.ini file that ships with the program:
 
Profile Names Description
2page / 2pagecolor
2 cards per page / 2 cards per page in color (landscape mode)
4page /  4pagecolor
4 cards per page / 4 cards per page in color (portrait mode)
6page / 6pagecolor
6 cards per page / 6 cards per page in color (landscape mode)
8page / 8pagecolor
8 cards per page / 8 cards per page in color (landscape mode)
9page / 9pagecolor
9 cards per page / 9 cards per page in color (portrait mode)

 

Several option statements can appear after the profile line. These option statements have the following syntax:

option=value

Where option is the name of valid option (see below) and "value" is the value for the option. Depending on the option, "value" can be a number, a string or a Boolean value. The following values are all valid for a Boolean value:
 
 
Valid True Values Valid False Values
True, T, On, Enable, Yes, Y False, F, Off, Disable, No, N

These values are case insensitive (i.e. both "true" and "TRUE" are valid).

The following table describes options allowed in the pdfmaze.ini file (options are case insensitive):
 
Option Data Type Description
LeftMargin Number (in points) The left margin
RightMargin Number (in points) The right margin
TopMargin Number (in points) The top margin
BottomMargin Number (in points) The bottom margin
CardColor
Color name or HTML style color definition in the format #RRGGBB (#000000 = black, #FFFFFF = white, #0000FF = blue, etc.)
The color of the card. A single color specifies one color for all cards.  Multiple colors, separated by commas, specifies colors for individual cards on the page. Valid color names are available here.  Default value: white
TextColor
Color name or HTML style color definition in the format #RRGGBB (#000000 = black, #FFFFFF = white, #0000FF = blue, etc.) The text color on the card (this does not include the number text or free space text). Like the CardColor option, a single color specifies one text color for all cards.  Multiple colors, separated by commas, specifies colors for individual cards on the page. Valid color names are available here.  Default value: black
CardsPerPage Number. Valid values are 1,2,4,6,8,9
The number of cards per page. This number determines if the page will be in portrait or landscape mode
LineWidth
Number (in percentage of cell size, from 0.0 to 100.0) The line width of the cell ( the box surrounding each number).
BorderLineWidth Number (in percentage of cell size, from 0.0 to 100.0) The width of the lines drawn for the card border. This value is typically equal to or greater than the LineWidth option.
Paper letter | legal | executive | ledger | a0 | a1 | a2 | a3 | a4 | a5 | a6 | a7 | a8 | a9 | a10 The paper size
Sequential
Bool
If true, cards are generated in numerical order, guaranteeing no duplicate cards in run. If false, cards are generated in random order.
Compression Bool If true, use PDF compression. Default: no PDF compression.

 

All margin and arrow size parameters are specified in "points". A point is a unit of measurement equal to 1/72 of an inch. A 1/2 inch margin would be specified as 36 points

Beginning with Adobe Acrobat 4, you can copy the generated bingo cards to the Windows clipboard by click and holding the text selection button until the graphic selection button appears, then selecting it. This will allow a user to define a rectangle image and allow the user to copy that image to a desktop publishing application or any other application that supports the Windows clipboard.

Additional Information:

Any tool that creates a PDF must create an intermediate file prior to writing the PDF file. The filename of this intermediate file begins with "tmps" and appears in the directory pointed to by the environment variable "TMP". If this environment does not exist, then the temporary file is written in the current directory. The intermediate file exists only during the execution of the program.

About DaVince Tools:

Visit the DaVince Tools web site at http://www.davince.com for the latest version of this software and the latest documentation. DaVince Tools is shareware and software registration is urged if you find these programs useful. You can register the software on-line at http://www.davince.com.

DaVince Tools was written in C++ using the DaVince Class Library, written by the same author as this program. The DaVince Class Library is a C++ library for developing PDF and TIFF applications. Contact the author at info@davince.com for more information on the availability of the class library.