How to print binary to a file?

I am using oracle 8i.
I am storing chinese character in varchar2(150) column while my character sets was AMERICAN_AMERICA.WE8ISO8859P1.
Actually, it can be retrieved successfully in discoverer or sqlplus in I set the nls charset to AMERICAN_AMERICA.ZHT16BIG5. however, I cannot output the column correctly in a PL/SQL store pro. I am trying UTL_FILE to print but it is a failure.
how can I print the character correctly? any function in PL/SQL convert the data to binary so that I can print the character without any charset transformation?
thx.
marvin

Thank you for responding.
I do know when the job start. The job always start with string as following (delima):
StringBuffer bufStr = new StringBuffer();
bufStr.append((char)0x1B);
bufStr.append("%-12345X@PJL COMMENT");
bufStr.append((char)0x0D);
bufStr.append((char)0x0A);
String delima = new String(bufStr);
Therefore, how can I check the whole delima string while I just read byte per byte from the file?
Thanks again.
Henry

Similar Messages

  • How to print DOC or PDF files

    Hi all,
    please tell me how to print documents (.pdf , .doc , .xls , .jpeg, .gif, .bmp) with java coding
    i have tried like this ..
    try {
    //          Open the input file
              InputStream is = new BufferedInputStream(
              new FileInputStream("C:\\Documents and Settings\\3041\\Desktop\\New Folder (2)\\00.pdf"));
              PrintService service = PrintServiceLookup.lookupDefaultPrintService();
              DocFlavor[] flavors = service.getSupportedDocFlavors();
              for (int i = 0; i < flavors.length; i++) {
                   System.out.println(flavors.getMimeType());
    //          Create the print job
              DocPrintJob job = service.createPrintJob();
              Doc doc = new SimpleDoc(is, DocFlavor.INPUT_STREAM.PDF, null);
    //          Print it
              job.print(doc, null);
              is.close();
              } catch (PrintException e) {
              System.out.println (e);
              } catch (IOException e) {
              System.out.println (e);
    which prints all images properly but not doc or pdf files please help how to print PDF or DOC files
    Edited by: getzkk on Oct 8, 2007 7:31 AM
    Edited by: getzkk on Oct 8, 2007 4:02 PM

    Well, the ability to convert the pdf to html and then to PDF is a worthy solution.
    10,000 emails would require a batch convert solution.
    This is very much beyond what I know. I'll have to leave this to better minds.
    I could suggest a third party tool. Have a look at this:
    http://a-pdf.com/faq/can-i-split-pdf-file-with-nonstandard-page-size.htm
    Other than that,I can't think of anything else.
    Gene

  • How to print or Fax a file with SAPscript form ?

    Hello Gurus,
    + We have a file (Terms) WORD which is contained in 1 PAGE  WORD . Font ARIAL size 5. In Word it is OK , Now our client needs this contents to be printed with the SAPSCRIPT ( Sale order) . We can not extract all of this contents into a page of SAPScript .. We've tried with font TIMES size 8 in SAPSCRIPT it printed in3 pages. So We think of another solution is to print or Fax this file at the same time when the SAPscript is printed.  Could you please advise us how to do this ? Supposing that this file is stored in the SERVER .
    Thank in advance.

    When you open a PDF email attachment, would you make sure to open it in Adobe Reader for iOS?
    When you receive and open an email with a PDF attachment, Apple Mail (the default mail app on iPad/iPhone) uses its own preview feature to display the PDF attachment.  However, Apple Mail for iOS does not render or print form fields or comments in the preview.
    Please take a look at the Mail section of the following FAQ documents to open a PDF email attachment in Adobe Reader for iOS.
    For iPad, see How to get PDF documents into Adobe Reader for iOS (iPad on iOS 7 version)
    For iPhone, see How to get PDF documents into Adobe Reader for iOS (iPhone on iOS 7 version)
    Please let us know if you need further assistance.

  • How to handling Binary data and File operation?

    Hello Everyone,
    I think this question might have been asked a lot of time but I was unable to find one solution so, please help needed in this from all you guys..
    I am creating a byte[] of the media files of mp4, and jpg, using the below code,,
    File ff = new File(filename);
            fos = new FileOutputStream(ff);
            int b;
            byte[] f = this.getMediaFile();
            for (b = 0; b < f.length; b++) {
                if (f[b] != -1) {
                    fos.write(f);
    fos.flush();
    fos.close();
    After i convert it i have to store it in the MySql Database as BLOB object, for retrieving byte[] from the database is simple i can do that also successfully with this code.java.sq.Blob obj = (java.sql.Blob) rs.getBlob("file");
    InputStream is = null;
    ByteArrayOutputStream bc = null;
    is = obj.getBinaryStream();
    bc = new ByteArrayOutputStream();
    int b;
    while ((b = is.read()) != -1) {
    System.out.print(b + " ");
    bc.write(b);
    Now the real problem is that when i want to recreate a mp4 audio or video file i am unable to do so, the file created is smaller in size and also it doesn't get played in windows default player nor VLC. I am able to get the image file of jpg format using the BufferedImage & ImageIO.writer();
    How do i do for mp4 file, have no clue for that.
    Pleases help out with this.
    Thanks..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    if (f[b] != -1) {I don't get that line. What if you try to output the data without that condition, like this:
    fos = new FileOutputStream(ff);
            byte[] f = this.getMediaFile();
            for (int b = 0; b < f.length; b++) {
                 fos.write(f);
    fos.close();

  • How to print JTable to image file?

    Hi ppl.
    I have JTable that i can print via Printable to printer very well.
    Now I have a task to pass this JTable to MS Word. I can pass to MS Word any image file. So all I need is to "print" my JTable to image. Is it possible to reroute printing process to image file?
    Or any other ideas how to sovle a problem?

    John Bo wrote:
    Hi ppl.That words is 'people'. By leaving out three letters, you do not appear cool, just lazy & foolish.
    I have JTable that i can print via Printable to printer very well.
    Now I have a task to pass this JTable to MS Word. I can pass to MS Word any image file. So all I need is to "print" my JTable to image. Is it possible to reroute printing process to image file?Create a <tt>BufferedImage</tt> the same size as the <tt>JTable</tt>. Call <tt>createGraphics()</tt> on the <tt>BufferedImage</tt>. Pass the <tt>Graphics</tt> object to <tt>JTable.painComponent(Graphics)</tt>. Create an image of the <tt>BufferedImage</tt> by calling <tt>ImageIO.write()</tt>.

  • How to Print Screen as a File on MacBook Pro Using Bootcamp 5.0 on Windows 8.1

    I know print screen on a MBP is Shift + Fn + F11, but I want to print screen as a file. I tried Shift + Fn + F11 + Command but it doesn't work. Does Bootcamp support this feature?

    In Windows, you can use a third-party application or a good solution would be to use the On-Screen keyboard included in Windows. That keyboard has got the Imp Pant key, that allows you to copy a screenshot of the whole display.
    Then, open Paint and press Control and V keys to paste the screenshot. Finally, close Paint and save the screenshot as a file.
    Note that third-party applications may offer you a faster way of doing that

  • How to identify binary vs ASCII file???

    Hello,
    What is the best way to decide whether a file is binary or plain text?
    Thanks in advance.
    Chris.

    Other than passing through the bytes, check that there are no bytes that you wouldn't usually have in a text file and pray that the file isn't in an "exotic" character encoding such as utf8?
    There is no real difference. Both "binary" and "text" files contain bytes.

  • Print Services : How to Print to a (Postscript) File ???

    Hi Forum,
    for quite a while I'm thinking about migrating our print server to Mac OS X Server, unfortunately I could not find a way to easily create and manage multiple "Pritn-to-File" queues.
    More precisely: what I would need is the ability to create Postscript spoolers on OSX Server which would just operatelike a virtual Printer, showing up on the network as shared but having no real printer on the other side! Just receiving the Postscript files (without limitations on size, media and colors) and dropping it into a predefined Folder on the Server. Sounds so easy...
    Thanks in adavance for any help!

    First the USB stick needs to be formatted in a format the frame can see. That is usually FAT32, the Windows and mostly Universal format (It probably already is formatted like that).
    Next is what photo cataloging and editing program are you using? If it is iPhoto you need to Export the image or images you want to place on that card/stick. Not sure how that is done exactly as I don't use iPhoto but it is one of the menu item options (Could be under the File menu item).
    Then during the export it should ask you where you want to exprt them TO. you would browse to the USB stick and select it. If it Auto places them on your dekstop then use Finder to coy and paste them from your desktop to the USB stick. Or you can try Drag & Drop (I personally never use that as I've never like it) from the Desktop to the USB stick.

  • How to "print" to a PDF file using several templates?

    I have Adobe Acrobat X Professional.
    Now I want to export my documents (letters, bids, invoices etc. from my ERP) to PDF files using the Adobe PDF printer driver using different layout templates for example: we have two different letterheads (already PDF files) and some of the documents have to be exported/merged onto the first, and others have to be exported/merged onto the second letterhead.
    Are there any options on how to select different templates in the Adobe PDF printer.
    And if not, are there any solutions how to integrate this functionality into Adobe PDF printer.
    Any help is greatly appreciated
    Cheers,
    Harald

    ok, that's right. i also can use the add layer command to create the text over the letterhead.
    but this is impractical. the users should be able to export the document using the desired template.
    i need a superimpose feature or something like that for the pdf writer. hopefully it will be implemented
    Thanks anyway.
    Cheers,
    Harald
    Message was edited by: harlam2k11

  • How to print inserts for suspension files on HP2540

    I am trying to print label inserts for suspension files but cant find anything similar in "paper size"  to set printing to. Does this machine not have a set up for this size ??

    Hi @probs
    Welcome to the HP Support Forums.  I understand that you are trying to print labels using your Deskjet 2540 printer.
    I have included the Printer Specifications for HP Deskjet 2540 and Deskjet Ink Advantage 2545 All-in-One Printer Series which shows which paper sizes are supported, including the range for any custom sizes.  I have also included the Create Custom Paper Sizes in Windows 7, Windows 8, and Mac OS X for reference.
    Have a good weekend.
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • How to print contact sheet with file names

    I want to print a photo contact sheet with file names. Is this possible with any standard Mac app?

    I'd like to print the Album name at the top of each contact sheet I produce from that album - is this possible within iphoto '08 or do I need to print to a pdf and then edit that pdf with acrobat pro for example.

  • How to print names all files from a given folder into a file??

    Hi,
    Given is folder which contains folder's n files. the same is wd every folder.
    How to print names of all files in parent dir.
    ex: C drive
    1) windows 2)prog files 3) Documents 4) a.txt
    1.a) cursors.........
    2.a) netbeans.....
    3.a) rcm_b05
    output:
    c:\windows\cursors\s.txt
    c:\progfiles\ram\m.tc
    a.txt

    Hi,
    look at http://exampledepot.com/egs/java.io/TraverseTree.html, copy the "visitAllFiles" method and implement the "process" method as follows:
        public static void process(File f) {
            System.out.println( f.getAbsolutePath());
        }- Michael

  • Printing binary data in PDF format

    HI all,
      Any idea on how to print Binary content in a PDF format
    I have read a PDF format from application server in a Binary format, I need to print the binary content on a printer in PDF format
    Any help on this is appreciated <REMOVED BY MODERATOR>
    Thanks
    Aakash
    Edited by: Alvaro Tejada Galindo on Jun 9, 2008 3:15 PM

    Hi papick,
    this may be easier than expected for a million dollar erp system:
    You need a PDF printer.
    When I played around with adobe interactive forms our basis guys created a new printer in SPAD with
    Device Attributes
    Device Type PDF1
    Device Class Stabdard Printer
    location PDF-Frontend printer = Standard printer for workstation
    Access Method
    Host Spool Access Method FF
    Host printer                          PDF
    Then need some expremimenting with Functions
    RSPO_OUTPUT_DEVICEDATA Spool Output Control of an Internal Table with Formatted Data
    or something alike (see function group SPOD)
    Then you should be able to create an entry in spooler (SP01) with spool request type adobe pdf document.
    Sorry, I don't have this problem, thus I did not check out the details yet.
    But I'm convinced it should work that way because the ADS server creates a complete PDF binary and it can be printed using the above described printer - actually a HP Laserjet V was configured as frontend printer and it can print the pdf.
    Regards,
    Clemens

  • How to print pdf files not using acrobat product?

    i just want to print pdf files,but not want to use the adobe acrobat or acrobat reader,just want to write a tools print pdf files directly.

    > no i just want to print it,not need to read it.can you help me?
    Well, the problem is to print it you need to be able to read it. Something needs to convert it into a format the printer can understand (most printers are PostScript or PCL).
    I'm not sure you entirely understand what a PDF file is. It's not a fancy text file. It's a binary format. Saying "I want to print a PDF without a PDF interpreter" is like saying "I want to run an EXE without Windows". You need software to interpret the format.
    You certainly can write your own software to interpret the PDF format, convert it to a print language and output that to a printer, but as Aandi said you will need to start by reading the PDF Reference so you know how the inside of a PDF file works, and it will most likely take several years of development even for a seasoned, expert programmer. It's just not as simple as "Printer, meet PDF. PDF, meet printer."

  • How to Convert Binary Data in Binary File

    hi,
    my telecom client puts a binary file which is asn.1 encoded with BER.
    how to handle binary data in java.
    how to convert binary to hexa to ascii format
    how to convert binary to octet to ascii format
    please help me in this.
    regards,
    s.mohamed asif

    You don't need to convert the data.
    Only you can do is print it in that formats, like it:
    public static String byteArrayToHex(byte[] b) {
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < b.length; i++)
             sb.append(Integer.toHexString(b&255) + " ");
    return sb.toString();
    take a look at this
    http://java.sun.com/docs/books/tutorial/essential/io/

Maybe you are looking for

  • I would like to upgrade my reader at no cost

    I would like to upgrade my reader at no cost.  I have 7.0 currently and wtih that version I am not able to open some things

  • Problem setting up Weblogic's data source for oracle

              Hi!           I am trying to setup XA DataSource Pool for Oracle using Weblogic's driver. App-Server           throws exception during startup.           config.xml setting are appended with this posting.           Can somebody help me iden

  • Decorative Additions

    hello :) I'm using Adobe Photoshop Elements 5.0 with Windows XP... and need help with something!! http://photos-114.ll.facebook.com/photos-ll-sctm/v119/213/113/1430790114/n1430790114_3003 3990_5649.jpg The white swirly thing in the top righthand corn

  • To send image to a VC model from Backend system

    hi Experts, Is it possible to send images from backend system to the VC model ????? If yes then how? Regards, Sanjyoti.

  • If my iPhone stopped working, how do I recover all my pictures?

    Well you see, I dropped my iPhone 4S on the floor with the screen facing down and I picked it up and clicked on the home button but the screen turn into different colors. I tried turning it off and on but the screen wouldn't turn on. It was just diff