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)®üí·[&ç</p> <p>Thanks,<br /> Suresh</p> </div><!-- .bbp-reply-content --> </div><!-- .reply --> <div id="post-30031" class="bbp-reply-header"> <div class="bbp-reply-author"> <a href="https://pd4ml.com/forums/users/anonymous/" title="View Anonymous's profile" class="bbp-author-link"><span class="bbp-author-avatar"><img alt='' src='https://secure.gravatar.com/avatar/?s=80&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/?s=160&d=mm&r=g 2x' class='avatar avatar-80 photo avatar-default' height='80' width='80' loading='lazy' decoding='async'/></span><span class="bbp-author-name">Anonymous</span></a> <div class="tc_display"><ul></ul></div> </div><!-- .bbp-reply-author --> <div class="bbp-meta"> <span class="bbp-reply-post-date">April 18, 2017 at 13:58</span> </div><!-- .bbp-meta --> </div><!-- #post-30031 --> <span class="bbp-admin-links"></span> <div class="loop-item-1 user-id-47838 bbp-parent-forum-26160 bbp-parent-topic-27142 bbp-reply-position-7 even topic-author post-30031 reply type-reply status-publish hentry"> <div class="bbp-reply-content"> <a href="https://pd4ml.com/forums/topic/pd4ml-transform-tag-renders-weird-characters/#post-30031" class="bbp-reply-permalink">#30031</a> <p>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.</p> </div><!-- .bbp-reply-content --> </div><!-- .reply --> <div id="post-30026" class="bbp-reply-header"> <div class="bbp-reply-author"> <a href="https://pd4ml.com/forums/users/anonymous/" title="View Anonymous's profile" class="bbp-author-link"><span class="bbp-author-avatar"><img alt='' src='https://secure.gravatar.com/avatar/?s=80&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/?s=160&d=mm&r=g 2x' class='avatar avatar-80 photo avatar-default' height='80' width='80' loading='lazy' decoding='async'/></span><span class="bbp-author-name">Anonymous</span></a> <div class="tc_display"><ul></ul></div> </div><!-- .bbp-reply-author --> <div class="bbp-meta"> <span class="bbp-reply-post-date">April 19, 2017 at 06:26</span> </div><!-- .bbp-meta --> </div><!-- #post-30026 --> <span class="bbp-admin-links"></span> <div class="loop-item-2 user-id-47838 bbp-parent-forum-26160 bbp-parent-topic-27142 bbp-reply-position-2 odd topic-author post-30026 reply type-reply status-publish hentry"> <div class="bbp-reply-content"> <a href="https://pd4ml.com/forums/topic/pd4ml-transform-tag-renders-weird-characters/#post-30026" class="bbp-reply-permalink">#30026</a> <p>Thanks for your response.<br /> I have changed the weblogic server start parameter to add<br /> -Dweblogic.webservice.i18n.charset=utf-8 and restarted the server. No luck.</p> <p>then I added the below parameter and restarted the server.<br /> -Dfile.encoding=utf8</p> <p>Weblogic Domain path-> bin folder -> setDomainEnv.sh under JAVA_OPTS added the below variable.<br /> -Dfile.encoding=utf8.</p> <p>Still it is displaying the same characters. Plz help me what could be the problem.</p> <p>Thanks,</p> </div><!-- .bbp-reply-content --> </div><!-- .reply --> <div id="post-30027" class="bbp-reply-header"> <div class="bbp-reply-author"> <a href="https://pd4ml.com/forums/users/pd4ml/" title="View PD4ML's profile" class="bbp-author-link"><span class="bbp-author-avatar"><img alt='' src='https://secure.gravatar.com/avatar/1ab88b0c7eb4a1413c16a30b55ca33675ca05195cf2718257f7626e6217b00ca?s=80&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/1ab88b0c7eb4a1413c16a30b55ca33675ca05195cf2718257f7626e6217b00ca?s=160&d=mm&r=g 2x' class='avatar avatar-80 photo' height='80' width='80' loading='lazy' decoding='async'/></span><span class="bbp-author-name">PD4ML</span></a> <div class="tc_display"><ul></ul></div> </div><!-- .bbp-reply-author --> <div class="bbp-meta"> <span class="bbp-reply-post-date">April 19, 2017 at 08:15</span> </div><!-- .bbp-meta --> </div><!-- #post-30027 --> <span class="bbp-admin-links"></span> <div class="loop-item-3 user-id-47890 bbp-parent-forum-26160 bbp-parent-topic-27142 bbp-reply-position-3 even post-30027 reply type-reply status-publish hentry"> <div class="bbp-reply-content"> <a href="https://pd4ml.com/forums/topic/pd4ml-transform-tag-renders-weird-characters/#post-30027" class="bbp-reply-permalink">#30027</a> <p>It is not about charset / character encoding.</p> <p>Your webapp should send “<strong>Content-type: application/pdf</strong>” with HTTP response.</p> <p>PD4ML taglib implicitly sets the correct HTTP header. (Do you use PD4ML taglib?)<br /> It your case it seems to be overridden with “<strong>Content-type: text/plain</strong>“.</p> </div><!-- .bbp-reply-content --> </div><!-- .reply --> <div id="post-30028" class="bbp-reply-header"> <div class="bbp-reply-author"> <a href="https://pd4ml.com/forums/users/anonymous/" title="View Anonymous's profile" class="bbp-author-link"><span class="bbp-author-avatar"><img alt='' src='https://secure.gravatar.com/avatar/?s=80&d=mm&r=g' srcset='https://secure.gravatar.com/avatar/?s=160&d=mm&r=g 2x' class='avatar avatar-80 photo avatar-default' height='80' width='80' loading='lazy' decoding='async'/></span><span class="bbp-author-name">Anonymous</span></a> <div class="tc_display"><ul></ul></div> </div><!-- .bbp-reply-author --> <div class="bbp-meta"> <span class="bbp-reply-post-date">April 19, 2017 at 08:30</span> </div><!-- .bbp-meta --> </div><!-- #post-30028 --> <span class="bbp-admin-links"></span> <div class="loop-item-4 user-id-47838 bbp-parent-forum-26160 bbp-parent-topic-27142 bbp-reply-position-4 odd topic-author post-30028 reply type-reply status-publish hentry"> <div class="bbp-reply-content"> <a href="https://pd4ml.com/forums/topic/pd4ml-transform-tag-renders-weird-characters/#post-30028" class="bbp-reply-permalink">#30028</a> <p>This is the code<br /> <pre data-enlighter-language="xml" class="EnlighterJSRAW"><%@ taglib prefix="pd4ml" uri="/WEB-INF/taglib/pd4ml.tld"%><pd4ml:transform screenWidth="400" pageFormat="A5" pageOrientation="landscape" pageInsets="100,100,100,100,points"> <div > HI This is test : </div> </pd4ml:transform></pre></p> <p>response:</p> <p>%PDF-1.4 %Çåôåð 1 0 obj % [24] << /Filter /FlateDecode /Length 458 >> stream xÚµQ[OÛ0~ŽÅáaÒ&ÑÌÎ¥!‘ú2ÒÒm‰Æš&·q[Cc§±!ê~ýŽ3PÙÛ^¦ÄÊñw¾K|¼'<code data-enlighter-language="u" class="EnlighterJSRAW">–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&ð</code>=”žîÄÚ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 > /Type /Page /Parent 2 0 R /Contents 1 0 R /MediaBox [0 0 595 421] /Annots [ ] >> endobj 2 0 obj > endobj 5 0 obj > endobj 6 0 obj > 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 <79bcfcd74b67c0cb1345fcede7652884>] >> startxref 1425 %%EOF Anonymous April 19, 2017 at 08:33 #30029 After removing PD4ml transform tags response in jsp is: HI This is test : Thanks PD4ML April 19, 2017 at 09:07 #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. jones302 April 19, 2019 at 17:57 #30032 thanks for tips Author Posts Viewing 8 posts - 1 through 8 (of 8 total) The forum ‘Deployment / Configuration issues’ is closed to new topics and replies." />
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"%><pd4ml:transform
    screenWidth="400"
    pageFormat="A5"
    pageOrientation="landscape"
    pageInsets="100,100,100,100,points">
    <div >
    HI This is test :
    </div>
    </pd4ml:transform>

    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.