I would think this would merge the document being created to c:\ecompad.pdf. So how come this doesn't work? I get OLE error code 0x80020006: Unknown name.
Code: Select all
* --- Print Cycle
SET PRINT ON
SET DEVI TO PRINT
pdf=CREATEOBJECT("cdintf.cdintf")
pdf.driverinit("Amyuni PDF Converter")
pdf.filenameoptions=1+2+16+128
*pdf.filenameoptions=1+2+16+128+64
pdf.defaultfilename="c:\test.pdf"
*pdf.setwatermark("Testing", "Arial", 32, 0, 255, 100, -100, .F.)
SET PRINTER TO NAME "Amyuni PDF Converter"
SET MEMOWIDTH TO 80
* --- Print Page Header
SET PRINTER FONT 'Arial',14 STYLE "B"
@ 1,80 say '____'
SET PRINTER FONT 'Arial',12
@ 3,10 SAY 'Account #: 1234567890'
@ 3,75 SAY 'Invoice #: 123456'
SET PRINTER FONT 'Arial',12 STYLE "B"
@ 3,93 say '_____'
SET PRINTER FONT 'Arial',12
@ 4,10 SAY 'Page 1'
@ 4,75 SAY 'Bill Date: 01/01/1980'
@ 10,19 SAY 'Homer Simpson'
@ 11,19 SAY '59 Evergreen Terrace'
@ 12,19 SAY 'Springfield'
SET PRINTER FONT "Arial",10
@ 21,35 SAY "Plus Payments"
@ 21,60 SAY "Less"
@ 21,85 SAY "Ending"
EJECT
pdf.merge("c:\ecompad.pdf",.F.)
.
.
.