<< Click to Display Table of Contents >> Source procedure |
!!! Generated from procedure template - Source
MainSrc PROCEDURE ! Declare Procedure
pdfMaker CLASS(TPDFMake)
Run PROCEDURE()
TakePDFFile PROCEDURE(STRING pFile), DERIVED, PROTECTED, STRING, PROC
END
CODE
!- load script
pdfMaker.Load('.\PdfMake\EasyPDFMaker.html')
!- create pdf
pdfMaker.Run()
!- pdfMaker methods
pdfMaker.Run PROCEDURE()
dd TDocDefinition
CODE
!- Build DocDefinition object
dd.BeginContent()
dd.AddText('Hello world!')
dd.EndContent()
!- set pdf file name
SELF.pdfFile = 'test.pdf'
!- Invoke "fnGetPDF" script, passing DocDefinition object as an argument
PARENT.Run('fnGetPDF', dd)
pdfMaker.TakePDFFile PROCEDURE(STRING pFile)
loc:errMsg ANY
CODE
!- open 'PDF' associated program
ezh::ShellExec(pFile)
RETURN PARENT.TakePDFFile(pFile)