NetTalk Central

Author Topic: PDF Report using EE  (Read 5174 times)

wkim

  • Newbie
  • *
  • Posts: 7
    • View Profile
PDF Report using EE
« on: July 23, 2007, 03:17:31 PM »
I am having diffculty receiving a PDF report generated by Example 13.
The PDF file is generated but when it arrives on IE browser
it show this:(please see the attached)

In the example app, the file is generated without any problem.
    (loc:PDFName = '$$$' & format(random(1,99999),@n05) &'.pdf')

The setting on IE browser can receive files.  I am able to receive and
display other PDF files.

Thank you for your help.
Wesley Kim
 



[attachment deleted by admin]
« Last Edit: July 23, 2007, 03:20:14 PM by wkim »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: PDF Report using EE
« Reply #1 on: August 01, 2007, 12:49:49 AM »
Hi Wesley,

If you run it in Firefox what happens?

What version of IE & NetTalk are you using?

Cheers
Bruce

wkim

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: PDF Report using EE
« Reply #2 on: August 02, 2007, 06:02:03 AM »
Hi Bruce,

I don't have Firefox on my machine so I don't know what happens.

I am using IE 7 and Nettalk Version 4.28.

Thank you.
Wesley


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: PDF Report using EE
« Reply #3 on: August 02, 2007, 07:34:52 AM »
Hi Wesley,

It's probably a good ideal to install firefox so we can tell if the problem is in the server or the browser.

You can get it from www.getfirefox.com

You don't need to make it your default browser - you can have both Firefox and IE on the same machine without any problems.

Cheers
Bruce

wkim

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: PDF Report using EE
« Reply #4 on: August 02, 2007, 09:26:37 PM »
Hi Bruce,

I took your advise and installed a copy of Firefox but the result is same.
Please see the attached image.

Anyone who ran example 13 successfully, can you please help?

Thank you.
Wesley Kim

p.s. I've ran the example 13 unmodified.

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: PDF Report using EE
« Reply #5 on: August 02, 2007, 10:40:37 PM »
Hi Wesley,

I just re-tried the example here and it seems to be ok.
But it occurs to me that maybe the file didn't convert to being a pdf. That would give the result you're getting. It'd do this is the PDF template isn't registered.

So here's what you need to do.
a) re-install nettalk, so that the example app is restored to shipping state.
b) open the app in your Clarion.
c) look _very_ carefully for any messages as you open the app. Things like "xxx template is not registered". If you do find any write them down, and post them here.

My guess at this point is that the PDF stuff is missing.

Cheers
Bruce


wkim

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: PDF Report using EE
« Reply #6 on: August 03, 2007, 09:46:28 AM »
Hi Bruce,

Thanks for your continued support on this matter.

I have followed your advice.
  1. uninstalled NetTalk
  2. installed NetTalk(v4.28)
  3. made sure that example 13 was not changed
  4. compiled and ran on IE and FF
Still same result.

I checked that the web app is creating "$$$12345.pdf" file correctly. I was able to
check the existance of the created file before web app deletes it.

I have also checked the settings on IE and FF for any possible issues on downloading
files.  I have ran this example 13 on 2 different PCs and returns the same result.

After saving this PDF file on client browser(see attached image), the file is a PDF file
and I am able to view it with acrobat reader.

What I don't understand is that web app is sending the generated file
($$$12345.pdf in loc:PDFName)

>>     p_web.ReplyContentType = 'application/pdf'
>>     p_web._Sendfile(clip(p_web.site.WebFolderPath) & '\' &loc:PDFName)

but when it arrives on client browser the sent file name changes to MAILBOXESREPORT with no file ext. thus the prompt.

Thanks.
Wesley Kim

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: PDF Report using EE
« Reply #7 on: August 06, 2007, 02:01:14 AM »
Hi Wesley,

Yes, this is normal. Because you are generating the report dynamically the browser "asks for" http://www.whatever.com/MailboxesReport

What is sent back is a PDF file (with the appropriate Reply Content Type set).

But since the browser displays what it asked for, that's what you see in the address bar.

I'm running out of ideas as to what might be doing this.
What version of Acrobat reader do you have installed?

For 4.29 I've added support though for adding a .pdf to the URL name. So you can call MailboxesReport.Pdf and that will also be re-directed to the MailboxesReport procedure. I'm hoping to do a release of that this week so perhaps get that as soon as it's available and try with that.

Cheers
Bruce

wkim

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: PDF Report using EE
« Reply #8 on: August 06, 2007, 08:06:41 AM »
Hi Bruce,

Thanks once again for your help.
The problem was that I was using Acrobat reader 7.0.

>> I'm running out of ideas as to what might be doing this.
>> What version of Acrobat reader do you have installed?

After upgrading the reader to 8.1.0, the sent PDF file displayed
correctly without any problem. :D 
I never thought that using older version of reader could cause
this problem.   I'm very  :D and now I have to make a lot of reports.

Thank you Bruce.

Wesley Kim
« Last Edit: August 06, 2007, 08:09:39 AM by wkim »