• No results found

MakePDF Formatter for Windows User s Guide

N/A
N/A
Protected

Academic year: 2021

Share "MakePDF Formatter for Windows User s Guide"

Copied!
42
0
0

Loading.... (view fulltext now)

Full text

(1)

Make

A

F

P

MakePDF Formatter for Windows

User’s Guide

(2)

This edition applies to the MakePDF Formatter.

MakeAFP welcomes your comments and suggestions. You can send your comments and suggestions to: [email protected]

When you send information to MakeAFP, you grant MakeAFP a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you.

(3)

Contents

Chapter 1. Getting Started ... 1

Quick Overview ... 1

Understanding a Statement ... 1

Starting a MakePDF Formatting Session ... 3

Opening and Closing a PDF Document... 3

Setting Default Units ... 4

Opening and Closing a Page ... 4

Presentation Positioning... 5

Putting Color Text on the Page ... 6

Formatting Paragraphs ... 7

Drawing Color Lines ... 7

Drawing Color Boxes... 8

Including Image and PDF Overlay Objects ... 9

Plotting Barcharts and Piecharts ...11

Working with Barcodes ...13

Showing PDF Text Information...14

Reengineering Existing PDF Document ...15

Working with Pagination ...17

Exporting PDF Template from Windows Applications ...18

Getting Help for WYSIWYG Data Positioning...19

Getting Data Field Position on OpenOffice Draw...20

Working with MakePDF Definition File ...22

Installing MakePDF Formatter and Learning from Samples...22

Prerequisites...22

Installing MakePDF Formatter...22

Learning from MakePDF Formatter Samples...22

Compiling and Running Under Visual C++ V.60...23

Adding MakePDF Include Files’ Directory...23

Creating Your New Project ...23

Running MakePDF formatting program in the Debugging Mode ...24

Compiling and Running Under Visual C++ 2005 Express Edition...24

(4)

ii

Using Visual C++ 2005 Express without the Platform SDK...25

Using Visual C++ 2005 Express with the Platform SDK ...25

Creating Your New Project ...26

Running MakePDF formatting program in Debugging Mode ...26

Languages Bindings for Visual Basic.NET ...27

Languages Bindings for Visual C#...27

Languages Bindings for Java ...27

Chapter 2. Running Your MakePDF Formatter Program ... 29

Running MakePDF Formatter in Batch Mode ...29

Reading the Compressed or Encrypted Input Data...30

Appendix A. Understanding Data Format and Transferring ... 31

Legacy Line Data Formats ...31

Fixed-length Line Data Format ...31

Variable-length Line Data Format...31

Delimited Record Data Format ...32

Carriage Control Codes ...32

ANSI Carriage Control Characters ...32

Machine Carriage Control Codes ...33

Keyed Record Format Data ...33

XML Data ...34

Unicode...35

Common Methods of File Transferring...35

Physical Media ...35

SNA File Transferring...35

FTP or NFS File Sharing...36

LPR/LPD File Transferring ...36

SMB Connections via NETBIOS over TCP/IP...37

PSF Download for z/OS...37

(5)

- 1 -

Chapter 1. Getting Started

This chapter gives a quick overview of MakePDF Formatter, contains some basic tutorial information on how to get started with MakePDF Formatter quickly.

Quick Overview

MakePDF Formatter is a powerful, yet simple-to-use Dynamic-Link Library and flexible PDF formatter for generating PDF files directly in extreme high speed. A simple C/C++

language program can be linked with the library to produce a native executable module that is able to generate PDF files directly without the help of any other application.

MakePDF Formatter is designed for complex, dynamic PDF presentation with an extremely fast formatting performance to your mission-critical PDF core business applications, providing an integrated PDF formatting and processing environment that is stable, highly scalable, and functionality rich.

MakePDF Formatter frees you from the internals and intricacies of PDF, offering many useful functions for composing texts, graphics, images, barcodes, templates/overlays in PDF, giving you absolute control over the PDF functions.

Using C language as your core programming language on MakePDF Formatter is strongly recommended. C is the most important and popular programming language, it is a very efficient and fully compile able language that works at a level that is fairly close to native machine code, yet it is a simple, portable, powerful, flexible and programmer oriented language. C perfectly fits the procedure processing tasks with data formatting.

Applications that use MakePDF Formatter functions must obey hierarchy and structural rules of the MakePDF Formatter language when building PDF compound documents which are very easy to understand. Writing applications according to these rules is quite straightforward. This chapter describes the step by step processes on how to use MakePDF Formatter with C to generate the PDF document.

Comprehensive samples are shipped along with the MakePDF Formatter installation package, to provide you with realistic practice scenarios. MakePDF understands that the sample code is one of the most important aspect of a toolkit for quick understanding and learning, and as such, we try our best to include more samples within our installation package.

Understanding a Statement

The following figure shows a simple example of a bank statement, which contains the client’s address, banking transaction records during the statement period for the accounts owned by the client, boxes, lines, logo and page number.

(6)

- 2 -

Bank logo, included as an image object.

Client’s address printed in a rounded box address window Gray color box contains title texts

Detail transaction information sorted by date, text aligned by left or right Running numbers used for printing operation and reprint

Bank address and statement period Pagination on each page

A line drawn to divide detail transactions of a client’s different accounts Boldface to highlight client’s final balance

Inverse color text message for important information

1

6

2

7

3

8

4

9

10

5

1 2 3 4 5 6 7 8 9 10
(7)

- 3 -

Starting a MakePDF Formatting Session

“Start” function starts and establishes initiation of a MakePDF Formatting session, opens the default output PDF document file and an optional MakePDF definition file, parses the parameters defined in command-line flag-parameters and MakePDF definition file if any.

Sample:

void main() {

Start(); // Start initiation

:

fdin = OpenDataFile(); // Open default input data file specifying // by command-line flag parameter -i input_file

:

}

Opening and Closing a PDF Document

You must call the “Open Document” function to initialize a PDF document before you begin a PDF page, and you must close this PDF document by the “Close Document” function before ending your program.

Sample 1: Single PDF document whose filename is specified by command-line void main()

{

Start(); // Start initiation

OpenDoc(); // Open a PDF document, uses the PDF filename // specified by command-line flag parameter -o

:

CloseDoc() // Close a PDF document and close PDF file }

Sample 2: Single PDF document whose filename is specified by OpenDoc( ) function void main()

{

Start(); // Start initiation, open default input, // output and definition files

OpenDoc(“test.pdf”); // Open a PDF document with a file name

:

CloseDoc() // Close a PDF document and close file }

(8)

- 4 -

Setting Default Units

You can set the default measurement unit by the “Set Unit” function before calling “Open Document” function or anytime if you want to change the default measurement unit. MakePDF Formatter default is POINT if the “Set Unit” function is not called.

Sample:

void main() {

Start();

SetUnit(INCH); // Set default units to inch OpenDoc();

OpenPage(8.5, 11); // LETTER paper size, 8.5" x 11"

: ClosePage(); CloseDoc(); }

Opening and Closing a Page

You must open and close every page within a PDF document. MakePDF Formatter does not automatically close pages, page closes has to be done by your own application control.

Sample: void main() { Start(); SetUnit(INCH); OpenDoc();

OpenPage(DIN_A4); // Open an A4 size PDF page

:

ClosePage(); // Close PDF page

OpenPage(DIN_A4); // Open an A4 size PDF page

:

:

ClosePage(); // Close PDF page

CloseDoc();

}

(9)

- 5 -

Presentation Positioning

MakePDF Formatter provides a set of powerful positioning functions and variables to help you position your data and plot graphics easily. After you called the “Open Page” function, you can use them to position your data and graphic quickly. The following table shows the functions and variables.

MakePDF Formatter

functions Description

Margin (float value) Sets inline left margin LineSp (float value) Sets baseline spacing

LPI (float value) Sets baseline spacing by LPI (lines per inch)

NextLine ( ) or Next( ) Skips to the next begin line position defined by Margin( ) and LineSp( ) or LPI( )

Skip (float value) Skips lines then starts from margin Xpos (float value) Sets absolute horizontal position Ypos (float value) Sets absolute vertical position

Pos (float x, float y) Sets absolute horizontal and vertical position

Xmove (float value) Sets horizontal position relative to the current horizontal position, you can specify a negative value

Ymove (float value) Sets vertical position relative to the current vertical position, you can specify a negative value

GPos (float x, float y) Sets absolute horizontal and vertical position of a vector graphic drawing

cm (float value) Specifies a value in centimeters mm (float value) Specifies a value in millimeters inch (float value) Specifies a value in inches pt (float value) Specifies a value in points GetXpos() Gets current X position of text GetYpos() Gets current Y position of text

Sample 1:

OpenPage(8.5,11); // Open a PDF page // LETTER paper size, 8.5" x 11"

Font(“Arial”, 10); // Define a font

Pos(1,1); // Position at (1",1") Ltxt("Testing sample 1"); // Left put text at (1", 1") Ymove(0.5); // Move Y baseline down 0.5" Ltxt("Testing sample 2"); // Left put text at (1", 1.5") Xpos( mm(15) ); // Set X position at 15 mm

YPos( cm(2.5) ); // Set Y position at 2.5 cm

Ltxt("Testing sample 3"); // Left put text at (15mm, 2.5cm) ClosePage(); // Close PDF page

Sample 2:

OpenPage(8.5,11); // Open PDF page // LETTER paper size, 8.5" x 11" Ypos(1); // Set Y position to 1"

(10)

- 6 -

Margin(1.5) // Set left margin to 1.5"

LineSp(0.25); // Set baseline increment to 0.25"

Skip(25.4); // Skip 25.4 lines

Font(“Arial”, 10); // Define a font

Ltxt("Testing sample 4"); // Left put text at X = 1.5", // y = 1" + (0.25" x 25) = 7.25" ClosePage(); // Close PDF page

Putting Color Text on the Page

After you begin a page, you must specify the position and font before you can put color text on the page. You can specify a predefined RGB color by its color name, or a value of RGB and CMYK for your texts as well as graphics. Refer to MakePDF Reference for more details about the functions for fonts and texts.

Text string will be presented exactly as entered except alignment, if you want to do some manipulation on your text string, you can use string functions provided by C and C++ or MakePDF Formatter before you put text into the page.

MakePDF Formatter provides the “Left Text”, “Right Text”, “Center Text” functions for putting your ASCII/EBCIDC line-text on a page by the left, right and center alignments relative to the current position.

Left Alignment:

Current position at ( 4.5”, 2.5” )

Testing text 1

Testing sample 1

Pos( in(4.5), in(2.5) );

Font(“Arial Narrow”, 16, Bold);

Color(RED); // by color name Ltxt(“Testing text 1”); Ltxt(“Testing sample 1”); Right Alignment: Current position at ( 6.5”, 4.5” )

Testing text 2

Testing sample 2

Pos( in(6.5), in(4.5) );

Font(“Arial Narrow”, 16, Bold); ColorRGB(76, 230, 76); // by value of RGB Rtxt(“Testing text 2”); Rtxt(“Testing sample 2”); Center Alignment: Current position at ( 5.6”, 6.5” );.

Testing text 3

Testing sample 3

Pos( in(5.6), in(6.5) );

Font(“Arial Narrow”, 16, Bold); ColorCMYK(90,30,30,0); // by percentage of

// CMYK color

Ctxt(“Testing text 3”); Ctxt(“Testing sample 3”);

(11)

- 7 -

Formatting Paragraphs

Paragraphs are blocks of texts bounded in a rectangle area. With MakePDF Formatter, you can specify the width and angle of paragraph rectangle area, text alignment, etc, or you are even able to format multiple-column and cross pages paragraphs. Refer to MakePDF

Reference for more details about paragraph functions.

Sample:

char *text = "The Portable Document Format (PDF), undeniably one of the “ “most commonly used formats for electronic documents.";

DefaultCode(“ibm-437”); // Input data is USA ASCII with codepage 437

DefaultLocale(“en_US”); // language locale is USA English SetUnit(MM); // set default measurement unit to MM OpenDoc();

OpenPage(210,297); // A4 page size

LPI(5); // Set default line density to 5 // lines per inch

Font("Arial", 10); Color(CYAN);

ParTxt(text, 35, 30, 55); // Default alignment is LEFT Color(BLUE);

ParTxt(text, 35, 60, 55, -1, RIGHT); // alignment RIGHT, auto-height Color(RED);

ParTxt(text, 110, 30, 55, -1, CENTER); // alignment CENTER, auto-height

Color(BLACK);

ParTxt(text, 110, 60, 55, -1, JUSTIFY); // alignment JUSTIFY, auto-height ClosePage();

CloseDoc(); Output:

Drawing Color Lines

With MakePDF Formatter, you can draw vertical and horizontal color lines, you can also select line-type and plot skew lines. Refer to MakePDF Reference for more details about the line drawing functions.

(12)

- 8 -

Sample :

OpenDoc(); SetUnit(INCH);

ColorSpace(DEVICE_CMYK); // set color space to DEVICE_CMYK,

// default is DEVICE_RGB, MakePDF auto-

// handles colors according to the color // space defined

OpenPage();

GLineWidth(0.02); // set graphic line width to 0.02" StrokeColor(RED); // set line stroke color to RED GLineType(SOLID); // Set graphic line type to solid line GHline(1, 1, 3); // plot a horizontal graphic line from

// (1", 1"), 3" length

StrokeColor(30,255,30); // set line stroke color by a RGB value GLineType(LONG_DASH); // set line type to long dash

GVline(1, 1.2, 1.9); // plot a vertical graphic line from

// (1", 1.2"), 1.9" length

StrokeColor(0,100,0,0); // set line stroke color by a CMYK value

GSline(1.2, 1.2, 2, 2); // plot a graphic skew line from

// (1.2” 1.2”) to (2”, 2”) GLineType(SOLID);

StrokeColor(BLACK);

GHlines(2, 2, 2, 5, 0.2); // draw a horizontal line and then

// repeat it 5 time with gap 0.2" ClosePage();

CloseDoc();

Output:

Drawing Color Boxes

With MakePDF Formatter, you can draw color boxes as well as the rounded box with filling of background color. Refer to MakePDF Reference for more details about vector graphic drawing functions.

Sample:

(13)

- 9 -

OpenDoc();

OpenPage(DIN_A4); // A4 Page size Font("Arial", 18, BOLD);

Color(BLUE); // Set to blue color

GBox(370, 50, 150, 80, FILL_PATH, 8); // Box size is 150 x 80 pt, corner

// radius is 8 pt

Pos(445,95); // Set position at (445, 95) for text data Color(WHITE); // Set RGB white color for text

Ctxt("Rounded Box"); // Put the text at center

Color(YELLOW); // Set filling color to yellow

StrokeColor(GRAY); // Set stroke color to gray for box boundary GRbox(370, 170, 150, 80, 15, 0, 0, 15, FILL_STROKE); // Box size is 150x80,

// two corners radius // 15 pt

Pos(445,215); // Set position at (445, 220) for text data Color(RED); // Set RGB red color for text

Ctxt("Rounded Box"); // Center put the text ClosePage();

Output:

Including Image and PDF Overlay Objects

With MakePDF Formatter you can use an image and a PDF page as the resource objects. Resources are the objects that you have previously created with MakePDF Formatter or other application tools and are stored in a MakePDF PDF resource library directory. You can include an image at a fixed or dynamic position, as well as include a PDF page as a template/ overlay. Using image and PDF template/overlay as resource object gives us a much higher formatting performance with much smaller PDF data stream when that object appears more than once in a PDF document file.

(14)

- 10 -

Sample 1: Including images as the resource objects SetUnit(INCH);

OpenDoc( );

OpenPage(8.5,11);

DownscaleImage(true); // allow downscale image // resolution

SetImageRes(120); // output image in 120 dpi

// for e-Statements

InclImage("fruit.jpg", 1, 1, 1, 0); // Includes an JPEG image at

// (1”, 1”), image width 1", // height scale proportionally

InclImage("fruit.jpg", 5, 1, 2, 0);

InclImage("mickey.emf", 1, 2.1, 3, 0, 0, 10); // rotates EMF image 10 degree InclImage("fruit.jpg", 5.15, 3.0, 2, 0, 0, -10); // rotates JPEG image -10 degree

ClosePage();

Output:

Sample 2: Including a PDF page as an overlay/template object OpenPage(8.5,11);

InclOvly("IBC1.pdf", 0, 0); // includes a PDF template at (0”,0”)

InclImage("mafp.jpg", 0.38, 0.20); // includes an JPEG logo image ClosePage();

(15)

- 11 - Output:

Plotting Barcharts and Piecharts

Powerful 2D/3D barchart and piechart functions are provided to generate vector graphic bar and pie charts quickly with a small PDF vector graphic drawing data stream.

Sample 1: Plotting 3D Barchart

float data[] = {45, 55, 60, 65, 35, 85,

58, 95, 63, Newline control code is 25, 35, 45, used to split labels' text 45, 25, 30,

55, 65, 75, 65, 85, 90};

char *lbls[] = {"Mon\nHoliday 1", "Tue\nHoliday 2", "Wed", "Thu", "Fri", "Sat", "Sun"};

char *legend[] = { "East", "West", "North" }; SetUnit(INCH);

OpenDoc();

OpenPage(8.5,11); // page size is 8.5" by 11" Font("Arial", 8);

GPos(1, 2.3); // Set position of barchart

(16)

- 12 -

0.15, // Width of each bar 0.2, // Gap between each bar sets 10, // unit size of v-axis scale 10, // number of v-axis scales 3, // number of bars per bar set 7, // number of bar set data, // data array of input data lbls, // label texts below H-axis legend); // legend texts at right side ClosePage();

CloseDoc();

Output:

Sample 2: Plotting 3D Piechart

float data1[] = {15, 35, 40, 25, 30, 45, 55};

char *label[] = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};

SetUnit(INCH); // Set default units to Inch OpenDoc();

OpenPage(8.5,11); Font("Arial", 7);

GPiechartLabel(0.1, "{label}\n{percent}%"); // Set label format, 0.1” gap // from pie

GPos(2, 5.6); // Set current graphic position GPiechart(1.6, // Piechart width 1, // Piechart height 0.13, // Piechart shadow depth 6, // Sectors of the piechart data, // Input data array label, // Label text array

0, // Starting angle

(17)

- 13 -

Output:

Working with Barcodes

MakePDF Formatter supports most of the popular 1D linear and 2D barcodes by PDF drawing with a small PDF data stream. Refer to MakePDF Reference for more details about barcode functions.

Sample 1: Royal 4-state postal barcode char *data = "123456"; SetUnit(INCH); OpenDoc(); OpenPage(8.5,11);

Barcode(RM4SCC, // Royal 4-state postal barcode data, // Bar code data variable

1, // Bar code x position at 1" 1, // Bar code Y position at 1" 1.3, // Bar code dimension width 1.3" 0.35); // Bar code dimension height 0.35" ClosePage();

CloseDoc();

Output:

Sample 2: DataMatrix 2D barcode

char *data = "1234567890 this is testing of DataMatrix"; SetUnit(INCH); OpenDoc(); OpenPage(8.5,11); DataMatrix(data,1.2,1.5); // position at (1.2",1.5") ClosePage(); CloseDoc();

(18)

- 14 -

Output:

Showing PDF Text Information

MPDFTEXT utility is specially developed to quickly dump the information of PDF text contents and their bottom-up PDF positions, so that you can uniquely identify the first page of each page group by the data fields if their positions are unique and only appears on the first page of each page group.

MPDFTEXT command syntax

MPDFTEXT -i pdfFile -o textFile [-n pages] [-u openPass] [-p ownerPass]

Parameters

-i pdfFile

The input AFP filename.

-o textFile

The output text file in Unicode encoding, make sure your text reader/editor is capable support Unicode encoded texts.

-n pages

Optional, specifies the number of PDF pages to be dumped.

-u openPass

Optional, specifies the PDF open password.

-p ownerPass

Optional, specifies the PDF owner password.

Example:

Assume the PDF file is stmt3.pdf, you can issue the following command to dump its text information to the text file dump.txt in Unicode encoding:

mpdftext -i stmt3.pdf -o dump.txt

Output Example:

Page 1:

(x, y) bottom-up position in points

(205.20, 782.64) 'Mobile Phone Statement' (64.80, 755.28) 'Date:' (374.40, 732.24) 'Mobile Number' (374.40, 712.08) 'Previous Balance' (374.40, 691.92) 'Payment Paid' (374.40, 671.76) 'Overdue Charges' : : (150.48, 98.64) '2005/11/20'

(19)

- 15 -

(150.48, 77.04) '1,047.10'

(528.21, 755.28) 'Page 1 of 4' may to be used as a trigger

(21.60, 12.24) '000001'

Reengineering Existing PDF Document

MakePDF Formatter provides some special “Trigger” functions, with which you can define a location or a location range with a string or mask pattern, as a trigger to uniquely identify the first page of a page group or a page.

MakePDF Formatter also provides some special “Get Field” functions, with which you can capture a text string from an existing PDF document by its bottom-up coordinate location, or a location range with a matching pattern of symbols.

These function can be called to detect a trigger or capture the text strings of a data field once the PDF page is read-in by the “Get Page” function, and you can also delete, move or insert a PDF page, or add new contents on top of the existing PDF page.

MakePDF Formatter provides a special variable $Edt, indicating whether the “End of PDF Document” is detected.

C Sample:

int main() {

UI32 i, j, inPageNo = 0, outPageNo = 0, groupPages = 0; bool firstGroup = 1;

char str[80], str2[80], acNo[10], acNo_keep[10];

Start(); // Start session

DefaultCode("ibm-437"); // Sets default native encoding to USA ASCII SetUnit(INCH); // Set default units to inch

OpenDoc(); // Open a new PDF document do {

GetPage(); // Read-in a page from input PDF file inPageNo++;

if (Trigger(524.90, 509.04, “Page 1 of”)) // if it first page of page { // group

GetField(43.20, 532.80, str);

strcpy(acNo, &str[18]); // Gets Saving Account No

if (!firstGroup) // Now at first page of new page-group {

ClosePage(); // Need to close current page first outPageNo++;

// Process pagination, page serial numbers and barcode of previous // page group

j = inPageNo - groupPages;

for (i = outPageNo-groupPages; i < outPageNo; i++)

{

EditPage(i);

// Replace page serial number as the bank pages inserted sprintf(str, "%07d", j++);

sprintf(str2, "%07d", i);

(20)

- 16 -

BarCode(CODE128, acNo_keep, 0.22, 1, 1.5, 0.2, 90);

ClosePage();

}

if (groupPages % 2 != 0) // If the pages of page group is an odd // number, then insert a blank page { // for the production printing MovePage(++outPageNo, outPageNo);

}

groupPages = 1; // reset for new page group strcpy(acNo_keep, acNo); // Keeps new account numbers for

// generating of dynamic barcode }

else // It is first page group of input PDF {

firstGroup = 0;

strcpy(acNo_keep, acNo); // Keeps current account numbers for // generating of dynamic barcode ClosePage(); outPageNo++; groupPages++; } } else { ClosePage(); outPageNo++; groupPages++; }

(21)

- 17 -

// Process pagination, page serial numbers and barcode of last page group j = inPageNo - groupPages + 1;

for (i = outPageNo-groupPages+1; i <= outPageNo; i++) {

EditPage(i);

// Replace page serial number as the bank pages inserted sprintf(str, "%07d", j++); sprintf(str2, "%07d", i); TextReplace(str, str2, 7.20, 10.80, 72, 10); BarCode(CODE128, acNo_keep, 0.152, 1, 1.5, 0.15, 90); ClosePage(); }

CloseDoc(); // End of PDF document, close input & output PDF files #ifdef _DEBUG

ViewPDF(); // View output PDF file only in debug mode #endif

return 0; }

Working with Pagination

MakePDF Formatter offers a powerful capability that allows you to generate your pagination easily, such as “Page x of y”, on every page of your documents. With MakePDF Formatter, anytime you can reopen a closed PDF page in the page-level. After you processed and closed all of the pages of a customer, you can reopen each page of a page-group for inserting your pagination text, dynamic OMR or barcode.

The C sample shown below was extracted from the program developed for the banking sample statement shown in the figure on page 2, It uses MakePDF Formatter function Ypos() to check if the current Y position of the data is greater than 10.3 inches on the page. If so, a new page will be opened and generated. Once we have counted the total number of pages of a page-group, we can reopen each page for putting the pagination “Page x of y” string.

Sample: SetUnit(INCH); OpenDoc(); : :

// Check to see if Y position is at the bottom of the page. If so, // create a new page.

if ( Ypos() > 10.3 ) {

ClosePage(); // Close of current page composed groupPages++; // increate page number of a page-group

create_new_page(); // call a sub-function to create a new page }

: :

(22)

- 18 - g group c f { sert y” }

// reset it for processing next page-group

:

Exporting PDF Templ

roupPages++; // now got the total pages of a page-har tmp[25];

or (int i = 1; i < groupPages + 1; i++)

sprintf(tmp, "Page %d of %d", i, groupPages);

EditPage(lastGroupPageNo + i); // edit each page of page-group to in

// the pagination text “Page x of Font("Arial", 10);

Pos(8.0,3.93); Rtxt(tmp);

ClosePage(); // Close of current editing page += upP es;

lastGroupPageNo gro ag // keep the last page number of the last // page-group

groupPages = 0; :

ate from Windows Applications

You can create a PDF page te object from your Windows application soft inter Driver for Windows.

How with smaller PDF data stream size, then you

sho rm tter to generate plate

obje

StarOffice Draw from www.google.com/pa

as the PDF templa ware, by using a PDF Pr

ever if you want a better quality PDF page

uld use MakePDF Fo a a higher quality PDF page as your PDF tem ct.

ck, or OpenOffice Draw from www.openoffice.org

are ee of charge form

form/overlay and then export it as a PDF file, that can be included as a PDF template object by MakePDF Formatter.

(23)

- 19 -

Getting Help for WYSIWYG Data Positioning

fter you have completed the development with Windows WYSIWYG form design software r your overlays/templates, you can continue to rely on the form design tool you have used uring your MakePDF formatting programming for the positioning of the variable input data.

n your form design software, you can find such data field and objects positions from your esign templates; or create a simple data field and then move it to the place where your ariable data field will be placed. You can then find out its (x, y) position from the WYSIWYG

reen, and continue moving this sample field around, until you got all the data fields’ ositions needed for your MakePDF data positioning.

MakePDF programming: OpenDoc(); SetUnit(INCH); OpenPage(8.5,11); : InclImage("CMB1.jpg", 4.1 : ClosePage(); CloseDoc(); A fo d O d v sc p 9, 2.19);

(24)

- 20 -

Getting Data Field Position on OpenOffice Draw

On OpenOffice/StarOffice Draw, you can get the actual text/data position to be used for the PDF data/text positioning.

With “Page Setup” settings, define page “Margins” to 0 values.

ith “Text” settings, define “Spacing to bord

(25)

- 21 -

With “Position and Size” settings, select bottom left corner, bottom center or bottom right osition for a PDF data/text that is to be left,

lly for getting a pre

OpenDoc SetUnit OpenPag Font(“A Pos(0.9, 6.05); Ctxt(new_balance); : ClosePage(); : CloseDoc();

corner as the “Base point” if you want to get a p center or right aligned, respectively.

You need to unclick Adapt option “Fit Height to text” and then return the data field to adjust its baseline position manua cise baseline Y position.

MakePDF programming: (); (INCH); e(8.5,11); : rial”, 10); :

(26)

- 22 -

Working with Ma

kePDF Definition File

f

Once the MakePDF definition file is defined for your MakePDF formatting program, you can call it by the command-line argument flag “-d definition_file” when you run your program in the batch mode.

Definition Sample:

reslib=d:\userlib\pdf_res // the resource path of images and PDF templates

fontlib=d:\userlib\fonts // additional font path to Windows default font path

ownerpw=PassW0rd168,nomodify,nocopy,noaccessible,noassemble MakePDF definition file is an optional parameter file to be used to specify your library paths o

fonts and resources, and encryption parameters.

// PDF is protected with an owner password, PDF contents // are not allow to make any modification and copy

openpw=tiger12@#$% // PDF is protected with a PDF open password, user need // this password to open the PDF file

stalling MakePDF Formatter and Learning from Samples

In

Prerequisites

 Windows 2000/XP/2003/Vista.

MS Visual Studio C++ 6.0, MS Visual C++ 2003 or Visual C++ 2005.

Latest IBM PDF Workbench Viewer, free download from www.printers.ibm.com.

tel PII B memory.

B memory, Dual Ch nt ller with multiple UltraSCSI320 hard disks.

Installing MakePDF Formatter

Mak

 Log in as an Administrator user.  Run setup package you received.

 Fo ions on the installation screens to install of the package, the destination fo

Learning from MakePDF Formatter Samples

MakePDF supplied comprehensive samples are installed in the c:\MakePDF\samples. You can run ples\test\demo.bat directly for a batch testing, or click any of the Visual Stud project files *.dsw in the subdirectories of c:\MakePDF\samples\ VC6\ if you are using Visual Studio C++ 6.0, or click any of the solution files *.sln in the c:\MakePDF\ sam :\MakePDF\samples\VC8\ subdirectories if you are using Visual Studio C++ 2003 or 2005, and then press the F5 key to execute the program or press the F10 or F11 (go into sub-function) key to run the program in step by step debugging mode to familiarize yourself with MakePDF Formatter.

 

 Minimum PC hardware: In compatible CPU with 256 M  Re mmended PC hardware: Intel P4 compatible CPU with 2 GB Mco

annel UltraSCSI Co ro

ePDF Formatter installation is easy:

llow the instruct lder is c:\MakePDF.

c:\MakePDF\sam io 6.0 workspace ples\VC7\ and c

(27)

- 23 -

+ V.60

Compiling and Running Under Visual C+

To compile and run a MakePDF formatting program, you need to create a project in Microsoft Visual C++ that makes use of MakePDF library for Windows 2000/XP/2003. You can use the

re as a reference If you are using Visual Studio C++ 2003 or 2005.

Adding

udio C++ 6.0, select “Tools” menu --> “Options” --> “Directories” --> “Include \MakePDF\include where the MakePDF header file MakePDF.h was

jects” -->"Win32 Console project.

ive Configuration” to switch to either define release

Active Configuration…” to open the " Set Active Project  From the "Project" menu, select "Settings" to open the "Project Settings" dialog box,

 From the "Category:" pull-down menu in the "C/C++" tab, select "Code Generation", then from the "Use run-time library:" pull-down menu, select option "Debug

Multithreaded DLL".

steps he

MakePDF Include Files’ Directory

With Visual St

files”, to add directory c: installed.

Or just put the following coding at the beginning of your program:

#include "c:\\MakePDF\\include\\MakePDF.h"

Creating Your New Project

 With Visual Studio C++ 6.0, select “File” --> “New” --> “Pro application" to create your new

 From the “Build” menu, select “Set Act or debug configuration.

 From the "Build" menu, select "Set

Configuration" dialog box, then select release configuration.

then select the "C/C++" tab.

 From the "Category:" pull-down menu in the "C/C++" tab, select "Code Generation", then from the "Use run-time library:" pull-down menu, select "Multithreaded DLL".  From the "Build" menu, select "Set Active Configuration…” again to open the " Set Active

Project Configuration" dialog box, then select debug configuration.

 From the "Project" menu, select "Settings" again to open the "Project Settings" dialog box, then select the "C/C++" tab.

(28)

- 24 -

oject” --> “Files...” --> select Files of type as c:\MakePDF\lib\MakePDF.lib into your project.

th:" entry field, enter the path c:\MakePDF\lib in which MakePDF.lib was installed.

Or just put the following coding at the beginning of your MakePDF formatting program:

Running MakePDF formatting program in the Debugging Mode

uring your development, you can run the program in debug or execute mode with your isual Studio C++, and you can view your just generated PDF file immediately once you called

e “View PDF” function within your program.

n Visual Studio C++ 6.0, From the "Build" menu, select "Set Active Configuration…” again open the " Set Active Project Configuration" dialog box, select debug configuration and turn, then select Project menu --> Settings --> Debug, to define your working directory nd command arguments. In the “Working directory” entry field, enter the path name of our working directory where you keep your input testing file and MakePDF definition file, nd in the “Program arguments” entry field, enter arguments by MakePDF parameters

ntax as:

-d definition_file -i input_file -o output_PDF_file.

Compiling and Running Under Visu

 From the “Project” menu, Select “Add To Pr Library Files (.lib) --> then insert library file

Or, select the "Link" tab in the "Project Settings" dialog box, then from the "Category:" pull-down menu in the "Link" tab, select "Input", in the "Object/library modules:" entry field, enter the name of the module: MakePDF.lib. In the "Additional library pa

#pragma comment (lib,"c:\\MakePDF\\lib\\MakePDF.lib")

D V th O to re a y a sy

al C++ 2005 Express Edition

You can download Microsoft Visual C++ 2005 Express Edition which is recommended and Windows Platform SDK from www.msdn.com for free, and build powerful MakePDF

(29)

- 25 -

applications, you'll need to follow some steps to set up your Visual C++ 2005 Express and

Using Visual C++ 2005 Express

St

Windows Platform SDK.

without the Platform SDK

ep 1: Download and Install Visual C++ Express

you haven't done so already, install

If Visual C++ Express.

St

With Visual St So tion

kePDF.h"

#pragma comment (lib,"c:\\MakePDF\\lib\\MakePDF.lib")

Using

ep 2: Update the Visual C++ 2005 Express directories

udio C++ 2005 Express, select “Tools” menu --> “Options” --> “Projects and lu s” --> “VC++ Directories” to add the following appropriate directories:

Library files: C:\MakePDF\lib Include files: C:\MakePDF\include

Or just add the following coding at the beginning of your MakePDF formatting program:

#include "c:\\MakePDF\\include\\Ma

#pragma comment (lib,"c:\\MakePDF\\lib\\uuid.lib")

Visual C++ 2005 Express with the Platform SDK

Step 1: Download and Install Visual C++ Express

If you haven't done so already, install Visual C++ Express.

Step 2: Install of the Microsoft Platform SDK

tall o

Ins f the Platform SDK over the Web from the MSDN Download Center. Follow the structions and install of the SDK for the x86 platform.

tep 3: Update the Visual C++ 2005 Express directories

udio C++ 2005 Express, select “Tools” menu --> “Options” --> “Projects and olutions” --> “VC++ Directories” to add the following appropriate directories:

Executable files: C:\Program Files\Microsoft Platform SDK\Bin Include files: C:\Program Files\Microsoft Platform SDK\include Library files: C:\Program Files\Microsoft Platform SDK\lib

tep 4: Update the corewin_express.vsprops file

ou need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual tudio 8\VC\VCProjectDefaults) and change the string that reads:

 AdditionalDependencies="kernel32.lib" to

 AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

tep 5: Update the AppSettings.htm file

Visual C++ Express, the Win32 Windows Application type is disabled in the Win32

pplication Wizard. To enable that type, you need to edit the file AppSettings.htm file located

“c:\Program Files\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\1033\”

lder, comment out lines 441 - 444 by putting a // in front of them as shown here: // WIN_APP.disabled = true; // DLL_APP_LABEL.disabled = true; in S With Visual St S S Y S S In A in fo // WIN_APP_LABEL.disabled = true; // DLL_APP.disabled = true;

(30)

- 26 -

Creati

ation Settings” Wizard panel, select default application type “Console application” and uncheck addition

fx.h and stdafx.cpp from your

(l \vc80\\uuid.lib")

 Fr n open your project configuration properties, or from the “Solution Explore”, right click project icon and then open its

 Se eneration” to open its dialog

bo cted for Release

co or Debug and

Active(Debug) configuration.

Running MakePDF formatting program in Debugging Mode

t, you can run the program in debug ecute mode with your Visual Studio C++ 2005, and you can view your generated PDF file

ction within your program.

ct properties, select “Configuration ug) configuration,

ng nter

argu

_

ng Your New Project

With Visual Studio C++ 2005 Express, select “File” --> “New” --> “Projects” -->"Win32 Console application" to start creating your new project, on the “Applic

option “Precompiled header”, then remove stda project.

 Put the following coding at the beginning of your program:

#include "c:\\MakePDF\\include\\MakePDF.h"

#pragma comment (lib,"c:\\MakePDF\\lib\\MakePDF.lib") #pragma comment ib,"c:\\MakePDF\

om the “Project” me u, select “Properties” to properties.

lect “Configuration Properties” --> “C/C++” --> “Code G

x, make sure the Runtime Library “Multi-threaded DLL (/MD)” is sele nfiguration and “Multi-threaded Debug DLL (/MDd)” is selected f

During your MakePDF formatting application developmen or ex

immediately once you called the “View PDF” fun On Visual Studio C++ 2005, after you opened your proje

Properties” --> “Debugging” to open its dialog box under “Active(Deb

then define your working directory and command arguments. In the “Working directory” entry field, enter the path name of your working directory where you kept your input testi

file, and in the “Command Arguments” entry field, e file and MakePDF definition

ments by MakePDF Formatter parameters syntax as

(31)

- 27 -

ual Basic.NET

or C++. file

df\samples\VB.NET, he program or press the F10

or F ode to familiarize yourself with

Mak

n

es B ndings for Visual C#

+. ile to

in path c:\makepdf\samples\c#, click a solution files *.sln and then press the F5 key to execute the program or press the F10 or F11

rself with

Langu

he usage of MakePDF Formatter with Java is essentially the same as with C or C++.

va file

etbeans

With Ne

roject… --> select path C:\makepdf\SAMPLES\Java\NetBeans, then select one of project or all of rojects.

Languages Bindings for Vis

The usage of MakePDF Formatter with Visual Basic.Net is essentially the same as with C To use MakePDF Formatter with VB.Net, you need to add the c:\makepdf\include\makepdf.vb to your project, via menu “Project” --> “Add Existing Element…”.

MakePDF Formatter samples for VB.NET are provided in path c:\makep click a solution files *.sln and then press the F5 key to execute t

11 key to run the program in step by step debugging m ePDF Formatter.

La guag

The usage of MakePDF Formatter with Visual C# is essentially the same as with C or C+

i

To use MakePDF Formatter with C#, you need to add the c:\makepdf\include\makepdf.cs f your project, via menu “Project” --> “Add Existing Element…”.

MakePDF Formatter samples for C# are provided

key to run the program in step by step debugging mode to familiarize you MakePDF Formatter.

ages Bindings for Java

T

To use MakePDF Formatter with Java you need to add the c:\makepdf\include\makepdf.ja to your project.

MakePDF Formatter samples for Java are provided in path c:\makepdf\samples\java\n for NetBeans.

tBeans, you can open MakePDF Formatter Java projects, by selecting File --> Open P

(32)
(33)

- 29 -

Chapter 2. Running Your MakePDF Formatter Program

You can run your MakePDF Formatter program by a command-line in batch mode, or run it automatically under AutoMakePDF utility.

Running MakePDF Formatter in Batch Mode

Once you have completed development of your program and generated the executable module in release mode, you can run it in the batch mode by using the following command syntax:

For raw data file input:

program_name [-f font_path] [-r res_path] [-d definition_file] [-i input_data_file] [-o {PDF_file | output_path}] [-u out_open_password] [-p out_owner_password] [-l] For PDF file input:

program_name [-f font_path] [-r res_path] [-d definition_file] [-i input_pdf_file.pdf] [-o {PDF_file | output_path}]

[-u out_open_password] [-p out_owner_password] [-U in_open_password] [-P in_owner_password] [-l] -r font_path

Optional, specifies a font library path in additional to Windows system font path, which is the default font library path.

-r res_path

Optional, specifies a resource path where your images and PDF templates are stored.

-d definition_file

Optional, specifies a MakePDF Formatter definition file in which the library paths of fonts and resources, and encryption parameters are defined.

-i input_data_file

Optional, specifies an input data file. If it not specified, then MakePDF Formatter program reads the input data from the STDIN (Standard Input) via pipe system from the STDOUT (Standard Output) of another application directly.

-i input_pdf_file.pdf

Optional, specifies an input PDF file, if you need to reprocess your existing PDF document, such as replace OMR with barcode, replace texts, mask some areas, etc.

-o pdf_file

Optional, specifies a filename of PDF output file, PDF filename extension *.pdf is required.

-o output_path

Optional, specifies an output path for the multiple PDF or email output files.

-u out_open_password

Optional, specifies the PDF open password for user to open the output PDF document.

-p out_owner_password

(34)

- 30 -

-U in_open_password

Optional, specifies the PDF open password to open the input PDF document.

-P in_owner_password

Optional, specifies the PDF owner password to decrypt the input PDF document.

-l

rd Error) in DOS age window.

Reading the Com

Optional, if you want to output the error message to STDERR (Standa command-line mode, default is pop-up the error message by a mess

pressed or Encrypted Input Data

While you are running your MakePDF formatting program in batch mode, you can either

t_file” flag parameter is specified, or read the input

e 1: Reading WinZip AES 256-bit encrypted input file

rmatting program is stmt1.exe, and your zipped input file munz

xampl 2: Reading input file compressed in ZIP 2.0 standard format

he fly with stmt2.zip | stmt2 -d stmt2.def -o stmt2.pdf

Zip

read raw data from an input file if “-i inpu

data stream directly from the output of another application program on the fly in high performance via the system pipe.

xampl E

ssumin your MakePDF fo

A g

smt1.zip is encrypted and compressed by PKZIP AES 256-bit encryption with password

rainbow1, you can process it directly on the fly with the MakePDF munzip utility:

ip -s -p rainbow1 stmt1.zip | stmt1 -d stmt1.def -o stmt1.pdf

E e

Assuming your MakePDF formatting program is stmt2.exe, and your zipped input file smt2.zip is compressed in ZIP 2.0 standard format, you can directly process it on t freeware Info-ZIP utility UNZIP:

unzip -p

Info-ZIP at www.info-zip.org is a diverse, Internet-based workgroup to provide free, portable, ons of the

high-quality versi and UnZip compressor-archiver utilities that are compatible tandard. Info-ZIP supports widest system platforms with hardware from

ding 7-ZIP formats input file

ad compressed formats of 7Z, ZIP, CAB, RAR, P, BZIP2, TAR, CPIO, RPM and DEB, it also supports its own AES 256 bits encryption and

ression algorithm offers ultrahigh compression ratio.

sword rainbow2, you can read 7-Zip he fly with the command:

ed

smt4.rar is ncrypted and compressed by RAR shareware or WinRAR utility with password bigsnow5, you

ta directly on the fly with the command:

unrar p –ierr –pbigsnow5 stmt4.rar | stmt4 -d stmt4.def -o stmt4.pdf with ZIP 2.0 s

microcomputers all the way up to the IBM mainframe.

Example 3: Rea

With 7-Zip freeware from www.7-zip.org, you can re ARJ, GZI

its own LZMA comp

Assuming your MakePDF formatting program is stmt3.exe, and your input file smt3.7z is encrypted and compressed by 7-Zip utility with pas

encrypted data directly on t

7zip e -prainbow2 -so stmt3.7z | stmt3 -d stmt3.def -o stmt3.pdf

4: Reading RAR format input file Example

With UNRAR freeware from www.rarlab.com, you can decompress RAR format compress crypted file.

and en

Assuming your MakePDF formatting program is stmt4.exe, and your input file e

can read RAR encrypted da

(35)

- 31 -

Appendix A. Un

This chapter contains associated guidance information to help you understand input data s.

Legacy Line Data

derstanding Data Format and Transferring

format and how to get input data from other system

Formats

Since legacy line data is the data formatted for line printers, it generally has the followin characteristics: g e must f , and delimited-record systems or IBM host systems.

Fixed-ere are no separator

 Line data is text only

 Line data is stored as records or lines of data

 Line data always has some kind of carriage control commands that instruct the lin . printers on how to move down the forms, such as line feed and page break Line data is fundamentally record orientated in nature. A program reading the line data

a record and the start of the next one. There are three types o have a way to identify the end of

line data formats widely used: fixed-length record, variable-length record file from PC and UNIX open

length Line Data Format

Fixed-length line data contains records that are all of the same length. Th

or prefix or self-identifying information existing that indicates the record length. This format is widely used by IBM host systems, We must know the exact record length from the mainframe programmer.

133 bytes data 133 bytes data 133 bytes data

Variable-length Line Data Format

e length of the record in the file. oes not clude the two bytes length prefix itself if the data is from IBM host systems.

its variable-length data.

RDW

133 bytes data RDW 100 bytes data

Variable-length line data uses a two bytes record length prefix (called RDW, Record escriptor Word) in front of each record that provides th

D

The length prefix is a 16-bit big-endian binary value. The value of the length prefix d in

Please note that Visual C++ on PC uses little-endian to store an integer value, so after you have read in RDW prefix, you must swap its two bytes from big-endian to little-endian before you can continue reading

x’0085’ X’0064’

1st record 2nd record 3rd record

(36)

- 32 -

Delimited Record Data Format

Delimited record uses a separator or delimiter to indicate the end of a record.

the new line hex code is ‘0c’x. is Windows/DOS format: CRLF X’0d0a’ 130 bytes data CRLF X’0d0a’

On UNIX, the new line delimiter is line-feed in hex code x'0a'; on Windows, delimiter is carriage-return and line-feed in hex code x'0d0a'. The form-feed

If the line data uses EBCDIC encoding from IBM host systems, the default new line delimiter x'25'. 133 bytes data UNIX format: 133 bytes data LF X’0a’ 130 bytes data LF X’0a’ EBCDIC format: 133 bytes data NL X’25’ 130 bytes data NL X’25’

Carriage Control Codes

Line d ta is the data usually formatted for printing on a line printer by IBM host systems or other c A line d tain a 1 rol character and a 1-byte table reference character followed by the data to be printed. Both characters are

ptional and are defined as follows:

r at

hese two types: ANSI (American National tandards Institute) carriage control or machine carriage control.

ANSI Carriage Control Characters

The mos . The rd rol characters are:

a

omputing systems. ata record can con -byte carriage cont o

CC The carriage control character acts as a vertical tab command to position the pape the start of a new page, at a specified line on the page, or to control the skipping to the next line

TRC Table Reference Character, selects the font number ID in which the line is to be printed

The carriage control characters can be one of t S

t universal carriage control is ANSI standa ANSI carriage cont CC TRC Data

1st record 2nd record

1st record 2nd record

(37)

- 33 -

ANSI CC Action

Do not space the line and print + Single space the line and print White-space Float space the line and print 0 Triple space the line and print - Skip to Channel 1 (the top of the page) 1 Skip to Channel 2 position 2 Skip to Channel 3 position 3 Skip to Channel 4 position 4 Skip to Channel 5 position 5 Skip to Channel 6 position 6 Skip to Channel 7 position 7 Skip to Channel 8 position 8 Skip to Channel 9 position 9 Skip to Channel 10 position A Skip to Channel 11 position B Skip to Channel 12 position C

Machine Carriage Control Codes

Machi carriage control codes were originally the actual hardware control commands for line printers, which a therefore hine carr des cann e translated.

hine carriage control codes are:

Action Action After Printing

Action (Immediate)

ne

re hex values, , mac iage control co ot b Typical IBM mac

Print (no space) x’01’ Space 1 line x’09’ x’0b’ Space 2 lines x’11’ x’13’ Space 3 lines x’19’ x’1b’ Skip to Channel 1 x’89’ x’8b’ Skip to Channel 2 x’91’ x’93’ Skip to Channel 3 x’99’ x’9b’ Skip to Channel 4 x’a1’ x’a3’ Skip to Channel 5 x’a9’ x’ab’ Skip to Channel 6 x’b1’ x’b3’ Skip to Channel 7 x’b9’ x’bb’ Skip to Channel 8 x’c1’ x’c3’ Skip to Channel 9 x’c9’ x’cb’ Skip to Channel 10 x’d1’ x’d3’ Skip to Channel 11 x’d9’ x’db’ Skip to Channel 12 x’e1’ x’e3’

Keyed Record For at Data

m

Keyed record format data is a new form of effective raw data format used by open systems, such as CRM, SAP RDI (Raw Data Interface), Telecom billing raw data, etc. With this format,

le by a unique key field, this record identification (RID) key field can appear anywhere within a record, but must be in the same position and have

connecting external text management systems to control individual requests. each record type must be identifiab

the same length in every record type, mostly this RID field is at the front of each data record that is used to achieve more flexible and faster data formatting capabilities, and also for

(38)

- 34 -

The data fields that can be delimited are separated by consiste r(s) that is(are) set aside to indica ta field. Most often, these character(s) is(are) inserted by you lication.

The following p arated by a delimiter character “

,

”, the length of the data field c

nt characte te the beginning and end of a da

r database software or your app icture shows the data fields sep an be variable.

the placeholder type, where each field starts at a fixed olumn position with a fixed length.

Another type of data fields can be c

XML Data

XML data i d its data elem tents can be easily extracted into the record and data formatting by programming

The follow f a client’s info showing his “na d his “address” fields place <Clien <nam <t <first>David</first> <middle>MJ</middle> <last>Greenpone</last> >

s self-describing an ent con field structure for

ing is an example o rmation me” an d together: t> e> itle>Dr.</title> </name> <address <street>2068</street> <street>Broadway Road</street> <city>Smithtown</city> <Country>USA</Country> <zip>34005</zip> </address> </Client>

(39)

- 35 -

Unicode

The Unicode Standard is the universal character encoding scheme for international languages. defines a consistent way of encoding multilingual text that enables the exchange of text data

ith Unicode, the information technology industry has replaced proliferating character sets with data stability, global interoperability and data interchange, simplified software, and reduced development costs.

Unicode provides three popular encoding forms: a 8-bit form (UTF-8), a 16-bit form (UTF-16), and a 32-bit form (UTF-32). The 8-bit, byte-oriented form UTF-8, is designed for easy usage with existing ASCII-based systems.

Access the Internet for more information about Unicode.

Common Methods of File Transferring

It

internationally and creates the foundation for global software. Unicode is implemented in all modern operating systems and computer languages.

W

There are a variety of methods to transfer the raw data files from other systems to the MakePDF rver. Methods commonly used to transfer files from other systems to MakePDF are:

 Physical media (such as tape and CD-ROM)  SNA file transfer software

 FTP, NFS or LPR/LPD  SMB Connections

 PSF Download feature for z/OS

Physical Media

hysical media is still used for data exchange across systems. Nowadays, we can easily exchange data across open systems by portable hard-disk, CD-ROM, and DVD; in some situations, we may still need to use tape media to get data from IBM mainframes and other UNIX systems.

ad nge for Windows from ovaStor Corporation is one of them.

SNA Fi

You er files from IBM mainframes to MakePDF server by using the IBM 3270 PC file tran

The mmended:

th fixed-length records that contain only printable characters and either cters, or no carriage control characters, either TEXT or BINARY

ngth records that contain only printable characters and ontrol characters, or no carriage control characters, specify file ons ASCII and CRLF in your PC 3270 emulation software.

se

P

A variety of software providers offer such tape utilities for Windows, with which you can re IBM mainframe format tape, as well as UNIX tar format tape. NovaXcha

N

le Transferring

may transf

sfer program (IND$FILE). following parameters are reco

 For the files wi

ANSI carriage control chara transferring can be used.  For the files with variable-le

either ANSI carriage c transfer opti

(40)

- 36 -

 For the files with machine carriage control codes, specify file transfer options BINARY and CRLF. The received data will be EBCDIC encoding with IBM machine carriage control

rks well for low volume line data with ss critical availability requirements.

FTP or

sfer data sets between your z/OS and any server that

Following is a sample JCL that shows usage of FTP for z/OS in a batch job, to transfer the data SCII conversion into a PC/Unix server:

//STEPFTP EXEC PGM=FTP,REGION=4M

P121.TEST68'

For more information on IBM FTP for z/OS, refer to IBM z/OS IP User’s Guide.

he latest FTP software supports both encryption and compression on the fly during file or 256-bit. e usage, Network File System offers a flexible option for exchange of data etween like and unlike platforms that support the NFS protocol. NFS is the defacto standard

anslated. However, NFS for IBM mainframe may ry record length prefix (RDW) for variable-length records data. Microsoft SFU (Service for Unix) 3.5 improved the overall performance of the Server for NFS,

be downloaded from Microsoft SFU home page ttp://www.microsoft.com/windows/sfu/downloads/default.asp.

LPR/LPD File Transferring

from remote spool systems, such as spool files from Unix and VSE codes and records separated by ASCII CRLF (x’0d0a’).

There are several software providers who offer SNA RJE 3277 emulation software for

Windows, with which you can get print line data files from IBM spool queues directly, such as POWER for VSE; JES2 or JES3 for z/OS. This solution wo

le

NFS File Sharing

FTP is a high performance TCP/IP file transfer function that has been implemented on many platforms, with FTP you can transfer the files across the systems by text or binary mode some. IBM FTP on z/OS enables you to tran

supports TCP/IP.

from a data set with EBCDIC to A

//OUTPUT DD SYSOUT=* //INPUT DD * 10.209.50.179 userid68 password68 ebcdic put 'CPCPACT.CC1 quit /* T

transferring, Serv-U FTP server and FTP Voyager client software are strongly recommended f FTP automation and float data protection even if your data has been encrypted by AES For general-purpos

b

system for sharing directories and files over Internet Protocol (IP) networks. The shared data sets and disks appear to each remote host system as just another local dataset or disk. Generally, NFS-mounted files are not tr

include a two-byte bina

both by enhancing the performance of individual servers and by making the server for NFS cluster-aware. It is free and can

h

LPR/LPD is widely used in open systems for printing via TCP/IP network, with MakeAFP LPD server you can get data sending

PC, JES2/JES3 spool files from z/OS via IP PrintWay or NPF for z/OS, POWER spool files from via LPR, or SCS spool files from OS/400.

(41)

- 37 -

SMB Conne

int

fast seamless file sharing with Windows.

ovides high-speed data transfer for high-volume jobs and supports esume from a checkpoint if the data transmission is interrupted.

Tips for Improve Performance

ctions via NETBIOS over TCP/IP

Samba is a popular open source/free software suite that provides seamless file and pr services to SMB/CIFS clients, with Samba we can get files from open systems and IBM z/OS quickly.

IBM Fast Connect for AIX also provides

PSF Download for z/OS

If you have IBM Download feature of PSF installed on z/OS, and Infoprint Manager or IBM Content Manager OnDemand for Windows installed on the MakePDF server, you can get z/OS JES spool files directly.

MVS Download pr restart/r

Hints and

Although MakePDF formatting program and utilities support reading compressed raw data mazing formatting speed,

job submission and file transferring time, you ance further more.

nting environment, huge data I/O e disk clutching. It is recommended that both rint Manager are installed on the PC server that is configured with Dual

oling of

k, and writing compressed PDF directly on the

inting

fly, with a tremendously reducing the disk I/O, pr

still can do some tuning to improve its perform

With mission-critical high speed PDF formatting and pri can be a constraining point that leads to littl

MakePDF and Infop

Channel UltraSCSI controller with multiple UltraSCSI320 15K RPM hard disks, and use separate hard disks for storing input raw data files, output PDF files, and spo

Infoprint Manager, to maximize I/O throughput by avoiding read/write contention, by this method your PDF formatting and data transmission performance and speed will be tremendously improved.

If you really need a RAID controller for your PC server, it is recommended that you check with your server provider for the best RAID configuration. RAID 1+0 ( sometimes called RAID 10 ) seems to be popular, with good performance and cost compromises.

If your input raw data files are stored on another PC or Unix server, it is recommended that you use 1 Gb Ethernet LAN or 1 Gb dedicated cross-wired Ethernet cable with a direct lin it generally provides ultra fast data transmission.

(42)

References

Related documents

Such a collegiate cul- ture, like honors cultures everywhere, is best achieved by open and trusting relationships of the students with each other and the instructor, discussions

You’ll know it’s time to implement or reassess your load balancing solution when you’re reviewing site traffic reports and seeing an increase in the number of connections refused

The monitoring and study of gambling-related problems and the development of treatment and help structures for people with gambling problems is con- ducted through the funding

Paired samples t - test results (two-tailed P - and t - values; mean ± SE) for a comparison of pre- and post-treatment of domestic greywater with CW of various physico-chemical

When you are ordering replacement parts, please refer to this Parts Catalogue and quote both part numbers and part names correctly.. Modifications or additions which have been

You may also get Disability Living Allowance or Personal Independence Payment (but not Attendance Allowance) if you have walking difficulties.. You may get support from Access to

This set comprises publication output indicators such as (1) the share in the world total, (2) subject-based publication profiles, (3) citation-based indicators like journal-

To capture the traditional spiritual power of the Bozhe agents that is highly revered and honored by the Sabat Bet Gurage peoples, sheyikh Budalla seemed to have