title: PDFCreator will print TIFF instead of PDF
body: <p>I am trying to convert a RTF document to PDF. I have this code:</p>
  
  <pre><code>// TestCOMPDF.cpp : Defines the entry point for the console application.
  //
  
  #include &lt;windows.h&gt;
  #include &lt;tchar.h&gt;
  #include &lt;objbase.h&gt;
  #include &lt;atlbase.h&gt;
  
  #import "MSVBVM60.DLL" rename ( "EOF", "VBEOF" ), rename ( "RGB", "VBRGB" ) //if you don't use this you will be in BIG trouble
  #import "PDFCreator.exe" 
  
  int _tmain(int argc, _TCHAR* argv[])
  {
  
   CoInitialize(NULL);
   {
  
    CComPtr&lt;PDFCreator::_clsPDFCreator&gt; pdfObject;
    HRESULT hr = pdfObject.CoCreateInstance(L"PDFCreator.clsPDFCreator");
    pdfObject-&gt;cStart("/NoProcessingAtStartup", 1);
  
    PDFCreator::_clsPDFCreatorOptionsPtr opt = pdfObject-&gt;GetcOptions();
  
    opt-&gt;UseAutosave = 1;
    opt-&gt;UseAutosaveDirectory = 1;
    opt-&gt;AutosaveDirectory = "c:\\temp\\";
    opt-&gt;AutosaveFormat = 0; // for PDF
    opt-&gt;AutosaveFilename = "gigi13";
    pdfObject-&gt;PutRefcOptions(opt);
    pdfObject-&gt;cClearCache();
    _bstr_t DefaultPrinter = pdfObject-&gt;cDefaultPrinter;
    pdfObject-&gt;cDefaultPrinter = "PDFCreator";
    hr = pdfObject-&gt;cPrintFile("c:\\temp\\RTF\\garage.rtf");
  
    pdfObject-&gt;cPrinterStop = false;
  
    while(true)
    {
     printf("sleep\n");
     Sleep(1000);
     if(pdfObject-&gt;cCountOfPrintjobs == 0)
      break;
    }
  
    printf("done\n");
  
    pdfObject-&gt;cPrinterStop = true;
  
    pdfObject-&gt;cDefaultPrinter = DefaultPrinter;
   }
  
   CoUninitialize();
  
   return 0;
  }
  </code></pre>
  
  <p>When running this code sample instead of creating directly the PDF it prompts me with a Save dialog offering me the option to the output only with the option of choosing a TIFF file (which is not wanted). Can someone point me into the right direction or offer some suggestions?</p>
  
  <p>Thanks,</p>
  
  <p>Iulian</p>