cancel
Showing results for 
Search instead for 
Did you mean: 

BSP, OTF and PDF

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Check out this weblog, maybe it will help you get over the problem you are having

/people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp

If that doesn't help I would maybe contact the OSS, it might be related directly to the SP50

Answers (2)

Answers (2)

GrahamRobbo
Active Contributor
0 Kudos

Hi Carsten,

this piece of code simply puts the .PDF document into the HTTP response payload.

Everything after this is handled by the browser. It is the browser that recognises that Acrobat Reader is associated with the file extension ".pdf" and launches it.

I can't really see why an upgrade on the application server would change how this works. Perhaps you should ensure you are running the latest Acrobat Reader.

Cheers

Graham

Former Member
0 Kudos

Hi,

has your problem anything to do with the filesize of your document? Did you found a solutinon?

regards

Felix