-1

I want to create and write in file's PDF.

my code :

fCrée("C:\Mes Sites\COBRA_22\Courrier\test.pdf")
fOuvre("C:\Mes Sites\COBRA_22\Courrier\test.pdf",foAjout)
fSauveTexte("C:\Mes Sites\COBRA_22\Courrier\test.pdf","ok")

But this code does'nt work !

Thank for your help :)

zbeb
  • 57
  • 1
  • 8

2 Answers2

0

This functions are not for create a PDF, you must look into this documentation for create a PDF from a report with windev.

Bidjes
  • 166
  • 4
  • 10
0

As sayed Bidjes answer the easiest way to create pdf is to use report,

you'll have to create fields into your report an link them to a database or global variables.

here's an example (with global variables) :

Report : The report

English Version :

gsHeader = "This is a title !"
gsBody = "This is a simple text."
iPreview(iPDF, "PATH_AND_NAME.pdf")
iPrintReport(REPORT_test)

French version :

gsTitre = "C'est un titre !"
gsContenu = "C'est un simple texte."
iAperçu(iPDF, "CHEMIN_ET_NOM.pdf")
iImprimeEtat(ETAT_test)

Result : The pdf created

Alexi Courieux
  • 92
  • 2
  • 11