Skip to Content
0
Former Member
Jun 03, 2005 at 09:12 AM

BSP, OTF and PDF

17 Views

Hi all,

i have a little problem and i do not no what it is.

i convert an otf-file into pdf-file. then is give the user the chance to display it or to save it.

if they want to display it, acrobat says the the file is not there and finshes. if they save the file, all is ok.

they can open it from there pc and it looks ok.

does anyone has such probs like me?

here is the coding i use.. it works fine, till we upgraded the system to WebAS 6.20 HP50.

***************************************

mresponse->set_header_field( name = 'content-type'

value = 'application/pdf' ).

  • some Browsers have caching problems when loading PDF format

mresponse->set_header_field(

name = 'cache-control'

value = 'max-age=0' ).

  • start PDF viewer either in the Browser or as a separate window

if pdf_in_browser is initial.

mresponse->set_header_field(

name = 'content-disposition'

value = 'attachment; filename=webforms.pdf' ).

endif.

  • finally display PDF format in Browser

l_pdf_len = xstrlen( l_pdf_xstring ).

mresponse->set_data( data = l_pdf_xstring

length = l_pdf_len ).

navigation->response_complete( ).

*****************************************************

br,

Carsten