Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a PDF
Message
De
06/02/2001 12:45:14
Gene Maddox
Silver Creek Technologies
Johnson City, Tennessie, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Creating a PDF
Divers
Thread ID:
00473009
Message ID:
00473009
Vues:
50
Hello all,
  I just installed Adobe Acrobat 4.0 on my machine. I am trying to create a PDF
using code posted earlier on the UT by Houston Brennan and Nadya Nosonovsky.
The problem is, I get an error on the following line of code.

iInitialize = PDFMonInitialize()

The error states -

Cannot find entry point PdfMonInitialize in the DLL.

Can anyone help me out. Below is the rest of the code. Thanks in advance.

*****************************************************************************
* Description: CreatePDF - creates PDF for a specified filename
* Calling Samples: CreatePDF('c:\temp\temp.pdf')
* Parameter List: tcFileName
* Created by: Houston Brennan 06/12/2000
* Modified by: Nadya Nosonovsky 06/16/2000
*****************************************************************************
PROCEDURE CreatePDF

LPARAMETERS tcFileName

IF EMPTY(tcFileName)
	tcFileName = "c:\windows\temp\tempfile.pdf" && Hardcoded Name
ENDIF

LOCAL cPdfDllFile, lcOldSafety, iInitialize, iIsNT, cPdfWriter, ;
		cPort, iInstalled, iDoPrompt, iSetFileName
		
lcOldSafety = SET("safety")
* cPdfDllFile = "c:\Program Files\Adobe\Acrobat 4.0\Macros\Office95\PDFMon.DLL" && or locate this DLL
* Randy's Fill In - Find the pdf DLL
* Pass - File name to find
* 		 Drive to search
*		 True to search entire network which overrides the drive to search parameter
SET PROCEDURE TO FindFileInNetwork ADDITIVE
cPdfDllFile = FindFileInNetwork("pdfmon.dll","c:\",.T.)
* End Fill In Code

IF NOT FILE(cPdfDllFile)
	MESSAGEBOX("Required Acrobat Writer DLL is not found." + ;
				CHR(13) + "Continue printing to default printer...")
	RETURN .T.
ENDIF

CLEAR DLLS

DECLARE INTEGER PdfMonInitialize in (cPdfDllFile)
DECLARE INTEGER PdfMonIsOSNT in (cPdfDllFile)
DECLARE INTEGER IsPdfWriterInstalled in (cPdfDllFile) ;
	STRING@cPdfWriterName, STRING@cPort
DECLARE INTEGER PdfMonDoPrompt in (cPdfDllFile) ;
	INTEGER iWhichProgram
DECLARE INTEGER PdfMonSetPrompt in (cPdfDllFile) ;
	INTEGER iWhichProgram, INTEGER iNewValue
	
#DEFINE SETPROMPTOFF 0
#DEFINE SETPROMPTON 1

DECLARE INTEGER PdfMonSetOutputFileName in (cPdfDllFile) ;
	STRING cFileName
DECLARE INTEGER PdfMonCleanup in (cPdfDllFile)

iInitialize = PdfMonInitialize()
iIsNT = PdfMonIsOSNT()

SET SAFETY OFF

cPdfWriter = SPACE(100)
cPort = SPACE(100)
iInstalled = IsPdfWriterInstalled(@cPdfWriter, @cPort)

IF iInstalled = 1 && Pdf Writer is installed
	SET PRINTER TO NAME 'Acrobat PDFWriter'
ENDIF

iDoPrompt = PdfMonDoPrompt(SETPROMPTOFF)
iSetFileName = PdfMonSetOutputFileName(tcFileName)

CLEAR DLLS

IF lcOldSafety = "ON"
	SET SAFETY ON
ENDIF

RETURN .T.

ENDPROC
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform