Problem with printing txt file

I have a problem with printing txt file. My code looks like :
String filename = something.txt";
DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
PrintService[] services = PrintServiceLookup.lookupPrintServices(
          flavor, null);
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
pras.add(PrintQuality.DRAFT);
pras.add(new Copies(1));
pras.add(MediaSizeName.ISO_A4);
pras.add(Sides.ONE_SIDED);
pras.add(Chromaticity.MONOCHROME);
PrintService service = ServiceUI.printDialog(null, 200, 200,
          services, services[0],
          null,
          pras);
if (service != null)
try
DocPrintJob job = service.createPrintJob();
FileInputStream fis = new FileInputStream(filename);
DocAttributeSet das = new HashDocAttributeSet();
Doc doc = new SimpleDoc(fis, flavor, das);
job.print(doc, pras);
Thread.sleep(10000);
catch(FileNotFoundException e)
catch(PrintException e1)
catch(InterruptedException e2)
It doesn't work :(
What is my purpose: I would like to print .txt file but I would like to get PrintDialog where I can choose PrintQuality, Chromaticity etc. I found also that I should use DocFlavor.INPUT_STREAM.TEXT_PLAIN_HOST but I don't know how.
I will be very gratefull for help :)

I tested it on 3 printers (different models of hp). 2 of them don't give me any error but when it started print priter stoped (just as it dosesn't have a paper), but 1 of them doesn't react (there were no errors), i thought tahat something was wrong with printers but when I change DocFlavor.INPUT_STREAM.AUTOSENSE to DocFlavor.GIF and filename to dog.gif it works so mybe there is another way to print txt file

Similar Messages

  • Problem with printing pdf file

    hello,
    lately i have problem with printing pdf file:
    i click on the print button and the respod is very slow
    it takes more than a minute till the print window apears.
    i tryied to install version X but it's the same, the problem exist only when printing via adobe reader,
    other programs i'd working much faster.
    please advice,
    thank you

    No, it is not set to overprint. Also, I have to add that the printing results were not consistent. Sometimes it covered and sometimes it did not.

  • Problems With Downloading TXT File

    I have a procedure that when called creates a .txt file, which is used as an upload to another application.
    If I run my procedure, the txt file is created, but when I look at the file, it contains the required records but also information about the page.
    See below.
    My code is
    create or replace PROCEDURE mer_fuel_coupon_download_1 IS
    CURSOR c_fuel_coupon IS
    SELECT A.VIN,
        A.FIRST_BFG,
        F.DRIVER_POSITION,
        A.BFG_NO,
        C.MAKES MAKE,
        D.MODEL,
        A.FRG_NO,
        E.COLOUR,
        A.MANUFACTURED_DATE MANUFACTURED,
        A.DEREG_ON,
        A.OTHER_VRN NON_BFG_REG_NO,
        B.VALID_FROM,
        B.VALID_UNTIL,
        'Not Held Anymore' UNREG_FROM,
        'Not Held Anymore' UNREG_TO,
        G.FUEL_TYPE,
        A.CC,
        A.FUEL_RATION,
        H.PERSONAL_NO,
        I.RANK,
        H.FIRST_NAME,
        H.SURNAME,
        'Not Held Anymore' HEAD_OF_FAMILY,
        J.UIN,
        TO_DATE(H.DATE_OF_BIRTH,'DD-MON-YY') DATE_OF_BIRTH,
        J.UNIT_NAME,
        K.BFPO,
       -- A.ITEM_ID
        ROWNUM
      FROM MER_IMPORTED_ITEMS A,
           MER_VEHICLE_OWNERSHIPS B,
           MER_MAKES C,
           MER_MODELS D,
           MER_COLOURS E,
           MER_DRIVER_POSITION F,
           MER_FUEL_TYPE G,
           MER_PERSONS H,
           MER_RANKS I,
           MER_UNITS J,
           MER_BFPO K
      WHERE H.PERSONAL_ID(+) = B.PERSONAL_ID
      AND B.ITEM_ID(+) = A.ITEM_ID
      AND C.MAKE_ID(+) = A.MAKE_ID
      AND D.MODEL_ID(+) = A.MODEL_ID
      AND E.COLOUR_ID(+) = A.COLOUR_ID
      AND F.DRIVER_POSITION_ID(+) = A.DRIVER_POSITION_ID
      AND G.FUEL_TYPE_ID(+) = A.FUEL_TYPE_ID
      AND I.RANK_ID(+) = H.RANK_ID
      AND J.UNIT_ID(+) = H.UNIT_ID
      AND K.BFPO_ID(+) = J.BFPO_ID
      AND A.BFG_NO IS NOT NULL
      AND (A.DEREG_ON IS NULL
      OR A.DEREG_ON    > (SYSDATE - 1826));
      line_of_data VARCHAR2(5000);
      dir_prob         EXCEPTION;
      file_write_done  EXCEPTION;
      record_ct        NUMBER(6) :=0;
      output_file      VARCHAR2(12) := 'FUEL.TXT';
      target_file      utl_file.File_Type;
      success_ct       NUMBER(6) :=0;
      fail_ct          NUMBER(6) :=0;
    BEGIN
    -- Set MIME type
    owa_util.mime_header( 'application/octet', FALSE );
    -- Set name fo file
    htp.p('Content-Disposition: attachment; filename="FUEL.TXT"');
    -- Close the HTTP header
    owa_util.http_header_close;
    BEGIN
    FOR r_fuel IN c_fuel_coupon
        LOOP
         BEGIN
    line_of_data := r_FUEL.VIN||','
    ||TO_CHAR(r_FUEL.FIRST_BFG,'DD/MON/YY')||','
    ||r_FUEL.DRIVER_POSITION||','
    ||r_FUEL.BFG_NO||','
    ||r_FUEL.MAKE||','
    ||r_FUEL.MODEL||','
    ||r_FUEL.FRG_NO||','
    ||r_FUEL.COLOUR||','
    ||TO_CHAR(r_FUEL.MANUFACTURED,'DD/MON/YY')||','
    ||TO_CHAR(r_FUEL.DEREG_ON,'DD/MON/YY')||','
    ||r_FUEL.NON_BFG_REG_NO||','
    ||TO_CHAR(r_FUEL.VALID_FROM,'DD/MON/YY')||','
    ||TO_CHAR(r_FUEL.VALID_UNTIL,'DD/MON/YY')||','
    ||r_FUEL.UNREG_FROM||','
    ||r_FUEL.UNREG_TO||','
    ||r_FUEL.FUEL_TYPE||','
    ||r_FUEL.CC||','
    ||r_FUEL.FUEL_RATION||','
    ||r_FUEL.PERSONAL_NO||','
    ||r_FUEL.RANK||','
    ||r_FUEL.FIRST_NAME||','
    ||r_FUEL.SURNAME||','
    ||r_FUEL.HEAD_OF_FAMILY||','
    ||r_FUEL.UIN||','
    ||TO_CHAR(r_FUEL.DATE_OF_BIRTH,'DD/MON/YY')||','
    ||r_FUEL.UNIT_NAME||','
    ||r_FUEL.BFPO||','
    --||r_FUEL.ITEM_ID||','
    ||r_FUEL.ROWNUM||','
    || CHR(13)||CHR(10);
    htp.prn(line_of_data);
    success_ct := success_ct + 1;
    EXCEPTION
    WHEN no_data_found THEN
              RAISE file_write_done;
            WHEN others THEN
              fail_ct := fail_ct + 1;
    END;
        END LOOP;
    END;
    END;At the end of the txt file, I see information like this
    <head>
    <title>Fuel Coupon Download</title>
    <link rel="stylesheet" href="/i/themes/theme_20/theme_3_1.css" type="text/css" />
    <link rel="stylesheet" href="/i/bfg_css/j6.css" type="text/css" />
    <script type="text/javascript" src="/i/bfg_javascript/jquery/jquery-1.3.2.js"></script>
    <link rel="stylesheet" href="/i/bfg_javascript/jquery/jqueryui/themes/redmond/jquery-ui-1.7.2.custom.css" type="text/css" />
    <script type="text/javascript" src="/i/bfg_javascript/jquery/jqueryui/jquery-ui-1.7.2.custom.js"></script>
    <script type="text/javascript" src="/i/bfg_javascript/j6_javascript.js"></script>
    <!--[if IE]><link rel="stylesheet" href="/i/themes/theme_20/ie.css" type="text/css" /><![endif]-->
    <style>
    * {font-size: 10pt;font-family: Tahoma,Arial,Helvetica,Geneva,sans-serif};
    </style>
    <script src="/i/javascript/apex_ns_3_1.js" type="text/javascript"></script>
    <script src="/i/javascript/apex_3_1.js" type="text/javascript"></script>
    <script src="/i/javascript/apex_get_3_1.js" type="text/javascript"></script>
    <script src="/i/javascript/apex_builder.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    /*Global JS Variables*/
    var htmldb_Img_Dir = "/i/";
    //-->
    </script>
    <link rel="stylesheet" href="/i/css/apex_3_1.css" type="text/css" />
    <!--[if IE]><link rel="stylesheet" href="/i/css/apex_ie_3_1.css" type="text/css" /><![endif]-->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    </head>
    <body ><form action="wwv_flow.accept" method="post" name="wwv_flow" id="wwvFlowForm">
      <input type="hidden" name="p_flow_id" value="111" id="pFlowId" />  <input type="hidden" name="p_flow_step_id" value="388" id="pFlowStepId" />  <input type="hidden" name="p_instance" value="1780009464230900" id="pInstance" />  <input type="hidden" name="p_page_submission_id" value="18077377520018" id="pPageSubmissionId" />  <input type="hidden" name="p_request" value="" id="pRequest" /><div id="t20PageHeader">
    <table border="0" cellpadding="0" cellspacing="0" summary="">
    <tr>
    <td id="t20Logo" valign="top"><span style="font-family:Arial; color:#FFFFFF; font-size:18px; white-space:nowrap; font-weight:bold;">Vehicle Licensing Office Application</span><br /></td>
    <td id="t20HeaderMiddle"  valign="top" width="100%"><br /></td>
    <td id="t20NavBar" valign="top"><br /></td>
    </tr>
    </table>
    </div>
    <div id="t20BreadCrumbsLeft"></div>
    <table border="0" cellpadding="0" cellspacing="0" summary="" id="t20PageBody"  width="100%" height="70%">
    <td width="100%" valign="top" height="100%" id="t20ContentBody">
    <div id="t20Messages"></div>
    <div id="t20ContentMiddle"></div>
    </td>
    <td valign="top" width="200" id="t20ContentRight"><br /></td>
    </tr>
    </table><table border="0" cellpadding="0" cellspacing="0" summary="" id="t20PageFooter" width="100%">
    <tr>
    <td id="t20Left" valign="top"><span id="t20UserPrompt">ADMIN</span><br /></td>
    <td id="t20Center" valign="top"></td>
    <td id="t20Right" valign="top"><span id="t20Customize"></span><br /></td>
    </tr>
    </table>
    <br class="t20Break"/>
    <input type="hidden" name="p_md5_checksum" value=""  /></form>
    <script type="text/javascript">
    <!--
    //-->
    </script><!-- Code generated for user with developer privileges.  -->
    <script type="text/javascript">
    function popupInfo()
      w = open("f?p=4000:34:1780009464230900:PAGE:NO:34:F4000_P34_SESSION,F4000_P34_FLOW,F4000_P34_PAGE:1780009464230900,111,388","winLov","Scrollbars=1,resizable=1,width=700,height=450");
      if (w.opener == null)
         w.opener = self;
         w.focus();
    </script><table cellpadding="0" border="0" cellspacing="0" summary="Developer Toolbar" align="center"><tbody><tr><td><a class="htmldbToolbar" href="f?p=4500:1000:1780009464230900" style="border-left:1px solid black;" title="Application Express Home">Home</a></td><td><a class="htmldbToolbar" title="Application 111" href="f?p=4000:1:1780009464230900::NO:1,4150,RP:FB_FLOW_ID,FB_FLOW_PAGE_ID,F4000_P1_FLOW,F4000_P4150_GOTO_PAGE,F4000_P1_PAGE:111,388,111,388,388" style="border-left:1px solid #000000;border-right:1px solid #000000;">Application 111</a></td><td><a class="htmldbToolbar" title="Edit Page 388" href="f?p=4000:4150:1780009464230900::NO:1,4150:FB_FLOW_ID,FB_FLOW_PAGE_ID,F4000_P1_FLOW,F4000_P4150_GOTO_PAGE,F4000_P1_PAGE:111,388,111,388,388">Edit Page 388</a></td><td><a class="htmldbToolbar" href="f?p=4000:336:1780009464230900::::FB_FLOW_ID,FB_FLOW_PAGE_ID,F4000_P1_FLOW,F4000_P4150_GOTO_PAGE,F4000_P1_PAGE:111,388,111,388,388" style="border-left:1px solid black;" title="Create">Create</a></td><td><a class="htmldbToolbar" href="javascript:popupInfo()" style="border-left:1px solid black;" title="Session">Session</a></td><td><a class="htmldbToolbar" href="f?p=4000:14:1780009464230900::::FB_FLOW_ID,FB_FLOW_PAGE_ID,F4000_P1_FLOW,F4000_P4150_GOTO_PAGE,F4000_P1_PAGE:111,388,111,388,388" style="border-left:1px solid black;" title="Activity">Activity</a></td><td><a class="htmldbToolbar" title="Debug" style="border-left:1px solid black;" href="f?p=111:388:1780009464230900::YES">Debug</a></td><td id="hideEdit" style="display:none;"><a class="htmldbToolbar" title="Hide Edit Links" href="javascript:quickLinks('HIDE');"  style="border-right:1px solid #000000;border-left:1px solid black;">Hide Edit Links</a></td><td id="showEdit"><a class="htmldbToolbar" title="Show Edit Links" href="javascript:quickLinks('SHOW');"  style="border-right:1px solid #000000;border-left:1px solid #000000;">Show Edit Links</a></td></tr></tbody></table>
    <script type="text/javascript">
       if(GetCookie('ORA_WWV_QUICK_EDIT') != null){
           if(GetCookie('ORA_WWV_QUICK_EDIT') == 'SHOW')
               quickLinks('SHOW');
    </script>
    </body>
    </html>Can anyone tell me why it is tagging this information on to my txt file
    Cheers
    Gus

    Hi,
    before exception handler call
    apex_application.g_unrecoverable_error := true;Regards,
    Jari

  • Problem with printing pdf file created from Illustrator

    Hello,
    In a drawing I created with Illustrator 10.0.3 I covered part of a circle with a white rectangle (to make it disappear). I saved it as pdf. When printing the pdf (under Linux with a HP printer), the covered part reappeared. However the pdf-file is how it should be. Anybody knows what the problem is?

    No, it is not set to overprint. Also, I have to add that the printing results were not consistent. Sometimes it covered and sometimes it did not.

  • Problem with printing from file to printer

    I've been having problems printing more than one page of text from a file to a specified printer in addition to the fact that the number of pages the print dialog says are to be printed is always 9999! I have tried overriding functions from Pageable too, which gave me problems. I tried making the pageIndex more than one page, but it just prints out blank pages after the first, even if there is more data in the file that should have been printed. Here is my code, and if someone could give me some helpful advice I would very much appreciate it! (Thanks in advance for your advice!)
    import java.awt.*;
    import java.awt.print.*;
    import java.io.*;
    import javax.swing.*;
    public class MyPrinter implements Printable, Runnable { //, Pageable {
    private static Font fnt = new Font("Serif", Font.PLAIN, 11);
    protected PrinterJob job;
    protected MyDialog dialog = new MyDialog();
    protected RandomAccessFile raf;
    protected JFrame mainFrame;
    protected String fileName;
    protected File printFile;
    public MyPrinter(JFrame mFrame) { mainFrame = mFrame; } // end constructor
    public void printFile(String name) {// gives error message if file doesn't exist!
    printFile = new File(name);
    fileName = name;
    if((printFile.exists()) && (printFile.canRead())) {
    Thread myThread = new Thread(this);
    myThread.start();
    } // end if
    else {
    dialog.showError("Datei "+fileName+" existert nicht!", "Fehler mit Drucken");
    } // end else
    } // end printFile
    public void run() {
    job = PrinterJob.getPrinterJob();
    job.setPrintable(this); // Printable is an instance of myPrint
    if(job.printDialog()) { // user didn't cancel the printing
    try { job.print(); } // end try
    catch (PrinterException pe) {dialog.showError("Fehler: "+pe.getMessage(), "Problem");}
    } // end if
    } // end run
    public int print(Graphics g, PageFormat pf, int pageIndex)
    throws PrinterException {
    // pageIndex # corresponds to page number # + 1
    if (pageIndex > 0) { return Printable.NO_SUCH_PAGE; } // end if
    else {
    g.setFont(fnt);
    g.setColor(Color.black);
    int x = 75, y = 80;
    String oneLine;
    try {
    raf = new RandomAccessFile(fileName, "r");
    int fileLength = (int)printFile.length();
    while((((int)raf.getFilePointer()) < fileLength)) {
    oneLine = raf.readLine();
    g.drawString(oneLine, x, y);
    y += 15;
    } // end while loop
    raf.close();
    } // end try
    catch(IOException e) { dialog.showError("Fehler: "+e.getMessage(), "Problem");}
    return Printable.PAGE_EXISTS;
    } // end else
    } // end print
    /*public Printable getPrintable(int pageIndex) {
    return this;
    } // end getPrintable
    public int getNumberOfPages() {
    return 1;
    } // end getNumberOfPages
    public PageFormat getPageFormat(int pageIndex) {
    return job.defaultPage();
    } // end getPageFormat
    } // end MyPrinter class

    Well, I changed some things around, and assuming that in a file around 45 lines is a normal page, I am able to get the right amount of pages to be displayed in the dialog and to print, but still, the first page is printed fine and the rest are blank. I am baffled as to what I'm doing wrong. Printing to a printer should not be this hard to do! I have also noticed that many other people have had the same problem, but with no solutions. I am using the jdk 1.3.1 - is that a problem? Here is my new code and if anyone can propose a solution to the blank pages problem I would be very grateful!
    import java.awt.*;
    import java.awt.print.*;
    import java.io.*;
    import javax.swing.*;
    public class MyPrinter implements Runnable {
    protected PrinterJob job;
    protected MyPrintable myPrint = new MyPrintable();
    protected MyPageable myPage = new MyPageable();
    protected MyDialog dialog = new MyDialog();
    protected RandomAccessFile raf;
    //protected Startmenu mainMenu;
    protected String fileName;
    protected File printFile;
    protected int numPages = 0;
    public MyPrinter() { } // end constructor
    public void printFile(String name) {// gives error message if file doesn't exist!
    printFile = new File(name);
    fileName = name;
    if((printFile.exists()) && (printFile.canRead())) {
    Thread myThread = new Thread(this);
    myThread.start();
    } // end if
    else {
    dialog.showError("Datei "+fileName+" existert nicht!", "Fehler mit Drucken");
    } // end else
    } // end printFile
    public void run() {
    numPages = findNumPages();
    job = PrinterJob.getPrinterJob();
    job.setPageable(myPage); // this is an instance of Pageable
    if(job.printDialog()) { // user didn't cancel the printing
    try {
    job.print();
    try { raf.close(); } // end try
    catch(IOException e) { dialog.showError("Fehler: "+e.getMessage(), "Problem");}
    } // end try
    catch (PrinterException pe) {dialog.showError("Fehler: "+pe.getMessage(), "Problem");}
    } // end if
    } // end run
    private int findNumPages() {
    try {
    numPages = 0;
    raf = new RandomAccessFile(fileName, "r");
    int fileLength = (int)printFile.length();
    int lineNumber = 0;
    while((int)raf.getFilePointer() < fileLength) {
    lineNumber = 0;
    while((((int)raf.getFilePointer()) < fileLength) && (lineNumber < 45)) {
    raf.readLine();
    lineNumber++;
    } // end while loop
    numPages++;
    } // end while loop
    raf.seek(0);
    } // end try
    catch(IOException e) { dialog.showError("Fehler: "+e.getMessage(), "Problem");}
    return numPages;
    } // end findNumPages
    public class MyPageable implements Pageable {
    public Printable getPrintable(int pageIndex) { return myPrint; } // end getPrintable
    public PageFormat getPageFormat(int pageIndex) {
    PageFormat pf = new PageFormat();
    pf.setOrientation(PageFormat.PORTRAIT);
    return pf;
    } // end getPageFormat
    public int getNumberOfPages() {
    return numPages; // test
    //return ((int)printFile.length()/4000); // assume 4KB per page
    } // end getNumberOfPages
    } // end MyPageable class
    public class MyPrintable implements Printable {
    private Font fnt = new Font("Serif", Font.PLAIN, 11);
    protected int lastPageIndexChecked = -1;
    public int print(Graphics g, PageFormat pf, int pageIndex)
    throws PrinterException {
    // pageIndex # corresponds to page number # + 1
    pf.setOrientation(PageFormat.PORTRAIT);
    if (pageIndex >= numPages) { return Printable.NO_SUCH_PAGE; } // end if
    else {
    g.setFont(fnt);
    g.setColor(Color.black);
    String oneLine;
    int x = 75, y = 80, lineNumber = 0;
    try {
    int fileLength = (int)printFile.length();
    while((((int)raf.getFilePointer()) < fileLength) && (lineNumber < 50)) {
    oneLine = raf.readLine();
    lineNumber++;
    g.drawString(oneLine, x, y);
    y += 15;
    } // end while loop
    } // end try
    catch(IOException e) { dialog.showError("Fehler: "+e.getMessage(), "Problem");}
    return Printable.PAGE_EXISTS;
    } // end else
    } // end print
    } // end MyPrintable class
    } // end MyPrinter class

  • Problem with printing pdf file HP 845c windows 7

    When I am printing a pdf file it is not printed well, the ink is grey and it is difficult to read.

    No, it is not set to overprint. Also, I have to add that the printing results were not consistent. Sometimes it covered and sometimes it did not.

  • Problem with printing to files....................

    Well....i need to write a progr tat transfers filename from client to server asnd then the server coies that file(in a directory)....but im not able to do it...im unable to write to files...i dont know y?....
    import java.io.*;
    import java.net.*;
    public class fserver
         public static void main(String args[]) throws Exception
              ServerSocket ss=new ServerSocket(9090);
              Socket s=ss.accept();
              while(true)
                   DataInputStream dis=new DataInputStream(s.getInputStream());
                   PrintStream ps=new PrintStream(s.getOutputStream());
                   String s1=dis.readLine();
                   DataInputStream dis1=new DataInputStream(new FileInputStream(s1));
    String savepath="";
    savepath=s1.substring(1+s1.lastIndexOf('\\'));
    System.out.println("Saving file as:"+savepath);
    FileWriter fw=new FileWriter(savepath);
                   String st;
    fw.write("dfjsdklfdlk");//well the file should atleast contain this.......but it is not receiving even this....but the next //system.out.pritln is working perfectly(in the while loop)
                   /*while((st=dis1.readLine())!=null)
                        System.out.println(st);fw.write(st);
    ps.println("File OK");
                   System.out.println("Received the requested file");System.exit(1);
    }

    Hi,
    I would recommend to start reading this http://java.sun.com/docs/books/tutorial/networking/sockets/index.html
    Or
    There is more efficient way by using FileChannel ex;
    public class FileServer {
         static int counter = 1;
         public static void main(String args[]) throws IOException {
              ServerSocketChannel serverSocket = null;
              try{
                    serverSocket = ServerSocketChannel.open();
                   serverSocket.socket().bind(new InetSocketAddress(444));
                   String fName = "c:\\tmp\\abc"+"_"+counter + " .txt";
                   FileOutputStream fos = new FileOutputStream(fName);
                   FileChannel incoming =fos.getChannel();
                   long count = incoming.size();
                   while(true){
                        SocketChannel sock = serverSocket.accept();
                        incoming.transferFrom(sock, 0, 1024);
                        counter++;
              }catch(Exception e){
                   e.printStackTrace();
              }finally {
                   serverSocket.close();
    * This is any client tries to send a file into the server
    * @author alan
    public class FileClient {
         public static void main(String args[]) throws IOException{
              FileChannel fChannel = null;
              FileInputStream inFile = null;
              try {
                   SocketChannel clientSocket = SocketChannel.open(new InetSocketAddress("localhost", 444));
                    inFile = new FileInputStream("c:\\tmp\\file1.txt");
                    fChannel = inFile.getChannel();
                    long count = inFile.getChannel().size();
                    System.out.println(count);
                    fChannel.transferTo(0,count, clientSocket);
              } catch (NumberFormatException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              }finally {
                fChannel.close(); // always
                inFile.close(); // always
    }Regards,
    Alan Mehio
    London,UK

  • Problem with printing files created by tcpdf class

    Hello,
    I have problem with printing pdf files created with tcpdf php class which contain embedded fonts
    http://www.tecnick.com/pagefiles/tcpdf/example_008.pdf
    Could someone try to print that example file at his Reader (printing to file .ps will be fine).
    I'm trying to determinate if problem is in my system (Ubuntu 8,04) in Reader or in class.
    Thanks in advance

    No problem with Adobe Reader 8 or 9 .

  • Printing Error: There is a problem with a font file.

    I get this error when I try to print:
    "Printing Error: There is a problem with a font file."
    I tried exporting to PDF and printing from there. I get this message:
    "An error exist on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem."
    Has anyone encountered this problem?

    You may have a corrupted font. Try substituting fonts to see which one is the problem.

  • Problem with printing graphics in SAP Script

    Hi,
    I am facing problem with printing of graphics in SAP Script. I uploaded a bitmap file from pc to se78. Then I inserted it in SAP script.
    I am able to view it in the printpreview as well as in the spool number. But it is not getting printed.
    Plese tell me the solution.
    Thanks,
    Srinivas

    You need to check your printer settings.Might be drivers are missing.

  • Problem with printing from Acrobat Reader XI

    SInce I installed Acrobat Reader XI I have got problems with printing out pages. The text starts a bit down (2 cm) on the paper, resulting that the last part of the text on the page will be missing. And the missing part does not follow on page 2, it just don´t comes out!
    It doesn´t matter what settings i click in on the print setting page in Acrobat Reader, it always gets the same result.
    Does anyone know what can be the problem?

    No files appeared in C:\Users\Pavilion\AppData\Roaming\Adobe\Adobe PDF\Settings but they did appear in Distiller.
    I tried to copied them from C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Settings, but found they were already there.  I copied them by adding -COPY before .joboptions in the name.  Now they appeared in  Printing Preferences with the -COPY added.
    I tested a print from Word (using File / Print), but was not prompted for the filename or location.  I checked my entire system and couldn't find the PDF file anywhere.  I tried changing the Port to Desktop\*.pdf using Printer Properties, but that didn't work either.
    I was able to successfully use the Acrobat menu item in Word & Excel to create a PDF but it automatically created the file on the Desktop without an option to change the filename.
    After several days and hours, I gave up and installed Acrobat X on the W7 computer.  I can still use Acrobat XI on the W8 computer.  So be it!
    Thanks anyway for your attempts to help.

  • Problem with printing more than one page (ghostscript broken?)

    Hello,
    since one of the last package updates I have problems with printing more than one page. The print problems occurs as well with pdf files as well with printing websites. I use an actual KDE system with commercial turboprint printer driver. The first page always prints fine, but all consecutive pages are corrupted.  As from a similar problem some months ago, I assume a broken ghostscript package. I tried to downgrade ghostscript to check that, but I get depency problems:
    root@arch32 dieter]# ls -l /var/cache/pacman/pkg/ghostscript-*
    -rw-r--r-- 1 root root  9906288 21. Mär 2010  /var/cache/pacman/pkg/ghostscript-8.71-3-i686.pkg.tar.xz
    -rw-r--r-- 1 root root 11402624  8. Okt 22:44 /var/cache/pacman/pkg/ghostscript-9.00-1-i686.pkg.tar.xz
    [root@arch32 dieter]# pacman -U /var/cache/pacman/pkg/ghostscript-8.71-3-i686.pkg.tar.xz
    Löse Abhängigkeiten auf...
    Suche nach Zwischen-Konflikten...
    Fehler: Konnte den Vorgang (Kann Abhängigkeiten nicht erfüllen) nicht vorbereiten
    :: libspectre: benötigt ghostscript>=9.00
    [root@arch32 dieter]#
    Anyone else having printing problems or a solution for my problem?
    Thanks, Dieter

    This may not be related but I had a problem printing a pdf today whereby the second page got corrupted. The same pdf had printed fine several months ago. I realised that (long story) for some reason I had switched drivers (HP printer) from hpijs to hpcups. I installed the printer again as a "new" printer using the hpijs driver and it printed properly this time.
    So it may be that the bug causes issues with some drivers. You could try an alternative driver for the printer as temporary workaround?

  • Problem with printing some report

    hi very body
    we have some problems with printing some reports.
    the problem is when printing a report the computer processes stoped
    and i should restart the computer a gain to print the report for first time and
    then in the second time i have same problem.

    Maher,
    You can check out the new printer driver test utility verions2.0 on OTN at:
    http://otn.oracle.com/software/products/reports/files/printerdrivertest.zip
    This should help you determine if it is a printer problem or whether you should look into another area.
    Also, you don't mention which version of reports, what command line options your using, the computer
    configuration your using whether it is a network printer or local printer connected to the machine. Support
    will need this information to help determine where your problem lies.
    Regards,
    The Oracle Reports Team

  • How do Print TXT file in JAVA...?

    Dear sir,
    i have a program for printing txt file.... i tried below program..
    1. This code executed without exception... but its not printing.... when i saw print buffer, file is add but not printing
    2. Please help me out.... or give me some clue.... where i doing wrong....?
    Note:- am trying remote printing
              try {
                   FileInputStream fin = new FileInputStream(".\\file\\down.txt");
                   // set up attributes set
                   PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
                   pras.add(new Copies(1)); // number of copies
                   // find the priner service
                   PrintService pss = PrintServiceLookup.lookupDefaultPrintService();
                   if (pss == null)
                        throw new RuntimeException("No printer services available.");
                   PrintService ps = pss;
                   System.out.println("Printing to " + ps);
                   // create print job
                   DocPrintJob job = ps.createPrintJob();
                   // print data
                   Doc doc = new SimpleDoc(fin, DocFlavor.INPUT_STREAM.AUTOSENSE, null);
                   // print it
                   job.print(doc, pras);
                   // close file
                   fin.close();
              } catch (IOException ie) {
                   ie.printStackTrace();
              } catch (PrintException pe) {
                   pe.printStackTrace();
              }Thank you
    boss134

    Hi ,
    i m asking if you got a solution for your problem ;
    i need solution to the same problem
    thx in advance

  • Tempo problems with imported wav files

    Hey everyone, sorry if there's a quick fix for this in the forums that I couldn't find, but I've been having some tempo problems with imported .wav files.
    Long story short, my system couldn't handle playing all the tracks for a song while recording drums, so I bounced out an mp3 of the song and put it in a new Logic file so my drummer could just play along to that as I recorded him. Unfortunately, the original song is at 167 bpm, but I forgot to change the bpm in the new Logic file with the .mp3 file of the song to 167 bpm, so it was left at the default 120 bpm.
    So, the drums were recorded at the correct 167 bpm, but Logic thinks that those new drum .wav files should be played at 120 bpm, so when I import my drum tracks back into the original file, they do not play correctly at all.
    I could get record it all again, but I wanted to check if there was a way I could salvage what I already have, since my drummer lives about an hour away right now and can't just come over whenever he wants.
    Thanks for the help! I really appreciate it.

    Hi,
    First, do not use MP3 in Logic, the sound quality is less than AIFF, WAV or CAF, and Logic has to decode it for playback, making it a heavier burden on the CPU than an uncoded audiofile, such as AIFF, WAV or CAF.
    Secondly, audio files are independent of Logic's tempo. If you bounce down an audio file in any format (other than Apple Loop), it will play back at the same speed, +regardless of Logics' tempo setting+, either at recording or playback. Logic doesn't 'think' anything. The BPM is only important to MIDI tracks, or to the spacing between audio files. The audio files themselves *are not affected* by the tempo setting. If you import an audio file of tempo 167 into a 120 BPM project, the file will still play at 167, only Logic will indicate the wrong bar positions.
    regards, Erik.

Maybe you are looking for

  • MOVED: URGENT, please I really need help :(((

    This topic has been moved to Intel Core-iX boards. https://forum-en.msi.com/index.php?topic=161285.0

  • Cost booking in CATS

    I have done time recording through CAT2 , transfered to project through CATA/CAT5 after approval of time recording. Still cost is not updated in the report what may be the reason????? In which separate reports I can see the approval of time recording

  • Bind to in-process report server failed --- urgent

    Dear all, I installed 10g R2 application server on RHEL AS 4.0 with infrastructure and Business intelligence in the same machine. After the installation I tested the forms, iit is working fine by running a test form but when i tried to test a demo re

  • M7050 Error in STO while doing PGI

    Hi All, While doing PGI for STOs , we are getting balance not zero error. can any one help me resolve this error. Thanks and Regards, Hyma

  • Communicate with Omron PLC

    Hi, All LV Experts. I have 1 project which require using LV 8.2 to communicate with Omron PLC model CJ1M-CPU11, surf around & found out that require using IA OPC server which I don't have & do not plan to invest on it. So, seek for other advise on ho