Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #27142

    I’m using pd4ml to generate pdf using pd4ml taglib. The jsp is rendered with wired characters instead of showing pdf. we are using tiles for rendering jsp.
    ex: %PDF-1.4 %Çåôåð 1 0 obj << /Filter /FlateDecode /Length 940 >> stream xÚÅWmsÚ8þŒŖ™»IfˆcùÇÌäKBҒÒÐë]››aPk[Ž$pé¯ïʐÉÌ&×aÒJÚgß´»Ü[?Á ë÷9“Š‹¼^D` nuß>’‰ÚÎ_$@úõí#ùÏQ*¡mÜ»ä)–Ç”áù¤çqéŠ)s¡×í@ö:;»ùcüûÕäcÿˆ]ßýY÷ü”ïÑnؽߜò+åïßN¿Î’_§Þdø.|E#ÉèõHEô“¯L„tòâÁÊ‚^€ë>@Ž‡24óxq>ì[Ž„8ø9ZÍ«x:ÎÌIÊsP3˅+‹@iٮƻ×O–rRã„áãàôÚÁÌüÐ7{ÌoâŽ?Îj¬v–¸{o5ÈRóãEHE-gC«aÀ&VãøRäú KçL󘝉4!àžÀpl5†hObï;„ág«q1´njµ¿Ýºê†¤†ºÈÙ_jz1³Xó9ƒnj}*ã)¸ w¨z]ñ‰ão%ÿpÊÆ3)®üí·[&ç

    Thanks,
    Suresh

    #30031

    The “garbage” is PDF bytes, shown as plain text. Obviously “Content-type” HTTP response header is overridden with a wrong value. Check the server/webapp setting.

    #30026

    Thanks for your response.
    I have changed the weblogic server start parameter to add
    -Dweblogic.webservice.i18n.charset=utf-8 and restarted the server. No luck.

    then I added the below parameter and restarted the server.
    -Dfile.encoding=utf8

    Weblogic Domain path-> bin folder -> setDomainEnv.sh under JAVA_OPTS added the below variable.
    -Dfile.encoding=utf8.

    Still it is displaying the same characters. Plz help me what could be the problem.

    Thanks,

    #30027

    It is not about charset / character encoding.

    Your webapp should send “Content-type: application/pdf” with HTTP response.

    PD4ML taglib implicitly sets the correct HTTP header. (Do you use PD4ML taglib?)
    It your case it seems to be overridden with “Content-type: text/plain“.

    #30028

    This is the code
    <%@ taglib prefix="pd4ml" uri="/WEB-INF/taglib/pd4ml.tld"%>

    HI This is test :

    response:

    %PDF-1.4 %Çåôåð 1 0 obj % [24] << /Filter /FlateDecode /Length 458 >> stream xÚµQ[OÛ0~ŽÅáaÒ&ÑÌÎ¥!‘ú2ÒÒm‰Æš&·q[Cc§±!ê~ýŽ3PÙÛ^¦ÄÊñw¾K|¼'–GÓkx‘Ze¦fÆÆe~u„™Ÿøô'‹¿¹=ÂwR•º5@ßgØɝ¡Vº”j“Áy͂8@Üã“<ƒòp5*z³¼¯ô(6µú6T_ŸæéýP³ñâÒyÒÊï£zZNÆ«‹û}~{žôX,Œh˜œ°( â”qBÓÐyË_"ƒGþÂ}ÞZ?—•P.졕¥Ýâ4>Ý ¹ÙÚA°(ÊkÞI&ð=`”žîÄÚvÅR[««®l:¬œÁ³Áó×|…±¥Î±â¦ÞI›mžE—bESë·H[óq åKвüÉQLŸ‰¦’ÝŒw–u£ßÆL0Ü Ópи…¤ ç¼>œSBýô,‰âÓ{­;²W•cr©ÀX®H—„A‹¤¿®ÅÅ_Ûfóç³’û“ê>A„Ìó¾Ä;sL(Jâ}ie¼Ó[èŠ+Ž’Pl¥|­0²OP> endobj 4 0 obj << /Resources << /Font << /FontTimes-Roman0 3 0 R >> /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] >> /Type /Page /Parent 2 0 R /Contents 1 0 R /MediaBox [0 0 595 421] /Annots [ ] >> endobj 2 0 obj << /Type /Pages /Count 1 /Kids [ 4 0 R ] >> endobj 5 0 obj << /Pages 2 0 R /Type /Catalog /PageLayout /OneColumn >> endobj 6 0 obj << /Creator /Producer /CreationDate (D:20170419135915+05'30') >> endobj xref 0 7 0000000000 65535 f 0000000016 00000 n 0000000856 00000 n 0000000554 00000 n 0000000653 00000 n 0000000915 00000 n 0000000987 00000 n trailer << /Info 6 0 R /Root 5 0 R /Size 7 /ID [<79bcfcd74b67c0cb1345fcede7652884><79bcfcd74b67c0cb1345fcede7652884>] >> startxref 1425 %%EOF

    #30029

    After removing PD4ml transform tags response in jsp is:

    HI This is test :

    Thanks

    #30030

    You published as “response” returned HTTP content, which looks correct.

    HTTP server also sends so-called “HTTP Header”, which should have “Content-type: application/pdf” entry.

    Your JSP code also seems to be ok. So first I would suspect your web application has a config mapping “JSP -> plain/text”, and the configuration overrides “Content-type: application/pdf” set by PD4ML taglib.

    #30032

    thanks for tips

Viewing 8 posts - 1 through 8 (of 8 total)

The forum ‘Deployment / Configuration issues’ is closed to new topics and replies.