PDF XChange 4.0 and Clarion Report Writer

This Forum is for the use of Clarion For Windows - Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators

Post Reply
Bradnams
User
Posts: 26
Joined: Fri Jan 21, 2005 2:30 am
Location: Australia
Contact:

PDF XChange 4.0 and Clarion Report Writer

Post by Bradnams » Tue Sep 15, 2009 7:45 am

Hi,

I have just gone through the process of upgrading from version 3.6 to version 4.0.162.0. Have found a few issues, one of which I'm unable to resolve as it produces a runtime error in your dll. I have used one of your example apps to create two of my own example apps as proof of the issue. I'm trying to print a report writer report using the code template and it work fine with no Frame but it will fail if the app includes a Frame. I have named the working version main_good and the failed example main_bad.

I'm currently using Clarion PE version 6.3.9055 with the Clarion (CW legacy) template chain and PDF Tools and XChange version 4.0 (only downloaded late last week.) Let me know if you require any more supporting information to resolve the issue.

2. I have also noticed that the template will not define the required local variables for a WINDOW procedure template, it looks as though it's only been defined for the ABC templates and will only work for CW REPORT procedure templates.

3. I can't remember which template it was (PDF Tools or X-Change Driver) but they referenced the wrong equate name in the tsp.lics.inc file. I have since changed this to get my program working, I'm pretty sure it's the X-Change driver pxcdrv40.tpl.

Regards

Andrew Crockett
Attachments
Clarion_Example.zip
Examples to assist with issue
(50.93 KiB) Downloaded 217 times
Last edited by Bradnams on Tue Sep 15, 2009 10:42 pm, edited 1 time in total.

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13428
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PDF XChange 4.0 and Clarion Report Writer

Post by Tracker Supp-Stefan » Tue Sep 15, 2009 11:21 am

Hello Andrew,

I have passed your problem to the Clarion guys in our team and you should receive an answer from them shortly.

Regards,
Stefan

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: PDF XChange 4.0 and Clarion Report Writer

Post by Tracker - Clarion Support » Tue Sep 15, 2009 3:24 pm

Hi Andrew!

I'll try to get at this later today.

We are revamping the Clarion Installers and that may have a bearing on your problems.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: PDF XChange 4.0 and Clarion Report Writer

Post by Tracker - Clarion Support » Tue Sep 15, 2009 6:04 pm

Hi Andrew!

I checked out the issue and am going to have to send it up the line to our developer team for the Printer Driver itself for their perusal.

Sorry for the delay!
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Bradnams
User
Posts: 26
Joined: Fri Jan 21, 2005 2:30 am
Location: Australia
Contact:

Re: PDF XChange 4.0 and Clarion Report Writer

Post by Bradnams » Mon Sep 21, 2009 4:43 am

Hi Craig,

Just following up on the issue I posted, are you able to provide any estimates on a resolution?

I'm considering whether to continue with implementing version 4.0 or persist with version 3.6 for now.

Regards

Andrew Crockett

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: PDF XChange 4.0 and Clarion Report Writer

Post by Tracker - Clarion Support » Mon Sep 21, 2009 2:17 pm

Hi Andrew!

I just got an email from the Printer Driver guys this morning, but haven't had a chance to pursue it yet. I should get to it later today.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: PDF XChange 4.0 and Clarion Report Writer

Post by Tracker - Clarion Support » Tue Sep 22, 2009 8:04 pm

Hi Andrew!

We have tracked down the source of your problem.

According to the developer who examined the code, "It seems that the APPLICATION object makes something strange [sic] that causes error in CoCreateInstance() function used in pxcdrv40.dll."

Attached are replacement files that should fix your problem; a new installer of the PDF-Driver should be available later this week.
Attachments
CoInitializeFix.zip
Modified Class, pxcdrv40.dll, and pxcdrv40.lib files
(57.18 KiB) Downloaded 223 times
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Bradnams
User
Posts: 26
Joined: Fri Jan 21, 2005 2:30 am
Location: Australia
Contact:

Re: PDF XChange 4.0 and Clarion Report Writer

Post by Bradnams » Wed Sep 23, 2009 6:03 am

Hi Craig,

I thank you for your quick response to my issue. I have updated my files with the files included in the attached zip. It no longer comes up with the runtime error when run. The PDF prints but still has the demo watermarks when I print from my application. I have tested the new files in the examples I sent to you last time but they work fine and print without the demo watermark.

I thought it may have something to do with the PDFPrinter40_class.clw Init procedure, as it refers to PDFPRINTER40_LicenseKey and PDFPRINTER40_DevCode equates which I had not defined in my license file. I had to add these in the tsp_lics file to get it to compile.

I'm working on an example that will show the problem but my application consists of 30+ dll's and a host of 3rd Party Add'ons. It's proving a little difficult to isolate. Do you have any suggestions as to why it prints the demo watermarks?

Below is the code I'm using to generate the report;

Code: Select all

      
          ReportLibrary  = CLIP(GLO:TEMP_DIRECTORY) & 'REPORT7.TXR'
          PDFFileName    = CLIP(GLO:TEMP_DIRECTORY) & CLIP(ReportName) & '_'&CLIP(format(today(),@D12))&'_'&CLIP(format(clock(),@n_7)) & '.pdf'

          PXCDRV4_2:rtn = PXCDRV4_2.Init()
          PXCDRV4_2:rtn = PXCDRV4_2.GetPrinter('', 'PDF-XChange Driver 4.0')
          PXCDRV4_2:rtn = PXCDRV4_2.GetPrinterName(PXCDRV4_2:prtName)
          PXCDRV4_2.ResetDefaults()
          PXCDRV4_2.SetGeneral(PXCDRV40_PDF_SPEC_AUTO, PXCDRV40_PAGE_LAYOUT_DEFAULT, PXCDRV40_PAGE_MODE_DEFAULT, PXCDRV40_FULL_MODE_DEFAULT, PXCDRV40_MAG_TYPE_DEFAULT, 100, 1, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE)
          PXCDRV4_2.SetPaperLayout(PXCDRV40_LAYOUT_NORMAL, FALSE, FALSE, PXCDRV40_PAPER_AUTO, , )
          PXCDRV4_2.SetPaperNormal(0, 0, 1000, FALSE, TRUE)
          PXCDRV4_2.SetSave(PXCDRV40_SAVETYPE_SAVEPDF, FALSE, , PDFFileName, TRUE, PXCDRV40_WHENEXISTS_WARNING, , , TRUE, FALSE, , '%f')
          PXCDRV4_2.SetSaver(FALSE)

          PXCDRV4_2.ApplyOptions()
          PXCDRV4_2:RE.LoadReportLibrary(ReportLibrary) ! load report library
          ! Set User Variables
          PXCDRV4_2:RE.SetVariable('User_ID', Id)
          PXCDRV4_2:RE.SetVariable('Date_Today', TODAY())
          PXCDRV4_2:RE.SetVariable('Company_Name', CLIP(GetSystemVar(SysVar:QNAME)))
          PXCDRV4_2:RE.SetVariable('Co_Address_1', CLIP(GetSystemVar(SysVar:QADDRESS1)))
          PXCDRV4_2:RE.SetVariable('Co_Address_2', CLIP(GetSystemVar(SysVar:QADDRESS2)))
          PXCDRV4_2:RE.SetVariable('Co_Address_3', '')
          PXCDRV4_2:RE.SetVariable('Company_Phone', CLIP(GetSystemVar(SysVar:QPHONE)))
          PXCDRV4_2:RE.SetVariable('Company_Fax', CLIP(GetSystemVar(SysVar:QFAX)))
          PXCDRV4_2:RE.SetVariable('Company_Logo', CLIP(GetSystemVar(SysVar:COMPANYLOGO)))
          PXCDRV4_2:RE.SetVariable('Company_ACN', '')
          PXCDRV4_2:RE.SetVariable('OE_Rent_Text', '')
          PXCDRV4_2:RE.SetVariable('Cutt_Id', CuttingId)
          PXCDRV4_2:RE.SetVariable('Cutting_Id', CuttingId)
          PXCDRV4_2:RE.SetVariable('CompanyTaxName', CLIP(GetSystemVar(SysVar:COMPANYTAXNAME)))
          PXCDRV4_2:RE.SetVariable('CompanyABN', CLIP(GetSystemVar(SysVar:COMPANYABN)))
          PXCDRV4_2:RE.SetVariable('GSTExceptionText1', CLIP(GetSystemVar(SysVar:GSTEXCEPTIONTEXT1)))
          PXCDRV4_2:RE.SetVariable('GSTExceptionText2', CLIP(GetSystemVar(SysVar:GSTEXCEPTIONTEXT2)))
          PXCDRV4_2:RE.SetVariable('Batch_Number', BatchNumber)
          PXCDRV4_2:RE.SetVariable('Truck_Number', TruckNumber)
          PXCDRV4_2:RE.SetVariable('ReportGroup', CLIP(ReportGroup))
          PXCDRV4_2:RE.SetVariable('Required_Date', RequiredDate)
      
          PXCDRV4_2:RE.SetPrinter(PXCDRV4_2.GetPrinterName())
          PXCDRV4_2:RE.PrintReport(ReportName)       ! print report
Regards

Andrew Crockett

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: PDF XChange 4.0 and Clarion Report Writer

Post by Tracker - Clarion Support » Wed Sep 23, 2009 3:43 pm

Hi Andrew!
I thought it may have something to do with the PDFPrinter40_class.clw Init procedure, as it refers to PDFPRINTER40_LicenseKey and PDFPRINTER40_DevCode equates which I had not defined in my license file. I had to add these in the tsp_lics file to get it to compile.
PDFPRINTER40_LicenseKey and PDFPRINTER40_DevCode have to be defined with key values in tsp_lics.inc, but I understand you've done that.

What puzzles me is if the small demo you sent me does NOT print demo watermarks but your main program does.

Please double check for the presence of more than one tsp_lics.incfile, especially in the folders containing your app and dct files that you compile from. You may be picking up the wrong tsp_lics.inc file.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Post Reply

Return to “PDF-XChange Drivers (only) API SDK - For Clarion For Windows Developers only Please”