Page 1 of 1

No PDF File Generated

Posted: Thu Apr 23, 2015 3:27 pm
by sooprcow
Hi there, we've been using PDF-XChange 4.0 Build 195 to generate PDF files for a couple years now years now and have recently run into a new problem on a customer's machine. The Driver instance that we instantiate at run time is successfully created but when we send a document to it the file does not generate but also raises errors. After getting on the customer's machine and using Procmon I discovered that the file is actually being created but not in the location that we specified. It's being placed in c:\windows\system32\untitled.pdf. This is on a Windows 7 32bit machine. I've checked a few folder permissions on the machine and the customer actually has "Everyone" full access on both the location where the driver is installed and location where the PDF file is suppose to go.

Any insight on what to look for on this customer's machine would be greatly appreciated. Thanks.

Re: No PDF File Generated

Posted: Thu Apr 23, 2015 3:29 pm
by Will - Tracker Supp
Hi sooprcow

Thanks for the post - you're using a very old version, so please test the latest version and build of the API SDK (V5.5 build 312.1) and see if that helps:
https://www.pdf-xchange.com/downloads

Thanks,

Re: No PDF File Generated

Posted: Thu Apr 23, 2015 3:36 pm
by sooprcow
Unfortunately using a new version is just not an option for us. This is a fairly large product and would require a pretty significant effort. All I'm really looking for is some sort of guidance on what to look for on our customer's machine.

Re: No PDF File Generated

Posted: Thu Apr 23, 2015 3:56 pm
by Will - Tracker Supp
Hi sooprcow,

Could you please send us a small sample app to test with here, as well as provide details on the user's environment and steps to reproduce the issue?

Cheers,

Re: No PDF File Generated

Posted: Fri Apr 24, 2015 3:47 pm
by sooprcow
Hey Will, as far as the customers machine goes I'm not sure what more I could give you that is relevant other than its a Windows 7 32bit Enterprise install. He is on a corporate domain and thus may have some restricted permissions. As far as the test app goes it would be pretty difficult for me to extract that code out entirely. It is an MFC app. I have included a stripped down (no logging) version of how we create the driver instance bellow. Also, if it would be helpful I could e-mail you the PROCMON log file that I have.

Code: Select all

bool TrackerPDFImageDriver::CreateDriverInstance(const char *szDriverInstName /*= NULL*/)
{
   PXC::IPXCControlExPtr pFactory = NULL;
   UMCPPLogger logger;

   if (!m_pPDFPrinter)
   {
      try
      {
         pFactory = PXC::IPXCControlExPtr(__uuidof(PXC::CPXCControlEx));
         if (pFactory == NULL)
         {
            return false;
         }
      }
      catch(_com_error& e)
      {
         return false;
      }

      if (szDriverInstName != NULL)
         m_sDriverName = szDriverInstName; // override the default pdf driver name

      try
      {
         _bstr_t bstrDriverName = (const char*)GetStaticDriverName();
         m_pPDFPrinter = pFactory->GetPrinter(_bstr_t(""), bstrDriverName,_bstr_t("****-CODE-STRIPPED-BECAUSE-PUBLIC-*****"), _bstr_t("***********"));
         if (m_pPDFPrinter == NULL)
         {
            return false;
         }
      }
      catch(_com_error& e)
      {
         return false;
      }

      try
      {
         m_sDriverName = (const char*)m_pPDFPrinter->GetName();
      }
      catch(_com_error& e)
      {
         return false;
      }

      try
      {
         m_pPDFPrinter->ResetDefaults();
         m_pPDFPrinter->Option[_bstr_t(L"Save.SaveType")]            = _variant_t("Save");
         m_pPDFPrinter->Option[_bstr_t(L"Save.ShowSaveDialog")]      = _variant_t("No");
         m_pPDFPrinter->Option[_bstr_t(L"Save.File")]                = _variant_t((const char*)GetTempReportName());
         m_pPDFPrinter->Option[_bstr_t(L"Save.WhenExists")]          = _variant_t("Overwrite");
         m_pPDFPrinter->Option[_bstr_t(L"Save.RunApp")]              = _variant_t(0);
         m_pPDFPrinter->Option[_bstr_t(L"Overlay.Enabled")]          = _variant_t(0);
         m_pPDFPrinter->Option[_bstr_t(L"Compression.Graphics")]     = _variant_t(1);
         m_pPDFPrinter->Option[_bstr_t(L"Compression.Text")]         = _variant_t(1);
         m_pPDFPrinter->Option[_bstr_t(L"Fonts.EmbedAll")]           = _variant_t(0);
         m_pPDFPrinter->Option[_bstr_t(L"Saver.ShowProgress")]       = _variant_t(0);
         m_pPDFPrinter->Option[_bstr_t(L"Paper.LayoutType")]         = _variant_t(0);
         m_pPDFPrinter->Option[_bstr_t(L"Paper.Fit")]                = _variant_t(GetPDFFit());
         m_pPDFPrinter->Option[_bstr_t(L"Paper.PageScale")]          = _variant_t(GetPDFPageScale());
         m_pPDFPrinter->ApplyOptions(0);
      }
      catch(_com_error& e)
      {
         return false;
      }
   }

   if(pFactory != NULL)
   {
      pFactory.Release();
      pFactory = NULL;
   }
   
   return true;
}

Re: No PDF File Generated

Posted: Mon Apr 27, 2015 4:08 pm
by sooprcow
Any update on this? Is there anything specific I should look for on the customers machine as far as permissions go?

Re: No PDF File Generated

Posted: Mon Apr 27, 2015 5:30 pm
by Ivan - Tracker Software
1. The method GetTempReportName() returns full file name including path?
2. m_pPDFPrinter still 'alive' when your report is printed?

Re: No PDF File Generated

Posted: Mon Apr 27, 2015 5:56 pm
by sooprcow
Ivan - Tracker Software wrote:1. The method GetTempReportName() returns full file name including path?
2. m_pPDFPrinter still 'alive' when your report is printed?
1. Yes, it returns the fully qualified path and file name.
2. Yes, in fact it is a static variable that lives through the lifetime of the application.

Re: No PDF File Generated

Posted: Mon Apr 27, 2015 7:39 pm
by Will - Tracker Supp
Hi sooprcow

Thanks for the post - could you please send TMP files for us to check here?

Cheers,

Re: No PDF File Generated

Posted: Tue Apr 28, 2015 3:16 pm
by sooprcow
Will - Tracker Supp wrote:Hi sooprcow

Thanks for the post - could you please send TMP files for us to check here?

Cheers,
Since this is on a customer's machine it may take me a couple days to get on the customer's machine and remote in to retrieve the files. That said, my understanding is that the TMP file gets deleted when the PDF is done being created. In fact I see it doing just that in the procmon log. Once it's done writing the final PDF to "C:\windows\System32\Untitled.pdf" it deletes "pdf1D27.tmp" from them user's %temp% directory.

Re: No PDF File Generated

Posted: Fri May 01, 2015 8:06 pm
by Will - Tracker Supp
Hi sooprcow,

You should be able to have the TMP files kept by following the steps outlined here:
https://www.pdf-xchange.com/knowledgeba ... e-an-issue

Cheers,

Re: No PDF File Generated

Posted: Tue May 05, 2015 5:49 pm
by sooprcow
Hey Will, I was able to get those temp files from our customer's machine today. I have attached them to this post.

Re: No PDF File Generated

Posted: Wed May 06, 2015 5:23 pm
by sooprcow
Have you guys had a chance to take a look at this yet?

Re: No PDF File Generated

Posted: Wed May 06, 2015 8:26 pm
by Will - Tracker Supp
Hi sooprcow,

I'm afraid not yet, I've only just been made aware of the post. I've passed this along to the Dev. Team for further investigation.

Thanks for the patience!

Re: No PDF File Generated

Posted: Fri May 08, 2015 5:35 pm
by sooprcow
Hey Will, just checking up to see if you guys have made any progress on the issue.

Thanks for the help!

Re: No PDF File Generated

Posted: Thu May 14, 2015 3:05 pm
by sooprcow
Is there any ETA on when you may have an answer?

Re: No PDF File Generated

Posted: Fri May 15, 2015 9:47 pm
by Will - Tracker Supp
Hi sooprcow,

Apologies for the delay - I've just badgered one of the Devs. about this and hope to have an answer for you today.

Cheers,

Re: No PDF File Generated

Posted: Fri May 15, 2015 9:54 pm
by Ivan - Tracker Software
I cannot reproduce the issue on my side and the .tmp file you sent shows that files should be stored in "C:\Mitchell\aces\report.pdf".
The only possible solution I might see now is to use a debug version of the driver and get logs from it to see what is going on during saving the document.

Re: No PDF File Generated

Posted: Mon May 18, 2015 3:39 pm
by sooprcow
What would it take to get the debug version of the driver on that machine to get those logs?

Re: No PDF File Generated

Posted: Tue Jul 07, 2015 5:51 pm
by John - Tracker Supp
Apologies for the delay - can you advise if this is still an issue and we will respond accordingly ASAP.

Thanks for your patience.