1 Reply Latest reply on Jul 29, 2011 12:53 PM by MichaelKazlow

    How can I batch print using OLE and AcroPDF.PDF Methods?


      I'm using an OLE object in my Powerbuilder 12 application to display and print a group of files that are in the same folder. My code below does what I want in debug mode, only because I can slow down the call to the two methods, LoadFile and PrintAll.    When I try to execute normally, the LoadFile and the PrintAll methods are too fast ( I think because they are asynchronous.)  What happens is only the last file in the array will print.  What other methods are available in this class???  Any other suggestions? 


      //Using a string array of the file paths, load ole_1 with the PDF and Print it to the default printer.


      ls_pdf_list = {"C:\audit_temp\form_one.pdf", "C:\audit_temp\form_two.pdf"}


      for int = 1 to 2

      ole_1.LoadFile(ls_pdf_list[i])  //ole_1 is a PDF Reader OLE