Neevia Technology Sites:   www.neevia.com  |  docuPub.com  |  www.neeviaPDF.com
:: Home :: Products :: Technical Support :: About Us :: Contact Us
Technical support > Neevia Document Converter Pro code samples
Example 2: How to convert a file (submitFileEx method) from C#  Print Example 
Add a reference in your Visual Studio project to docConverter library.
To do this:
        a. On the Project menu, click Add Reference;
        b. On the COM tab, locate docConverter Library and then click Select;
        c. Click OK in the Add References dialog box to accept your selections.
  string fileToConvert = @"c:\test.doc";

  Neevia.docConverter DC = new Neevia.docConverter();

  DC.setParameter("DocumentOutputFormat", "PDF");
  DC.setParameter("PDFAutoRotatePage", "All");

  int rv;
  rv = DC.submitFileEx(fileToConvert,@"c:\docs\out",@"c:\docs\error",@"c:\docs\orig");

  if (rv != 0) {
     MessageBox.Show(" *** submitFileEx error **** ");
  } else {

    rv = 2;
    while (rv == 2)
    {
      rv = DC.checkStatusEx(fileToConvert,@"c:\docs\out",@"c:\docs\error");
      Application.DoEvents();
      DC.doSleep(1000);
    }

    if (rv == 0) {
      MessageBox.Show("Converted successfully");
    } else {
      MessageBox.Show("Error converting");
    }
  }



Copyright © 1999-2016 Neevia Technology. All Rights Reserved. Home | Products | Technical Support | About Us | Contact Us