DCPS.CH and DCPS.PRG contain commands and functions to use this excellent print engine with eXpress++ style commands. DCPS commands are similar to DCPRINT commands except they use the PSCRIPT.DLL print engine. This print engine will create PDF files and also supports bar codes. Run PBUILD PSTEST.XPJ and the run PSTEST.EXE to view the sample programs.
The commands allow usage of Xbase++ style fonts and colors. If you must have PDF output and do not want to require your users to purchase Win2PDF or BullZip, then this may be the best solution for you because PDF support is built in to the print engine.
It also includes a print previewer.
Here is a snapshot of the printout: Here is the source code for the printout:
Code: Select all
FUNCTION ExpressStylePrint2(nDevice)
Local nLoop
Local cText := ;
"Paradise is engineered on Vos, the hidden sister planet of Earth that " + ;
"orbits the sun directly opposite our own planet; sirens and satyrs dance " + ;
"to the music of love and bounty; the seer arrives to warn of the approaching " + ;
"Dark and is ignored. Los the Irrational attempts to stifle the music; " + ;
"the sirens and satyrs are concerned, but are too apathetic to act; the music " + ;
"wheel on which Vos rotates grinds to a halt; the birds and insects leave " + ;
"Paradise; the Darkness begins. Many sirens and satyrs perish in the frigid " + ;
"Darkness; Emau stumbles across a hollow reed in the forests and creates music; " + ;
"Los the Irrational battles Emau with Silence; Emau triumphs; light returns to Paradise."
DCPS BEGINDOC TITLE "Bill of Lading" ORIENTATION 1 PAGESIZE DMPAPER_LETTER ;
_ACROBAT nDevice==4
DCPS UNITS APS_MILL
// Puro Logo
@ 15, 8, 22, 50 DCPS BITMAP "PUROLOGO.BMP"
// Top/Left Two frames
@ 25, 8, 62, 100 DCPS FRAME THICKNESS 2 FILLCOLOR GRA_CLR_WHITE
@ 65, 8, 112, 100 DCPS FRAME THICKNESS 2 FILLCOLOR GRA_CLR_WHITE
@ 27, 55 DCPS SAY "SENDER (FROM)" FONT '8.Arial' JUSTIFY APS_CENTER
@ 33, 10 DCPS SAY "AbeeLabs Systems Inc." FONT '8.Arial Bold'
@ 37, 10 DCPS SAY "70, de la Gare Street" FONT '8.Arial Bold'
@ 42, 10 DCPS SAY "St. Jerome, Quebec" FONT '8.Arial Bold'
@ 51, 10 DCPS SAY "J7Z 2B8" FONT '8.Arial Bold'
@ 56, 10 DCPS SAY "(999) 555-5555" FONT '8.Arial Bold'
@ 67, 55 DCPS SAY "RECEIVER (TO)" FONT '10.Arial' JUSTIFY APS_CENTER
@ 72, 10 DCPS SAY "Liza Peabody" FONT '14.Arial Bold'
@ 78, 10 DCPS SAY "Mistral Floors Ltd." FONT '14.Arial Bold'
@ 84, 10 DCPS SAY "2211, Industrial blvd." FONT '14.Arial Bold'
@ 95, 10 DCPS SAY "Springfield, Ill 24551" FONT '14.Arial Bold'
@101, 10 DCPS SAY "(888) 555-1111" FONT '14.Arial Bold'
@ 10,112 DCPS SAY "PACKAGE I.D. NO." FONT '8.Arial'
@ 8,143 DCPS SAY "7 0 3 8 2 3 8 7 3 4" FONT '16.Arial Bold'
@ 18,60 DCPS SAY "0 1 5 1 8 1 6 9 6" FONT '14.Arial Bold'
@ 25,120 DCPS SAY "BILL CHARGES TO" FONT '8.Arial' JUSTIFY APS_CENTER
@ 25,145 DCPS SAY "TOTAL WEIGHT" FONT '8.Arial' JUSTIFY APS_CENTER
@ 25,170 DCPS SAY "PIECES" FONT '8.Arial' JUSTIFY APS_CENTER
@ 25,192 DCPS SAY "DATE" FONT '8.Arial' JUSTIFY APS_CENTER
@ 29,145 DCPS SAY "SUBJECT TO AUDIT" FONT '6.Arial' JUSTIFY APS_CENTER
@ 29,192 DCPS SAY "MO DAY YEAR" FONT '6.Arial' JUSTIFY APS_CENTER
@ 34,120 DCPS SAY "RECEIVER" FONT '10.Arial Bold' JUSTIFY APS_CENTER
@ 34,145 DCPS SAY "1 POUND" FONT '10.Arial Bold' JUSTIFY APS_CENTER
@ 34,170 DCPS SAY "1 OF 1" FONT '10.Arial Bold' JUSTIFY APS_CENTER
@ 34,192 DCPS SAY Date() FONT '10.Arial Bold' JUSTIFY APS_CENTER
@ 45,155 DCPS SAY "SERVICE OPTIONS" FONT '11.Arial Bold Italic' JUSTIFY APS_CENTER
@109,135 DCPS SAY "PIN" FONT '6.Arial' JUSTIFY APS_CENTER
@108,160 DCPS SAY "7 0 3 8 2 3 8 7 3 4" FONT '10.Arial' JUSTIFY APS_CENTER
@115, 14 DCPS SAY "UNICODE" FONT '6.Arial' JUSTIFY APS_CENTER
@115, 60 DCPS SAY "AIRPORT CODE" FONT '6.Arial' JUSTIFY APS_CENTER
@115, 95 DCPS SAY "SERVICE GARANTEE" FONT '6.Arial' JUSTIFY APS_CENTER
@125, 14 DCPS SAY "32" FONT '36.Arial Bold' JUSTIFY APS_CENTER
@141,205 DCPS SAY "45333 4.0000426033411" FONT '6.Arial' JUSTIFY APS_RIGHT
@143, 8 DCPS SAY "Fold this Bill of Lading on the dotted line and insert it into the labelope. Attach a Bill of Lading to each package." ;
FONT '8.Arial Bold'
@112, 110 DCPS BARCODE "A7038238734" HEIGHT 64 THICKNESS 1 TYPE APS_BC39
FOR nLoop := 8 to 205 step 2
@ 140, nLoop, 140, nLoop + 1 DCPS LINE THICKNESS 1
NEXT nLoop
@157, 8 DCPS SAY "Description :" FONT '8.Arial Bold'
@ 160, 27, 160, 115 DCPS LINE THICKNESS 1
@162, 8 DCPS SAY "No Declared Value Entered in Software By Sender" FONT '8.Arial Bold'
@176,107 DCPS SAY "TRANSPORTATION CONDITIONS" FONT '8.Arial Bold' JUSTIFY APS_CENTER
@180, 8, 192, 205 DCPS TEXTBOX "1) " + cText FONT '7.Arial' THICKNESS 0
@193, 8, 205, 205 DCPS TEXTBOX "2) " + cText FONT '7.Arial' THICKNESS 0
@206, 8, 212, 205 DCPS TEXTBOX "3) " + cText FONT '7.Arial' THICKNESS 0
@213, 8, 216, 205 DCPS TEXTBOX "4) " + cText FONT '7.Arial' THICKNESS 0
@218, 8, 230, 205 DCPS TEXTBOX "5) " + cText FONT '7.Arial' THICKNESS 0
@231, 8, 238, 205 DCPS TEXTBOX "6) " + cText FONT '7.Arial' THICKNESS 0
@239, 8, 254, 205 DCPS TEXTBOX "7) " + cText FONT '7.Arial' THICKNESS 0
DCPS OFF
RETURN nil