Forum Discussion

tmahender12's avatar
tmahender12
Frequent Contributor
8 years ago

Saving a pdf file using Testcomplete

Hi,

 

in my application when i click preview a pdf file opens, how can i save the pdf file?, as iam not able recognize the pdf file.,

after saving i have to find text in that pdf..i could do this using pdfbox libraries.

 

 

I need help in saving pdf file ?...that it opened from my application

6 Replies

  • Use Below

     

    Sys.Keys("^s")  NOTE:Pdf PreviewWindow is infocus

     

    By Pressing the Key,we can get save as popup window

     

    so we can save it.

     

    Regards,

    Karthick Raj P

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      The problem with just using Sys.Keys() is that it depends upon the RIGHT window being in focus.

      Map your preview window or otherwise access it and send the Keys method to that window...

      ...this is assuming that the application opens up your PDF in a standard PDF preview window and it's not embedded in some other frame or something.  If the PDF is displayed in some other frame, you might need to use some other method to do the save.  That is dependent upon the application implementation.  Without knowing more about your AUT, we can't give specific answers.

      • tmahender12's avatar
        tmahender12
        Frequent Contributor

        my application is a desktop application, once a client files a tax return, he has option to generate pdf, now I need to save pdf in a location,iam not able to object spy the pdf window,test complete hangs while object spy on pdf.

         

        iam using test complete 9.3

         

        any other extensions available to handle this.