Formatting a GregorianCalendar object for printing

Hello,
I've got a JLabel in which I wish to put a GregorianCalendar object as a string. Now if I just print it out there it doesn't look as I wish... I basically just want the year, month and day to be there (and if possible in a format of my choice), not the time or the timezone.
How do I do this? Probably it's easy peasy but I've tried looking through the API and it didn't help me much in this matter so help is appreciated.
Thanks in advance.

Use SimpleDateFormat.

Similar Messages

  • Need a Graphic Object for printing

    Hi,
    I generate a report with data from a database.
    At the moment I have an object that implements printable.
    Everytime the print method is called the report has
    to be created new.
    Now I want a seperate Graphics2D object in which teh report
    is created for once. And when a print
    job is started I want to copy it to the Graphics object
    in the printmethod.
    How can I create a Graphics2D Object for my own ?
    Thanx Stephan

    try:
    BufferedImage bufferedImage = new BufferedImage(500, 200, BufferedImage.TYPE_INT_RGB);
    Graphics2D g = (Graphics2D) bufferedImage.getGraphics();
    g.drawString("Go to town!", 10, 10);This is how I did it when I needed to create images in a servlet. I expect it would also work for printing purposes... I guess I'll find out soon enough. :)

  • Authorization object for print preview

    Hi
    I am looking for the authorization object to restrict print of the document.
    Please help me.
    Regards
    Raju

    You can restrict with this object S_SPO_ACT (Spool: Actions)below mention activity
    ATTR     Change order attributes
    AUTH     Change authorization field
    BASE     Visibility
    COMP     Use as components of composite request
    DELE     Delete
    DISP     Display contents
    DOWN     Download
    EDIT     Change contents (currently only for composite requests)
    PRNT     Print once
    REDI     Divert to same printer type
    REPR     Print several copies
    SEND     Send to SAPoffice
    USER     Change owner
    You can restrict device name & type under the object  S_SPO_DEV(Device authorizations)
    You can restrict  Restriction on Maximum Number of Pages  under this object S_SPO_PAGE(Restriction on Maximum Number of Pages)

  • Formatting HTML in DWCS3 for Print Output

    MacOS 10.5.1
    DW CS3
    I am creating a calendar page with just a single week for a
    school that can be viewed thru a browser & printed thru,
    say, a laser printer. But to have the fonts readable, I needed to
    make them larger. Consequently, when printing, the formatting is
    messed up. Is there a way to address this?
    Thanks, -Barry

    Give it a print stylesheet -
    http://www.alistapart.com/articles/goingtoprint/
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "paiwacket" <[email protected]> wrote in
    message
    news:fo7hmo$slc$[email protected]..
    > MacOS 10.5.1 DW CS3 I am creating a calendar page with
    just a single week
    > for
    > a school that can be viewed thru a browser &amp;
    printed thru, say, a
    > laser
    > printer. But to have the fonts readable, I needed to
    make them larger.
    > Consequently, when printing, the formatting is messed
    up. Is there a way
    > to
    > address this? Thanks, -Barry
    >

  • Creating new graphics object from a existing one and sending it for print

    Hello,
    i have a graphics object which is big in size, I am creating a new graphics object from the existing one as given below
    //map is a graphic object
    Graphic g1 = (Graphic)map.create(x,y,width,height);
    Graphic g2 = (Graphic)map.create(x,y,width1,height1);
    Graphic g3 = (Graphic)map.create(x,y,width2,height2);
    arrayList.add(g1);
    arrayList.add(g2);
    arrayList.add(g3);
    Now I want to send the graphic object g1,g2,g3 for print in the method
    public int print (Graphics g, PageFormat pf, int idx) throws PrinterException {
    // Printable's method implementation
    if (curPageFormat != pf) {
    curPageFormat = pf;
    pages = repaginate (pf);
    if (idx >= 3)) {
    return Printable.NO_SUCH_PAGE;
    g = (Graphics) arrayList.get(idx);
    return Printable.PAGE_EXISTS;
    This is not working... what is wrong. can anybody suggest..
    I tried standardprint.java to print a object inside a scrollpane, it is not printing the entire diagram. so I am thinking of something like this.... Please let me know what to do....
    Thanks
    Serj

    The easy way to do this is create a copy using Windows Explorer.
    Open the project and go to File > Rename.
    Then you have your 2013 ready made project.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • When saving a document as a PDF for printing, I lose pages, clip art, and my orginal format. Help!

    I have created some forms for our congregation to fill in with answers on adobe forms central. When I go to turn it into a PDF for printing for a hard copy, (not all our members have internet) when i save it to a PDF, it doesn't save all the pages and formats it differently then show on the screen i programmed it onto. How do I fix this issue?

    Hi;
    In the "Feature Tutorials/Help" linked from the top of the main page of the Forums: Feature Tutorials / Help
    There is a Tutorial on "Creating and distributing fillable PDF Forms": Tutorial: Creating and distributing fillable PDF forms
    The main thing to look at is the "View" setting and for PDF set it to "Page View", the page breaks you define in Page View will be used in the PDF, there are also "implicit" page breaks added automatically based on the page size.
    For the issue with clip art see this FAQ: Image does not show up in PDF 
    Thanks,
    Josh

  • Hw can I generate XY graphs directly in a vector data format for printing ie pdf

    A further question re. Printing of Graphs
    There are many similar questions but none where the answers are acceptably adiquite or two or three were the link was broken,
    "Developer exchange forums have been moved" and a pointer to the new
    site, unfort it was hard to find or guess the rest of the link.
    So here is my angle on this problem;
    So far I have tried;
    Using property node: "App.  Printing.Default Printer" to select the printer to use, then
    Using Report Functions to print controls;
    New Report, to generate a new report reference
    Set Report Orientation
    Set Report Margins
    Set Report Font
    Set Report Header Text
    Set Report Font
    Set Report Footer Text
    loop for each page
    Set Report Footer Text,     With page number
    Append Control Image to Report,      several times
    New Report Page
    Until the end of the last page
    Print Report
    Dispose Report
    Initially using existing XY-Graph controls from the front panel.  These
    are on a page of a Tab control to hide these controls while not in use
    and allow them to be hidden while generating the printout. 
    Unfortunately when this page is hidden any graph scales set to
    autoscale don't, (normally don't need to and would otherwise be a waste
    of processor time), resulting in graph plots going off scale or
    becoming a line along the axis.
    An issue is that what is printed appears to be read from the screen, so resolution is much
    lower than required for for printing, resulting in rather pixellated
    printed versions. These prints will usually be emailed, so tried the
    pdf995 "printer driver" but the resulting pdf file size is rather large.
     Currently trying Plot-XY on a much larger picture so as to get
    adequate resolution for printing, however suspect this will result in
    much larger pdf files and probably cause other problems. 
    The preferred solution in this case will probably be to generate print
    output, instead of based on raster images (ie jpg or png), but on a
    vector format, maybe via postscript or directly in pdf format.
    Similar graphs currently printed from Excel via pdf995
    (or OpenOffice) result in files around 20 kb per page. these can be printed at any size
    (at least upto 64 times) without becoming pixellated, so assume these
    are vector based.
    Currently a page with 4 XY Graph controls uses around 40 to 45 kb per
    page but resolution is poor and overcoming that may push file size up
    to 150 to 200 kb per page, and the whole job can be 50 to 100 pages.
    Are there any functions to generate XY graphs directly in a vector data format preferably in pdf or via PostScript format.
    Cheers
    Darryl

    Hi Darryl,
    I was able to reproduce the issue you were seeing, in which a report generation was taking up a large amount of space per page in a PDF utility. I found; however, using my attached VI (notice that it is set to *.png) and the CutePDF utility (free download at http://www.cutepdf.com/) I was able to get a per page size of about 10 KB. Also using the png I found that the image quality seemed to be quite high.
    Please try incorporating this solution into your application and see if it reduces your file sizes.
    Thanks and have a good evening!
    Cheers,
    Jonah
    Applications Engineer
    National Instruments
    Jonah Paul
    Marketing Manager, Embedded Software
    Evaluate the LabVIEW RIO Platform! - ni.com/rioeval
    Attachments:
    print_XY Graph.vi ‏23 KB

  • PNG colour profiles - and this format for print

    I know it's taboo to talk about PNG for printing.
    But I can't find and I've searched the forums - there was a post made about embedding colour profiles a while ago.
    I know PNG is a RGB only format, but I'm 36.8% sure I read something about embedding either RGB or ... wait for it CMYK profiles into PNG files.
    If anyone can shed any light on this - and how about PNG for print - I've been against it for a long time - but it is a lossless format, it can carry 64 bit data.
    I know I know - but I thought I'd ask anyway - see what people think.

    You can't save a PNG with a profile out of Photoshop, but it looks like you can embed one via the image events scripts that ship with OSX (/Library/Scripts/ColorSync/embed). Unfortunately ID ignores the embedded profile and uses the document's assigned profile instead. PNGs do respond to ID's RGB profile and the RGB profile will have an effect on the CMYK separation when it happens.
    Here's ProPhoto and sRGB:
    From your ID document you can also assign a profile, which conflicts with the doc's profile, by selecting the png and choosing Image Color Settings.... So, you could assign AdobeRGB as your doc's profile and assign sRGB to all your pngs.

  • Formatting for print

    I have read about using CSS for printing out your pages so
    that you dont
    have to create 2 copies of each page you want printed.. but i
    cant find how
    to actually put it to use..
    I have added the necessary code to my CSS file.
    I have changed the media type to media="print"
    and all i keep reading is that this allows you to have the
    same page
    formatted for print..
    But how exactly do i call the same page for print? do i add a
    link to the
    page saying click here to print? if so what woudl the link
    actually point
    to?
    or by just including the right code, when the end-user choses
    to click print
    within there browser that knows to display the same page
    using the
    print.css?

    "DC" <[email protected]> wrote in message
    >I have read about using CSS for printing out your pages
    so that you dont
    >have to create 2 copies of each page you want printed..
    but i cant find how
    >to actually put it to use..
    >
    > I have added the necessary code to my CSS file.
    > I have changed the media type to media="print"
    >
    > and all i keep reading is that this allows you to have
    the same page
    > formatted for print..
    >
    > But how exactly do i call the same page for print? do i
    add a link to the
    > page saying click here to print? if so what woudl the
    link actually point
    > to?
    >
    > or by just including the right code, when the end-user
    choses to click
    > print within there browser that knows to display the
    same page using the
    > print.css?
    >
    The browser display will always be the same, whether you have
    a print CSS
    option or not.
    The arrangement is -
    You have one style sheet for your screen layout say
    "screenstyle.css" and
    one for your print layout say "printstyle.css"
    You ad both style sheets to your page code -
    <link href="screenstyle.css" rel="stylesheet"
    type="text/css" media="screen"
    />
    <link href="printstyle.css" rel="stylesheet"
    type="text/css" media="print"
    />
    When a user views your page on their screen it is laid out
    according to your
    screenstyle.css style sheet.
    When the user prints the page, the printed output is laid out
    according to
    you printsyle.css style sheet.
    Hope this helps
    Regards
    Phill
    P&M Software
    www.pmsoftware.co.uk

  • Export file in specified format for printing labels etc (BOnewbee question)

    Hello to all,
    has anyone experiences with generating a export file in special text-format to a directory???.
    Is ist possible to generate this file after some action in BO?? (Printing delivery form and after that generate file for printing barcodelabel in special application???)
    Sorry, but i dont have any programming experiences in BO - only in SAP R/3 with ABAP.
    Thanks in advance for your replies!

    There are a number of ways to do this.  You could use the SDK to trap an event and then automate your barcode printing from .net.  You could also use middleware (iBolt, K2, biztalk, etc) You might also write a SQL DTS job with an associated trigger to save out a text file.
    I guess the answer to your question depends on how big your company is, how spread out your IT resources are and what technical resources you have to dedicate to the project.

  • Can I use png format images when sending an iphoto book for printing?

    Writing an iPhoto book, I want to use some photographs taken by friends, and these photos are in png format.  Will they work when I upload them for printing?

    Dear Larry
    Thank you very much for the information.  I hate pressing buttons when I am not sure of what will happen!
    Many thanks
    Chris

  • Converting to CMYK color profile (for print) in raw format

    I am looking to self publish a cookbook in lightningsource. They need the photos in cmyk format. When is it best to convert to this color profile from rgb?
    I have bridge CS5
    What I'm doing currently:
    I click on my .arw image file and select "open in camera raw" which brings me to an editing screen. At the very bottom is says rgb, and 240 ppi
    I need 300 ppi at least and cmyk color.
    Now I know how to change these things in Photoshop, but I was taught that editing it in camera raw in bridge is better to preserve quality for print.
    Should I just edit it in raw and then convert to 300 dpi and cmyk color in photoshop? Or is there a way to do this in bridge? Whats the difference? Any advice will help, trying to make my pictures look amazing in print

    Correct me if I misunderstood anything!
    You are on the right track except for the ppi story. The ppi settings just are a figure expressing the amount of pixels stored in 1 inch, without the width and height figures of the image itself you can't do much with it and just changing this figure is not changing the total amount of available pixels.
    For instance create a new document at 300 ppi and use the international paper size A4 (21 x 29,7 cm). The amount of pixels is 2480 x 3508 (roughly the result of an 8 MP dSLR.
    Use the image size option in PS and be sure to not resample (meaning creating new pixels or deleting pixels to alter the original file size that is 24,9 MB). Now change the amount of pixels to whatever you like. If you increase the number the width and height decrease, and vice versa. Yet the amount of pixels and file size stay at 2480 x 3508 and 24,9 MB.
    But with the specs of wanted width and height for the end result of 300 ppi starts making sense.
    For instance you have a image at the size of a post stamp and an image at international paper size (A4) and both are 300 ppi. The small post stamp size would be in cm about 2 x 3,5 while the A4 size has about 21 x 30 cm width and height.
    So you can imagine having both needed to be printed at the A4 size in 300 dpi (printers work with dots, hence they use dpi - dots per inch- and while not the same they both often use the 300 figure and stand for pretty high quality result) the A4 sized original will meet the wanted standards without problems   while the post stamp would have to be resampled to the new A4 size and when having still 300 ppi needed there would be a lot of interpolation (creating new pixels to match the new size) and this would often result in pixelated or worse quality print result, because PS has to use guess (albeit quit educated guessing) work to add more pixels that are needed to reach the new dimensions.
    ACR has the advantage to set the ppi by default at 300 but as said, as long as you don't alter width and height of the original it is just a figure without any significant importance until you know the complete specs for the output source.

  • Creating Format type for printing ALV output.

    Dear Friends,
        I am using a format type for printing ALV output print which displays 65 rows and 255 columns on DINA4 page. I want to create a format type which will print 65 rows and 310 columns on 'LEGAL' page format .
    So plz suggest the ways along with help links if any.
    Regards,
    Madan.

    Hi Mandan,
    As long as I know the maximum column for printing is 255.
    Might be you can split your output into 2 rows...
    Regards,

  • What is the best high res image file format to use for print

    Dear All,
    I'm working on a 300 + page catalog, and I was wondering what would be the best image format to use on the catalog. I thought png was the best since it supports background transparency and all, but for some reason I'm not able to export it once I change the image to CMYK ( since I need CMYK for print ). Should I save all in eps. instead? Please help would be appreciated.
    thanks,
    Jack

    .psd is the best... supports everything you would want for print.  PDF does also, but takes a little more knowledge to use properly.
    .png is recommended when using Word etc.
    EPS is obsolete.

  • Formatting html for printing-urgent

    I want to print an html/jsp page from the browser by removing unneccessry images and irrelevant information
    If the user select print option on the page then the page should be formatted accordingly so that only relevant the data is shown.It should fit on A4 size paper.
    Hint: if u have been to developer.java.sun site then there is an option printable page or print view option on the left
    On selection of this u get to see a page where unnecessary data is not shown.
    if u see the link , then it actually calls printpageservlet .
    Can u give source code for PrintPageServlet
    There are many sites which have this facilty.
    Reply asap. this is urgent

    You can write the same jsp page which does not output the unnecessary conents for printing.
    If the client is IE you can use
    <STYLE MEDIA="PRINT">
    span.notPrint{
    display:none;
    </STYLE>
    <BODY>
    Print display this... <span class="notPrint"> Display this, but do not print</span>
    </BODY>

Maybe you are looking for

  • Sybase Connection Error - cannot establish database connection

    BO Data Services Tool -> Creation of new Data Store -> Sybase ASE When I tried to create a sybase datastore(New connection), I've got this error message. But I am able to connect to sybase database with client application with same connection paramet

  • I need Crystal Report 2008 SP4 Fix Pack 4.1, 4.2, 4.3, 4.4 ....

    Kindly help I need to download these SP4 Fix Pack 4.1, 4.2, 4.3, 4.4 for Crystal reports 2008. Thanks in advanced Regards, Eng Hok 

  • Best Practice - Output to 240Hrz Monitor

    I have a Canon HF S100 that can record in 24p, 30p, or 1080i. My destination output will be to my new monitor that I have ordered (Sony KDL-46XBR9) that has  Motionflow 240Hz technology and allows 1080/24p input video format. With the Motionflow tech

  • Happy iPhone 5-Eve to everybody!

    Congratulations to everybody who is lucky enough to be getting the iPhone 5 tomorrow. I am very excited! I am very sorry for those of you who were unable to pre-order it in time to get it tomorrow, but your time will come very soon and it will be wel

  • Apple Mail tries to start, icon disappears and startup stops

    Hi all, Yesterday I was forced to shutdown my powerbook the 'hard' way using the power button in the middle of an apparent crash. Since then, I cannot start Mail anymore. What happens is: I try to start it, the icon appears in the dock, and after a s