pdfmaze – Generate Maze Puzzles in PDF

Version: 2.2

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

Last Modified: July 22, 2003

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)

pdfmaze [-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:Jumbo Mazes"

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:

"pdfmaze" is a command line program that creates a PDF file of randomly generated maze puzzles. Features of this program include: The program utilizes an initialization file named "pdfmaze.ini", which must be located in the Windows’ root directory (typically "C:\WINDOWS" for Windows 9x, "C:\WINNT" for Windows NT). 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:

[largemaze]
topmargin=36
bottommargin=36
leftmargin=72
rightmargin=36
width=50
height=100
orientation=portrait

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

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.

In addition to the default profile, the following profiles are defined in the pdfmaze.ini file that ships with the program:
 
Profile Name Description
small Small maze, 10 columns by 15 rows, suitable for children Pre-K and up
medium Medium maze, 10 columns by 25 rows, suitable for children first grade and up
large Large maze, 80 columns by 100 rows, suitable for teenagers and adults
jumbo Jumbo maze, 100 columns by 150 rows, suitable for teenagers and adults

 

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
Width Number (in cells) The width of the maze, in maze cell units. Higher values create more complex mazes and take additional time to generate. The actual maze size is scaled to fit the page.
Height Number (in cells) The height of the maze, in maze cell units. Higher values create more complex mazes and take additional time to generate. The actual maze size is scaled to fit the page.
LineWidth Number (in percentage of cell size, from 0.0 to 1.0) The width of the lines drawn within the maze, excluding the border.
BorderLineWidth Number (in percentage of cell size, from 0.0 to 1.0) The width of the lines drawn for the maze border. This value is typically equal to or greater than the linewidth parameter.
Paper letter | legal | executive | ledger | a0 | a1 | a2 | a3 | a4 | a5 | a6 | a7 | a8 | a9 | a10 The paper size
Orientation Portrait | landscape Paper orientation
Compression Bool Use PDF Compression
Solution Bool When set to true, a separate page containing the solution to the maze is created immediately following the original page. All original pages will be on odd pages and solution pages will be on even pages. Adobe Acrobat 4 users can print all odd pages or all even pages to print just the mazes or the solutions, respectively.
Arrow Bool When set to true, an arrow is printed at the start and end of the maze.
ArrowSize Number (in points) This value is used when the Arrow option is enabled. This specifies the size of the arrow.

 

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 maze 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 maze 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.