No PDF File Generated

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
sooprcow
User
Posts: 15
Joined: Fri Oct 01, 2010 3:25 pm

No PDF File Generated

Post 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.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: No PDF File Generated

Post 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,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
sooprcow
User
Posts: 15
Joined: Fri Oct 01, 2010 3:25 pm

Re: No PDF File Generated

Post 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.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: No PDF File Generated

Post 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,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
sooprcow
User
Posts: 15
Joined: Fri Oct 01, 2010 3:25 pm

Re: No PDF File Generated

Post 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;
}
sooprcow
User
Posts: 15
Joined: Fri Oct 01, 2010 3:25 pm

Re: No PDF File Generated

Post by sooprcow »

Any update on this? Is there anything specific I should look for on the customers machine as far as permissions go?
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: No PDF File Generated

Post by Ivan - Tracker Software »

1. The method GetTempReportName() returns full file name including path?
2. m_pPDFPrinter still 'alive' when your report is printed?
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
sooprcow
User
Posts: 15
Joined: Fri Oct 01, 2010 3:25 pm

Re: No PDF File Generated

Post 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.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: No PDF File Generated

Post by Will - Tracker Supp »

Hi sooprcow

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

Cheers,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
sooprcow
User
Posts: 15
Joined: Fri Oct 01, 2010 3:25 pm

Re: No PDF File Generated

Post 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.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: No PDF File Generated

Post 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,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
sooprcow
User
Posts: 15
Joined: Fri Oct 01, 2010 3:25 pm

Re: No PDF File Generated

Post 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.
Attachments
PDFTmp.zip
PDF Temp Files
(1.6 MiB) Downloaded 168 times
sooprcow
User
Posts: 15
Joined: Fri Oct 01, 2010 3:25 pm

Re: No PDF File Generated

Post by sooprcow »

Have you guys had a chance to take a look at this yet?
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: No PDF File Generated

Post 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!
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
sooprcow
User
Posts: 15
Joined: Fri Oct 01, 2010 3:25 pm

Re: No PDF File Generated

Post by sooprcow »

Hey Will, just checking up to see if you guys have made any progress on the issue.

Thanks for the help!
sooprcow
User
Posts: 15
Joined: Fri Oct 01, 2010 3:25 pm

Re: No PDF File Generated

Post by sooprcow »

Is there any ETA on when you may have an answer?
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: No PDF File Generated

Post 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,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: No PDF File Generated

Post 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.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
sooprcow
User
Posts: 15
Joined: Fri Oct 01, 2010 3:25 pm

Re: No PDF File Generated

Post by sooprcow »

What would it take to get the debug version of the driver on that machine to get those logs?
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: No PDF File Generated

Post 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.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
Post Reply