Unreadable codes shows in PDF report.

Hi,
I need to export PDF report via OAF page.
But thers is some unreadable codes(Actually is chinese character) shows in PDF report.
So, would you please help me out.
BTY: Both rtf and xml have chinese character.
CO:processFormRequest:
if (pageContext.getParameter("ExportPDF") != null) {
try{
BlobDomain blobDomain = (BlobDomain)am.invokeMethod("generatePdfDoc");
System.out.println("-------------2");
DataObject dataobject = pageContext.getNamedDataObject("_SessionParameters");
HttpServletResponse httpservletresponse = (HttpServletResponse)dataobject.selectValue(null, "HttpServletResponse");
int i = (int)blobDomain.getLength();
ServletOutputStream servletoutputstream = httpservletresponse.getOutputStream();
System.out.println("-------------3 " + i);
if (i > 0)
byte abyte0[] = blobDomain.toByteArray();
httpservletresponse.setContentType("application/pdf;charset=gb2312");
httpservletresponse.setContentLength(i);
httpservletresponse.setHeader("Content-Disposition", "Attachment;Filename=Test.pdf");
servletoutputstream.write(abyte0, 0, abyte0.length);
servletoutputstream.flush();
servletoutputstream.close();
}catch(Exception e){
e.printStackTrace();
throw OAException.wrapperException(e);
AM:
public BlobDomain generatePdfDoc(){
BlobDomain blobDomain = new BlobDomain();
//Get Rtf
RtfVOImpl rtfVO = getRtfVO1();
rtfVO.setWhereClauseParam(0, "Test222");
rtfVO.executeQuery();
System.out.println("===="+ rtfVO.getRowCount());
Row rtfRow = rtfVO.next();
BlobDomain rtfFile = (BlobDomain)rtfRow.getAttribute("FileData");
InputStream rtfIS = rtfFile.getBinaryStream();
try{
// Execute VO
PdfDataVOImpl dataVO = getPdfDataVO1();
dataVO.executeQuery();
System.out.println("----"+ dataVO.getRowCount());
//created the XML data by VO
ByteArrayOutputStream baosXML = new ByteArrayOutputStream();
String xmlHeader = "<?xml version=\"1.0\" encoding=\"gb2312\"?>\n";
baosXML.write(xmlHeader.getBytes());
((XMLNode)dataVO.writeXML(4, XMLInterface.XML_OPT_ALL_ROWS)).print(baosXML, "gb2312");
System.out.println("-----------------------------------===");
System.out.println(baosXML.toString());
//created the XSL template by RTF file.
RTFProcessor rtfP = new RTFProcessor(rtfIS);
ByteArrayOutputStream baosXSL = new ByteArrayOutputStream();
rtfP.setOutput(baosXSL);
rtfP.setExtractAttributeSet(RTFProcessor.EXTRACT_DISABLE);
rtfP.process();
//created the PDF file by XSL and XML
FOProcessor fop = new FOProcessor();
fop.setData(new ByteArrayInputStream(baosXML.toByteArray()));
fop.setTemplate(new ByteArrayInputStream(baosXSL.toByteArray()));
fop.setOutput(blobDomain.getBinaryOutputStream());
fop.setOutputFormat(FOProcessor.FORMAT_PDF);
fop.generate();
}catch(Exception e){
e.printStackTrace();
throw OAException.wrapperException(e);
return blobDomain;
}

Need help!

Similar Messages

  • HTML Markup Doesn't Show in PDF Report

    I've got an Application Express screen from which I'm generating an Oracle Report, using APEX 3.0 and Oracle Reports 10g.
    Calling the report, I specify DESFORMAT=PDF. For the most part, this works fine. I'm able to display BOLD text and font colors and UNDERLINED text, but the STRIKETHROUGH will not show in the PDF.
    In testing, I've used both strikethrough tags ("s" and "strike"), and neither shows in the PDF file. When I run the same report in Report Builder, using the run paper report button, I can see the strikethrough as intended. I'm also able to change the DESFORMAT to HTML when I call the report from APEX, when I do so I can also see the strikethrough. My customers, unfortunately, prefer the PDF format.
    Any ideas?
    Edited by: Bob Heider on Apr 6, 2010 8:12 AM
    Edited by: Bob Heider on Apr 6, 2010 8:13 AM

    Are you exporting or printing to PDF? You must export.
    You must also select the options for interactive content.
    What preset, if any are you using?

  • Pdf report not saving in to the local system

    Hi,
    I am facing some issue with PDF report. We have written code to generate PDF report using java to generate the report we have used the jasper API. We were able to generate the pdf report and we have written a code to appear the ��save as�� dialog box (to save the PDF report). In the ��Save As�� dialog box---��in the ��Save as type�� dropdown box there is no tag for *.pdf.
    Also if are giving manually some temp.pdf as the file name also it is saving on to local machine.
    Please kindly post the solutions.
    The java script code is:
    var myWin = window.open('temp.pdf', , 'left=5000,ScreenX=5000');
              myWin.document.execCommand('SaveAs',true, 'temp.pdf');
              myWin.close();

    That is not his problem. He want to force the client to automatically save the file and lock the filename somehow.
    That, fortunately, is not possible. Him is also been told that here: http://forum.java.sun.com/thread.jspa?threadID=5185876

  • How to generate pdf report and automatically save in the folder?

    Hi all,
    I want to ask, how to generate pdf report and automatically save in the folder?
    Actually, if i run pdf report and show to screen. Now do not need to show to the screen but save the pdf file in the folder.
    If anyone know, please share to me.
    Thanks and regards,
    Iwan

    Hi all,
    Thanks for the reply.
    when i run pdf report, and i got this URL to show the pdf report.
    http://190.180.55.73:7778/reports/rwservlet/getjobid3828?server=sitcnrepsvr
    Do any body know where can i get this pdf report that i have run in application server report folder ?
    Thanks and regards,
    Iwan

  • Problem: Bar Codes Font Embed in PDF Report

    Hi folks.
    I'm having a few problems with Reports 9i.
    Fact: Oracle 9iAS Release 2 with Red Hat Linux 7.3
    I'm trying to print a PDF report that uses a Type 1 Barcode Font (X317349A) using the new PDF EMBED feature of Reports Server 9i.
    Following the doc:210318.1 of Metalink i did the following things:
    - Put the X317349A.afm, X317349A.pfa and X317349A.pfb in the $ORACLE_HOME/reports/samples/demo
    - Put the myreport.rdf in the $ORACLE_HOME/reports/samples/demo.
    - Put the the following line in section [ PDF:Embed ] of uifont.ali file:
    X317349A = "X317349A.afm X317349A.pfa"
    This fonts works with a sequence of "w" and "n" to form the bar code, and acrobat reader is showing just w and n sequence instead of the bar codes.
    Does anybody have a suggestion of what else can i do??
    Thank you all.
    Marcus Santos ([email protected])

    Hello,
    First, generate an output with DESFORMAT=HTML and check the font name used in the output.
    Then, check that the file QUICASB_.TTF exists in a directory of REPORTS_PATH (take care to the case sensitivity on UNIX)
    Check that the file uifont.ali is ok (use the utilty mfontchk)
    Check the "precedence" in the file uifont.ali
    See the comment in the file uifont.ali itself :
    # NOTES ON PRECEDENCE OF PDF SECTIONS:
    Regards

  • How can i make the report previewer show a PDF file instead of HTML?

    Hi there,
    i made a report which can be called within a form by a button. This report is a PDF-report.
    I also have an option in the application to start the report from the menu. Then i get the Launch Report Form by Headstart. Here i can fill in for Desformat (in the options) PDF and Output to PREVIEW. Still it generates me a HTML report in my browser. How can i make it work so that the PREVIEWER will show me a PDF-report instead of the HTML?
    Kind regards,
    Dave

    You can not use PREVIEW as output type in webbased forms/reports. Try using as output type CACHE or FILE.

  • PDF report with bar code

    Hello.
    I am creating a PDF report using the Oracle Reports 6i running on Oracle Concurrent Manager.
    The PDF report has a bar code.
    The report finish with success but it is visualized without the bar code.
    Into the output report the bar code name is small font (mw6code39mt) always.
    I can visualize the output report when I manually alter the bar code name from small font to large font (MW6 Code39MT) only. I do it in my Unix server using the text editor.
    The bar code name installed in my PC is large font (MW6 Code39MT)
    I am experiencing problem when visualizing or printing the output report.
    Has somebody experience about it or some idea about how can I to configure the Unix server or Oracle to solve the problem?
    Thank you.
    Edson

    Hi Julie,
    Sorry my english.
    I will try to explain in more details the problem.
    I have identified that the bar code name into the PDF output is lowercase (mw6code39mt).
    I only visualize or print the PDF output with the bar code when I manually alter that bar code name from lowercase to uppercase (MW6Code39MT).
    I do that in my Unix server using the vi editor.
    Please, see what I need to alter in the PDF output file on Unix server:
    <</Type /Font
    /Name /F1
    /Subtype /Type1
    /Encoding /WinAnsiEncoding
    /BaseFont /mw6code39mt ====> alter to MW6Code39MT
    /FirstChar 24
    /LastChar 255
    /Widths 9 0 R
    /FontDescriptor 10 0 R
    >>
    endobj
    Thank you.
    Edson

  • How to show a pdf file in bi publisher report

    Hi All,
    We need to show a pdf file as report which was saved in a given location. How to call that pdf file as report. We need to give a hyperlink in the report and when we click on the report the pdf file should be displayed.
    When we open a report, there will be just hyperlinks to call serveral reports. When we click on each link , one should call a pdf saved in a particular location.
    Thanks.

    In Word, if you have set the borders on then you should see them in the output. In Word it has a setting to let you see 'gridlines' even if they are not set ie you have turned the borders off. Highlight the table and set all the borders on and re-try. If that fails, try building the table from scratch and copy the cell contents across to the new table
    Tim

  • How to show in a report a pdf blob from database

    Hi all
    We are working on report 6i and report 10. We have a report wich needs to show a blob field from database that storages a pdf (type application/pdf). OLE2 is deprecated. The pdf blob field must be displayed in a preview and must be printed. In local, it works. When it works on a browser, the pdf blob field is missing. If we load the field into a pdf file, the field is not visible in the browser.
    Do not get it to work. How I can implement? Could you give us any example for this?

    In local, it works. What do you mean by that exactly? You see the pdf in Reports Builder?
    If you just want to show the pdf in a browser (not embedded in a report) it is easy to use mod_plsql. You can have a simple db procedure like this to show any kind of blob:
    procedure show_webdoc(io_blob    in out nocopy blob
                         ,i_mimetype in varchar2
                         ,i_filename in varchar2)
    is
    begin
       if dbms_lob.getlength(io_blob) >0 then
          owa_util.mime_header(nvl(i_mimetype,'application/octet'),false);
          htp.p('Content-length: ' || dbms_lob.getlength(io_blob));
          htp.p('Content-Disposition:  inline; filename="'||i_filename|| '"');
          owa_util.http_header_close;
          wpg_docload.download_file(io_blob);
       end if;
    end show_webdoc;

  • XML report output displays xml code instead of pdf

    Hi,
    My Release is R12.1.1, An xml report whose output is set as pdf. when running this report output is coming as xml code instead of pdf
    another xml report ouput is coming in word instead of pdf
    is there any additional settings required to display in pdf format
    eventhough i configured pasta.csg & ixlib.cfg files
    Thanks,
    Alig
    Edited by: user12257829 on Jun 2, 2010 11:41 PM
    Edited by: user12257829 on Jun 2, 2010 11:41 PM

    Hi,
    Helios
    Even i tried both MOS documents u have referenced, as both reports compeleting normally without any error
    one thing i want to know can application use the same pasta.cfg file for pdf and text format
    as i have a single pasta.cfg configured
    Thanks
    Alig
    Edited by: user12257829 on Jun 3, 2010 1:18 AM
    Edited by: user12257829 on Jun 3, 2010 1:18 AM

  • My code not give error nut not give pdf report output

    hi master
    sir see my code not give error nut not give pdf report output
    String reportSource = "./WEB-INF/reports/mfa.jasper";
    String reportDest = "./reports/mfa1.html";
    Connection conn = null ;
    Statement msqlStatement = null ;
    ResultSet mrs = null ;
    Connection mconn = null ;
    ExternalContext econtext = getExternalContext();
    InputStream stream = econtext.getResourceAsStream(reportSource);
    if (stream == null) {
    throw new IllegalArgumentException("Unknown report name '" + reportSource
    + "' requested");
    try {
    String mfat = ac_categoryDataProvider.getCachedRowSet().getDataSourceName();
    javax.naming.Context mctx = new javax.naming.InitialContext() ;
    DataSource mds = (DataSource)mctx.lookup(mfat);
    Connection mcon= mds.getConnection();
    mcon.setAutoCommit(false) ;
    JasperPrint jasperPrint = null;
    //getSessionBean1().getTripRowSet(),
    //getSessionBean1().getAc_categoryRowSet(), mfat getSessionBean1().getAc_categoryRowSet()
    jasperPrint = JasperFillManager.fillReport(stream, null,mcon);
    JRExporter exporter = null;
    HttpServletResponse response = (HttpServletResponse)econtext.getResponse();
    FacesContext fcontext = FacesContext.getCurrentInstance();
    exporter = new JRPdfExporter();
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_STREAM,
    response.getOutputStream());
    exporter.exportReport();
    fcontext.responseComplete();
    } catch (Exception ex) {
    log(" Error Description" , ex);
    error("Error counting rows: " + ex.getMessage() );
    error("Error counting rows: " + ex );
    please give me idea
    thank's
    aamir

    Thanks Sven.
    The query works but the other way. The output is for all the targets, not for the respective target which we select from :p1_target.
    select target_name,target_type, column_label,
    warning_threshold,critical_threshold,occurrence_count
    from sysman.MGMT$TARGET_METRIC_SETTINGS@crmodem
    where target_name in (select MEMBER_TARGET_NAME from MGMT$TARGET_FLAT_MEMBERS@crmodem
    where upper(AGGREGATE_TARGET_NAME) like '%X' || :P1_TARGET || '%')
    Thanks again.

  • Thai font is not showing in the PDF report

    Hi Gurus
    I m generating report in PDF format. I want some fields should be in Thai language which r in thai language in the database. But my PDF report cannot show this. Its showing some gurbage data.
    Mokarem

    Hello Roger Tenn,
    Thank you for posting in the TechNet Forum.
    As this issue is related to SQL server report server, to receive better report, it is recommended to ask in the SQL server forum.
    https://social.technet.microsoft.com/Forums/en-US/home?category=sqlserver
    The professionals here will be glad to help you.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • Barcode Fonts not showing in BIP reports in PDF format in Siebel Remote

    Hi,
    We have successfully setup the PDf report with Barcode fonts in Siebel Web Clinet. Now we are trying to setup the report in Siebel Mobile clinet. We did the following tomake it work in mobile clinet.
    1) Copied the font file i.e. .ttf file in C:\Windows\fonts folder
    2) Copied the font file i.e. .ttf file in C:\JRE Lib fonts folder
    3) Updated the XDO.cfg file with details of the font
    4) Copied the XDO.CFG file in mobile client XMLP\Templates folder
    But the font doe snot show in dedicated or Mobile clinet. It shows the data in regular text in PDF. Please let me know if I have missed any step.
    Thanks,
    Sachin

    Rafael,
    did you try and re-install acrobat reader. If acrobat reader has a plugin then this installs automatically in the browser and will be used. I think - since you say that it worked on other systems - that it is the browser not knowing what to do with the pdf mimetype.
    Frank

  • Web Reports Take 10 minutes trying to show a PDF the first time

    I have a critical error on my ORACLE Web Reports, using Application Server Enterprise Edition 10.1.2.2
    The first time i call a reports take 10 minutes trying to show a PDF, and give me an error No response from application webserver, this is a red error from webcache, there was not respond from application webserver
    after this all the other time reports are fine and don't take a lot of time.
    My enviroment is based on a Solaris divide in zones:
    1) One layer with webcache using SSL
    2) One layer with Oracle Middle Tier
    3) One layer with Oracle Infrastructure
    4) One layer with Reports Component
    Webcache on layer 1 is mapping to reports server in layer 4
    The reports are ussing AUTHID to get the SSO
    Any help on this will be appreciate

    Hello all,
    I appreciate your willingness to help.
    Did a test. Copy and pasted a page of my graphics into a new indd file and into a new master. New file works fine for exporting jpeg as well as pdf.
    Must just be something wrong with the original. gremlins. No time to wonder why.
    but....Thank you again.

  • Pdf report doesn`t show cyrillic letters

    Hi everyone. For generate report I begin to use Exaprom PDF https://decibel.ni.com/content/docs/DOC-10952 . But there are I find a bug. I try to insert russian letters to the pdf as text, there is no error. But when I open pdf documents, there is not any russian letters. Only English letters and numbers. Is anybody know what kind of problem is it?
    Solved!
    Go to Solution.

    PDF Exaprom utilizes the encoding CP1252.  Cyrillic is not supported.  From GetFont.vi:
    http://en.wikipedia.org/wiki/Windows-1252
    and
    http://en.wikipedia.org/wiki/ISO_8859-1
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp

Maybe you are looking for