-pdfsize

Top  Previous  Next

-pdfsize PageSize [width height]

 

The -pdfsize option sets the size of the PDF page for the pages that are acquired.  The -pdfsize option overrides the -P option.

 

The values for PageSize can be one of the sizes specified by the -P option, or one of the following:

 

PageSize

Definition

custom

Custom page size.  Width and height are specified by the width and height arguments, and specified in points.

variable

The PDF page is sized to the actual size of the image.

 

For the custom page size, the width and height are specified in points.  A point is a unit of measure equal to 1/72 of an inch.  For example:

 

DTWAIN_TwainSave("-F pdf -pdfsize \"custom 612 792\" -f test.pdf");

 

This sets the size of the PDF page to 612 x 792 points.  Since there are 72 points per inch, this is equivalent to 8.5" x 11".

 

DTWAIN_TwainSave("-F pdf -pdfsize A4 -f test.pdf");

This sets the PDF page size to A4.  The A4 value is one of the page sizes that are listed for the -P option.  Unlike the -P option, your TWAIN driver does not need to support the page size specified when -pdfsize is specified.

 

For the variable page size, the PDF page is sized to the actual size of the image.  The size of the page is determined by the pixel width and height of the image.  A one-to-one mapping of the points to pixels is done.  For example, if no scaling is done, an image of 800 x 600 pixels is fitted to a PDF page of 800 x 600 points.  This allows the acquired image to fit perfectly without distortion, since the page is fitted to the image instead of the image being fitted to the page.

 

The width and height arguments are only recognized for the custom option.

 

If both -pdfsize and -P are specified on the command line, the -pdfsize option will be used.

 

Note that in the example above, C/C++ escape sequences are used to embed double quotes in the string.  Please consult your language as to the proper way to insert double quotes within quoted strings.

 

Default Setting:

If -pdfsize is not specified and the -P is specified, then the setting used for the -P option is used.  If neither -pdfsize nor if -P is specfiied, the default page size is letter.