cancel
Showing results for 
Search instead for 
Did you mean: 

PDF document not openeing on some PC's

Former Member
0 Kudos

Hello,

In my BSP application a PDF document opens on a button click. However, the PDF seems to work on some machines and not on others. This is mainly in production.

Can you please provide any suggestion for why it is behaving as such?

Accepted Solutions (0)

Answers (1)

Answers (1)

athavanraja
Active Contributor
0 Kudos

My answer may look silly but are you sure that those machines where its not openning is installed with adobe acrobat reader?

<i>However, the PDF seems to work on some machines and not on others</i>

Can you tell us what exactly is happenning?

Regards

Raja

Former Member
0 Kudos

Yes , PDF is installed on all machines and even the pop-up blockers are off. The problem is that some documents do open while some do not.... cant exactly understand why ... and this only on some PC's

eddy_declercq
Active Contributor
0 Kudos

Hi,

My initial thought would be that the pdf extension (I hope that you provide the pdf extension, MIE needs it) isn't linked to AR.

Check http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/win_fcab_reg_filetype... for this.

If you have eg Mozilla, check this http://www.mozilla.org/docs/end-user/helper-applications.html

If that's not the case, I would add this in your BSP page that generates the PDF:

runtime->server->response->set_header_field( name = 'Content-Length'

value = contentsize ).

runtime->server->response->delete_header_field( name = 'Cache-Control' ).

runtime->server->response->delete_header_field( name = 'Expires' ).

runtime->server->response->delete_header_field( name = 'Pragma' ).

runtime->server->response->set_header_field( name = 'Content-Type'

value = 'application/pdf' ).

Eddy

Former Member
0 Kudos

Hi Eddy,

can you please explain me the steps specified by you ?

runtime->server->response->set_header_field( name = 'Content-Length'

value = contentsize ).

runtime->server->response->delete_header_field( name = 'Cache-Control' ).

runtime->server->response->delete_header_field( name = 'Expires' ).

runtime->server->response->delete_header_field( name = 'Pragma' ).

runtime->server->response->set_header_field( name = 'Content-Type'

value = 'application/pdf' ).

however I am using the first and the last line already in the code

eddy_declercq
Active Contributor
0 Kudos

Hi,

First some background info. We always need to be cross-browser and croos-platform. We found out that all different type of browsers have different behaviour.

runtime->server->response->set_header_field( name = 'Content-Length'

value = contentsize ). is rather obvious, we set the langth of the file.

runtime->server->response->delete_header_field( name = 'Cache-Control' ).

runtime->server->response->delete_header_field( name = 'Expires' ).

runtime->server->response->delete_header_field( name = 'Pragma' ).

have all the same purpose: deleting everything which in the browser (cache).

See also 14.9 in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

runtime->server->response->set_header_field( name = 'Content-Type'

value = 'application/pdf' ). is rather obvious too.

Eddy

Former Member
0 Kudos

Hi vaibhav,

You can learn more about this from the weblog "BSP Programming: Handling Of Non-HTML Documents" by Brian

<a href="/people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents:///people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents

Regards,

Siddhartha

eddy_declercq
Active Contributor
0 Kudos

Hi,

Pls don't forget to reward points and close the question if you find the answers useful.

Eddy