PML export to PDF

Is there a way to export data from a LIST to a PDF file?

  • Hello Payman,

    first your list must be an array.  You can collect and add things to the array.  Then use code similar to below to put it into a csv file.  something like the below code

     !thislineout = Array()
     !thislineout.APPEND('column 1' & ',' & 'column 2' & ',' & 'column 3')
     var !SPCcollect Coll all SPEC
     VAR !CURRY NAMN
     DO !x index !SPCcollect
       $!SPCcollect[$!x]
         VAR !UNM NAMN
         VAR !OWN FULLNAME OF OWNER
         VAR !ABL PURPOSE
         !thislineout.append(!UNM & ',' & !OWN & ',' & !ABL )
    Enddo
    
    !OutPut = object FILE('c:\temp\convertlisttopdf.csv')
    !OutPut.writeFile('OVERWRITE',!thislineout) 
    !OutPut.Close()
    
    

    After that you can use the syscom command to use your PDF software to convert it to PDF.  

    something like this.  I may have the apostrophes wrong here, I use this for the ribbon buttons.  You can get the syntax for SYSCOM command.  you will need to swap out for whatever PDF software you have that can convert or print to pdf. 

    SYSCOM start acrobat.exe /b 'acrobat.exe' 'c:\temp\convertlisttopdf.csv'