Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
URGENT: PDFCreator
Message
De
23/09/2013 11:06:16
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
URGENT: PDFCreator
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01583899
Message ID:
01583899
Vues:
284
Need to convert application to Windows 7 and PDFCreator is available in the company image.
The function below supposed to output report to PDF:
FUNCTION PrintPDFReport
	LPARAMETERS lcReport, lcOutputFile, lcExtraReportClauses
	LOCAL lcOldPrinter

	* save old printer, will be restored in the end of routine
	lcOldPrinter = SET("printer",2)
	* create object of the class
	oPDFC  = CREATEOBJECT("PDFCreator.clsPDFCreator","pdfcreator")
	* setup class parameters
	oPDFC.cStart("/NoProcessingAtStartup")
	oPDFC.cOption("UseAutosave") = 1
	oPDFC.cOption("UseAutosaveDirectory") = 1
	oPDFC.cOption("AutosaveFormat") = 0
	* select PDFCreator as a default printer
	DefaultPrinter = oPDFC.cDefaultprinter
	oPDFC.cDefaultprinter = "PDFCreator"
	oPDFC.cClearCache
	ReadyState = 0
	oPDFC.cOption("AutosaveFilename") = JUSTFNAME(lcOutputFile)
	oPDFC.cOption("AutosaveDirectory") = JUSTPATH(lcOutputFile)+'\'
	oPDFC.cprinterstop=.F.

	lcExtraReportClauses=IIF(EMPTY(lcExtraReportClauses),"",lcExtraReportClauses)

	REPORT FORM (lcReport) &lcExtraReportClauses TO PRINTER NOCONSOLE

	INKEY(5)
	* restore the old printer
	SET PRINTER TO NAME (lcOldPrinter)
	oPDFC.cDefaultprinter = DefaultPrinter
	oPDFC.cClearCache
	oPDFC.cClose()
	RELEASE oPDFC
ENDFUNC
Questions: 1. Should I redirect to PDFConvert printer using SET PRINTER TO PDFConvert?
2. When I need to convert multiple file, it only converts the 1st file.

Any thoughts? Did somebody use successfully PDF Convert? Any other solutions that I can easily implement (IT folks push the upgrade)?
Thanks in advance
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform