How i specify font size to SimpleDoc?Is It possible?

how can i specify a font size for my printouts.im using below code and the printer use its default printsize.can eny one help me to specify my own size to it?
private void printObsLine(String textToPrinter) {
          DocFlavor flavor = new DocFlavor("application/octet-stream","java.io.InputStream");
          // printLine = printLine + LINE_SEPERATOR;
          InputStream inS = new ByteArrayInputStream(textToPrinter.getBytes());
          Doc doc = new SimpleDoc(inS, flavor, null);
          //DocAttributeSet docset = new DocAttributeSet();
          PrintService ps = PrintServiceLookup.lookupDefaultPrintService();
          DocPrintJob pj  = ps.createPrintJob();
          PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
          try {
               pj.print(doc, null);
          } catch (Exception e) {
               e.printStackTrace();
          System.out.print(textToPrinter);
     }Thanks.
Edited by: Anushkadar on Dec 15, 2008 8:56 AM

how can i specify a font size for my printouts.im using below code and the printer use its default printsize.can eny one help me to specify my own size to it?
private void printObsLine(String textToPrinter) {
          DocFlavor flavor = new DocFlavor("application/octet-stream","java.io.InputStream");
          // printLine = printLine + LINE_SEPERATOR;
          InputStream inS = new ByteArrayInputStream(textToPrinter.getBytes());
          Doc doc = new SimpleDoc(inS, flavor, null);
          //DocAttributeSet docset = new DocAttributeSet();
          PrintService ps = PrintServiceLookup.lookupDefaultPrintService();
          DocPrintJob pj  = ps.createPrintJob();
          PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
          try {
               pj.print(doc, null);
          } catch (Exception e) {
               e.printStackTrace();
          System.out.print(textToPrinter);
     }Thanks.
Edited by: Anushkadar on Dec 15, 2008 8:56 AM

Similar Messages

  • How to change Font Size of Object Explorer in "SQL Server Management Studio"

    Dear Team,
    "SQL Server Management Studio" is a fantastic IDE for the database.
    There are so many customization options available but one thing many users missing is that " How to change Font Size of Object Explorer?"
    Can you please accumulate this feature in IDE ASAP?
    Many Thanks,
    Bhavesh

    Its there
    Go to Tools -> Options
    Then under Environment you've fonts and colors tab where you can specify a higher font size.
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Can we specify Font size in the Inspector window?

    I am a whiz at MS Word. I'm totally lost in Pages. My current dilemma is how to specify the size of my text in the inspector window. Is it possible?
    Currently, the only way I can change the font size is by clicking Format > Font > Show Fonts > and making the change in the new window. Is that the only way?
    Sigh. Here's hoping I can figure out Pages soon or I'll be stuck in limbo, juggling both a PC and a Mac.

    You might want to explore the keyboard shortcuts.
    ⌘ +T will show your fonts. (Lot easier than using the menu.)
    I also changed the increase font size shortcut from ⌘ + and - to ⌘ + > or <, just like Appleworks. You can change the shortcuts using the keyboard system preference.
    <ol type=>
    Choose Apple menu > System Preferences and click Keyboard & Mouse.
    Click Keyboard Shortcuts.
    To disable a shortcut, deselect the checkbox next to its description in the list.
    To change the key combination for a shortcut, select the character in the Shortcut list. Type a new shortcut by holding down the key combination that you want to use instead.
    Tip: You cannot use each type of key (for example, a letter key) more than once in a key combination.
    Quit and restart any applications you are using for the new keyboard shortcut to take effect.
    Kurt

  • How to change font size on screen

    how to change font size on screen

    I'm not certain what font sizes you wish to change, when on a page you can use command and the += button to zoom in and make the fonts larger. On the finder desktop you can make what ever is on the desktop larger or smaller from the finder menu click view, custom view options, and adjust the icon size with the slider on the top, and the text using the text size box to select the size that your comfortable with.
    Forgot to add these.
    http://support.apple.com/kb/PH10876
    http://support.apple.com/kb/PH10877
    Hope this helps.

  • How to change font size, maximum column size in the result screen ?

    hi All
    That's great when using SQL Dev.
    But I also have a trouble that how to change font size, maximum column size in the result screen ?
    My users think that font in result screen is shown very small, and whenever the data in each colum is long then it's not shown full data in column, they must double click for extend the size. Have the option to default the max size for showing full data in each column ? I try but still not to do that .
    Appreciate for anyone to help us.
    Thanks all.
    Sigmasvn

    You can't change the font for the results screen yet, however you will be able to select an auto-fit option for selected columns, so if some columns have slitghtly wider text you'll be able to set the column widths to handle these wider columns.
    Also, there s the option of switching the layout of a record in the grid.
    Sue

  • How to change font size and style in keynote for ios

    How to change font size and style in keynote for ios

    Same situation for report parameter input value font. What ever we do , it is still Arial and size 10.

  • How to change font size in a call-out tool box?

    Hi, the other day i inserted a call-out tool box in a PDF document, however i cannot find anything that can change the font size of the letters i input in that box. could anyone help? Thanks.
    Sherman

    This is a question for the Acrobat support forums – please post there.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Wed, 23 Nov 2011 10:55:07 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: how to change font size in a call-out tool box?
    Re: how to change font size in a call-out tool box?
    created by danmarch<http://forums.adobe.com/people/danmarch> in PDF Language and Specifications - View the full discussion<http://forums.adobe.com/message/4043425#4043425

  • How to change font size in check printing program in AP Invoice

    I would like to know how to change font size in check printing program in Oracle Payables Module for Invoice printing. We are using Oracle standard
    report to print check.
    Concurrent program short name : APXPBFEL
    Prt file : APLASP.prt
    I modified prt file for code 199 like below
    code "199" esc "(8U" esc "(s0p12.00h10.00v0s0b3T" esc "&k11.75H"
    Font size changed for last page only which prints checks, for Void pages its printed with default font. For Page 1 printed with default font and page 2 has reduced font. This change is not intiallized for all pages.
    Please let me know if you any of you know how to change fonts.
    Thanks,
    Anand

    *Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/

  • How to change font size in textarea?

    how to change font size in textarea?

    to embed a font using actionscript requires adding the font to your library.  to do that, click the upper right of your library panel, click "new font..", select the font you want and click ok.  find the added font in your library, right click, click properties and tick "export for actionscript" (click the actionscript tab if you don't see that option, at first).  assign a class name (eg, WhateverFont).  you can then use:
    var tfor:TextFormat = new TextFormat();
    tfor.size=22;
    var yourfont:Font=new WhateverFont();
    tfor.font = yourfont.fontName;
    ta.setStyle("embedFonts",true);
    ta.setStyle("textFormat",tfor);

  • How to change font size in a table?

    How to change font size in a table without using the font style of another document?  Please show a sample script.  Thanks!

    Hi Dave,
    Thank you so much for the email.  I tried every object and method I can
    posibly think about such as
    myTable.Rows.Item(1).PointSize = 24
    myCell.Characters.Item(1).PointSize = 24
    I got error message all the time.  These objects don’t support PointSize.
    All I need is to change point size of the text in InDesign tables created
    using VBScript. Could you help me with this?  Thanks,
    Regards,
    Li

  • How to change font size

    Just purchased Deskjet 1010 & don't know how to change font size.

    hellinger
    Welcome to the HP Community Forum.
    In most cases you can adjust the scale of your documents before you print.
    Please take a look at the following:
    Manage Print Output with Print Preview
    Click the Kudos Thumbs-Up to say Thank You!
    And...Click Accept as Solution when my Answer provides a Fix or Workaround!
    I am pleased to provide assistance on behalf of HP. I do not work for HP. 
    Kind Regards,
    Dragon-Fur

  • How to change font size on panels?

    How to change font size on panels?

    Peetwo wrote:
    Thanks for your response.
    The Martin Evening book on Lightroom 5 says that you can.  I can’t discern exactly how.
    Maybe, but you are asking in the Camera Raw forum, so I might be excused for not being telepathic.

  • How to specify PACKAGE SIZE for to RFC_READ_TABLE from PyRFC?

    I'm trying to use PyRFC to extract large tables via RFC_READ_TABLE (due to an uncooperative/unsupportive basis team).
    I know that RFC_READ_TABLE supports calling it with PACKAGE SIZE since ERPConnect does it by default.
    In Python for Basis (Part 1), I learned how to specify an Open SQL where clause using the OPTIONS:
    result = connector.call('RFC_READ_TABLE',
                           QUERY_TABLE=tablename,
                           DELIMITER=delimiter,
                           OPTIONS = [{'TEXT':where_clause}])
    Is there a way, and how to specify PACKAGE SIZE in this case?
    Thanks

    Hi,
    the package size works, but you need to call the function module multiple times in a loop. Here's an excerpt of the attached script:
    recordcounter = 1          #needs to be >0 to get the while loop going
    iteration = 0              #the number of times the function module got called
    while recordcounter > 0:  #as long as the function module calll returns rows...
        tempresult = self.call('RFC_READ_TABLE',             
                                ROWSKIPS=iteration*fetchsize,  #defines the number of rows to skip
                                **parameters)
        iteration=iteration+1  #increase the iteration
        data = tempresult['DATA']    #assign the returned rows to a variable
        if len(data) > 0:      #have there been any rows?
            for row in data:      #Do something with them
        else:
            recordcounter=0    #set recordcounter to 0 to end the while loop.
    The script is far away from being perfect. It doesn't deal with RAW fields and the data types it returns are all strings. It does what I needed it to do but it may not be sufficient for what you may be trying to achieve.
    Best regards
    Lars

  • How to increase font size in Java script alert message

    Is anybody know how to increase font size in Java script alert message
    THanks in Advance ....

    Hi,
    You can NOT do it with Javascript.
    You need an alternative solution: http://www.apex-plugin.com/oracle-apex-plugins/dynamic-action-plugin/popup-box_84.html
    Tobias

  • In SAP 4.6c In classical reports output how to change Font size and Font type

    Dear Experts,
    In SAP 4.6c, in classical and interactive reports  output how to change font size and font type.
    Regards,
    Zaker.

    These are HTML formatting questions. Nothing to do with the Oracle SQL and PL/SQL languages.
    With old-style HTML, the font size and family are set using the font tag.
    With modern style HTML, that is done using cascading style sheets (CSS).
    Your favourite search engine will turn up tons of information on both.

Maybe you are looking for

  • Receiver File Empty

    I have been struggling with this for a day now and cant understand what is wrong. I have the following payload which is sent from the pipeline to the receiver comm channel which has content conversion. <?xml version="1.0" encoding="UTF-8" ?> - <ns34:

  • Organize Jpeg & RAW in iphoto....edit in PSE 12... back to iphoto as a duplicate.

    Is there a simple work flow?

  • Help!!! I deleted my default icon sets

    OMG I just deleted my default icon set!!! I accidentally overwritten all of them on candybar 2.6..!!! what should I do? Is there any way to restore it without re-installing MacOSX??? I changed my default aqua theme with Shapeshifter. then I decided t

  • Problem with Activating  char InfoObject

    Hi ,   Due to one transport One InfoObject(Master Data) is Inactivated in quality. I tried to activate this InfoObject manually and by using RSDG_IOBJ_ACTIVATE function module. But it is not activating & I am getting the error message like 1.     Mas

  • HP 3055 not printing since Mac update to 10.8.5

    I recently updated software to the Mac 10.8.5. I have not gone to the Yosemite yet. But since the update I can no longer print etc. It shows the printer but shows it offline and will not take it on line. It appears there are no drivers for that versi