Sizing screen to fit on paper

I need to print a 800 / 600 screen on an A4 paper. How can I get it scaled to fit on an A4 paper? What is the pixel dimension equivalent of the printable are of an A4 paper?

I use the following code to print my graphic on a a4 paper.
public int print(Graphics g, PageFormat pageFormat, int pageIndex)
if (pageIndex > 0)
return(NO_SUCH_PAGE);
else
pageFormat.setOrientation(pageFormat.PORTRAIT);
// first compute the scale factor of the component
int w=componentToBePrinted.getWidth();
int h=componentToBePrinted.getHeight();
// change w and h because if we rotate ge GC
double sx=pageFormat.getImageableWidth()/(double)h;
double sy=pageFormat.getImageableHeight()/(double)w;
double sf;
if (sx<sy) sf=sx; else sf=sy;
Graphics2D g2d = (Graphics2D)g;
g2d.translate(
pageFormat.getImageableX(),
pageFormat.getImageableY()+pageFormat.getImageableHeight()
g2d.rotate(Math.toRadians(270));
g2d.scale(sf,sf);
disableDoubleBuffering(componentToBePrinted);
componentToBePrinted.paint(g2d);          
enableDoubleBuffering(componentToBePrinted);
return(PAGE_EXISTS);
public static void disableDoubleBuffering(Component c)
RepaintManager currentManager = RepaintManager.currentManager(c);
currentManager.setDoubleBufferingEnabled(false);
public static void enableDoubleBuffering(Component c)
RepaintManager currentManager = RepaintManager.currentManager(c);
currentManager.setDoubleBufferingEnabled(true);
}

Similar Messages

  • Why does images in preview are in a different position and resolution than in design view? In design view I have to place the images of screen to fit in preview.

    Why does images in preview are in a different position and resolution than in design view? In design view I have to place the images of screen to fit in preview.

    Already changed in different settings. Here is a screenshot when set to "Original Size".

  • Sub: Screen doesnt fit

    Sub: Screen doesnt fit
    Hi friends,
    I cant able to get full screen when I run applications in my laptop having 10 inches screen those developed in desktop having 15 inches screen, is there any forms property we can set so that every where it should fit the screen. I am using 800*600 screen resolution settings even for both. I am using Forms 4.5 only.
    Thanks in advance
    null

    go to help at the top of your browser then click on restart with add-ons disabled, firefox will close then it will open up with just basic firefox, then you can swicth the add-ons back on and it should be ok, ive just done this myself and it worked

  • On Mavericks: Wallpapers with an aspect ratio of 16:9 or 16:10, if set to "center", will either format as "fill screen" or "fit to screen". Help?

    If I select a custom wallpapers with an aspect ratio of 16:9 or 16:10, if set to "center", will either format as "fill screen" or "fit to screen".
    With other aspect ratios, center works as supposed to.
    Ideas?

    In general this script should work:
    mov GPRM0, SPRM14
    and GPRM0, 3072
    Set System Stream St(Subtitle Stream 1) (On) if GPRM 0 = 3072)
    Set System Stream St(Subtitle Stream 2) (On) if GPRM 0 != 3072)
    Jump Track 1
    The value of 3072 is returned when 16:9 value is stored in SPRM14.
    However some players may disregard this script as they might look for the presentation information in IFO files or in the video stream itself.
    The better approach is to flag one subtitle stream as 16:9 and the other as 4:3 in DVD After Edit if you have an access to it.
    MacPro 2.66, G5 DP 2.7   Mac OS X (10.4.9)   TASCAM DA-88, DigiBeta, DeckLink HD Extreme, Cinemacraft Encoder

  • Will an iphone 5 front screen protector fit an iphone5s?

    Will an iphone 5 front screen protector fit an iphone5s

    I don't know that anyone can say for sure.  While the overall dimensions are the same, I'm not sure it's been announced if the iPhone 5 home button is the same size as the 5S TouchID button,

  • Does a new ipad 4 retina have a screen protector fitted from factory please...

    does anyone know if a new ipad 4 has a screen protector fitted from factory please....

    Apple does not sell their devices with screen protectors preinstalled. If you want a precise fit, you may try a third party that can place the screen protector on for you.

  • Selected print size will not fit current paper size

    I am new to iPhoto and I keep getting the following message when I try to print at home - "selected print size will not fit current paper size" - I don't understand this. I am printing to 4x6 photo paper. I have chose 4x6 under paper and I have chosen 4x6 under print. It seems to want to fit the photo horizontally instead of vertically - I can work around this by choosing to print 3x5 onto 4x6 paper, but then the border is quite large.
    I hope this makes sense.
    Thanks for any help regarding this issue.

    Does your printer driver support 4x6 borderless printing?
    You have to make sure your printer has a borderless driver ( the Epsons have two, a regular and one with Borderless-sheet feeder in the title and both must be installed and selectable under the Printer menu. If it's a Canon then you must be sure you select 4x6 borderless under the Paper size. Here's a step by step workflow you can try:
    Steps for printing 4 x 6 prints from iPhoto:
    crop the photo to 4 x 6 in iPhoto.
    select the picture you want to print and type Command-P.
    *click on the Advanced button in iPhoto's print pane.
    *select your Printer and Presets
    *select "Paper Handling" in the Copies & Pages menu.
    *in the Destination Paper Size section select "Scale to fit paper size: and select the paper size in the menu.
    *click on the Standard button.
    in the iPhoto print pane select your printer, Presets and Paper size.
    select Standard Prints under Style.
    select print size in the Size menu and check the "One photo per page: checkbox.
    click on the Print button
    *These steps may be redundant but might correct those situations where the paper size selected in the iPhoto print pane does not seem to take.
    What printer do you have?

  • IPad printing fit to paper?

    I printed a pdf from iPad uasing airprint, and it came out of the printer a 4x6 image instead of fitting to paper 8.5x11. I couldn't find any adjustments that can be had to fit to paper. I checked the printer and the iPad. Is there another way to fill the paper or this is the way it prints, of which renders it pretty useless because the forms are too small.

    If you are using HP, you can use AIO Remote to adjust image size.
    https://itunes.apple.com/sg/app/hp-all-in-one-printer-remote/id469284907?mt=8
    http://i1224.photobucket.com/albums/ee374/Diavonex/324a892c900baf3a0fa48131dfd64 f06_zpsc29a6574.jpg

  • Title Font Size in Final Cut Pro 6 for exhibition on movie theater sized screen

    When editing a documentary and creating title cards (that play as part of the movie - text center of screen on black b.g.), lower thirds identifying speakers, and end credits (both single card and scrolling) are there some standard fonts and font sizes people use so the end result will not look too large when projected on a movie screen?
    The titles are all from Final Cut Pro (a few from the Boris plug-in for FCP6) and there are no titles that move or that are created in Motion.
    I will be able to make additional edits with the fonts sized for tv, streaming, DVD distribution etc. if I'm lucky enough to end up needing those as well.
    Thanks!

    If the titling is properly composed for the frame size, it will look correct when projected. That is, if it looks font is legible and in decent proportion in your 1080 timeline, it's not important whether the display is 30 inches or 45 feet; the proportion will not change.
    In terms of font selection, medium or bold sans-serif fonts work well on all screens.  "Plain" fonts like Helvetica, Ariel, or Lucinda tend to work better than the more stylized fonts, but if style is part oif your message, be my guest...
    hope this helps

  • Need to avoid pop-up screen while printing shop paper

    hi all ,
    we have develop a z program to print shop paper for selected orders based on selection criteria. Once the output displayed (out put contain shop paper , printer,order no and operation no )for selection criteria user will select one or many records from output and click on print button. Once user select the print button the spool request has to be created,
    problem :- when we select the print button in output display we are getting print pop-up screen
    OutputDevice      
    Frontend printer HP
    Copies           1
    Page selection                     
    Name           
    Title          
    Authorization    
    Spool retention pe
    Archiving mode   
       Thanks in advance
    jayasankar

    hi all ,
    we have develop a z program to print shop paper for selected orders based on selection criteria. Once the output displayed (out put contain shop paper , printer,order no and operation no )for selection criteria user will select one or many records from output and click on print button. Once user select the print button the spool request has to be created,
    problem :- when we select the print button in output display we are getting print pop-up screen
    OutputDevice      
    Frontend printer HP
    Copies           1
    Page selection                     
    Name           
    Title          
    Authorization    
    Spool retention pe
    Archiving mode   
       Thanks in advance
    jayasankar

  • Page does not fit on paper when printed directly to printer

    Hi experts,
    I have developed a form in transaction SFP, using A4 as the paper format for the master pages. If I print to spool and preview and print my form from spool using transaction SP01, the form prints nicely. If I print directly to printer using the generated function module for the form (setting parameter REQIMM to true), the page does not fit on the paper (it is cropped), and also I do not get duplex printing.
    Why do I get different results when printing directly to printer as opposed to printing to spool first? How can I ensure that the form is printed correctly when printing directly to printer?
    thanks!
    Frank

    Did you check the window settings of the Firefox desktop shortcut to see how Firefox opens?
    Did you try to delete the current Firefox desktop shortcut and create a new shortcut?
    Use Restore or Maximize in the right-click context menu of the Taskbar icon to set focus to the Firefox application if you do not see the Firefox window.
    Open the system menu of that Firefox window via Alt+Space and see if you can move and resize that window (use the keyboard cursor keys).<br />
    If that works then first close all other open Firefox windows and then close Firefox via "File > Exit/Quit" to save that setting.

  • I have a new flat screen monitor;  how do I get iMovie project screen to fit the monitor screen ?

    When I want to work on my iMovie project, the work area is to wide for the monitor.  I have  toggled the monitor between wide 1/2 and original screen 2/2;  I still need to physically pull the picture right and left to see the work area not shown. 

    I don't know how to delete a question ....   When I opened iTunes it prompted me to change the resolution on the monitor...  that seemed to fix my " fit to screen issues ".  If you are reading this Thank you for your interest in my problem. 

  • Perfectly sized images not fitting sized Premier Pro?

    I have created my images with a resolution of 72dpi, with a 1280px (wide) and 720px (high) size. Is 72 dpi poor resolution for a photo slideshow?
    I import into Premier Pro CS5.5 (from PS 5.5) and the image does not fit my preview screen. It appears in widescreen format; I have preview screen set to 'Fit'.
    I then go clip > video options > scale to frame size
    and it still appears like widescreen format.
    What am I doing wrong?
    Thanks for any guidance.

    And for beginners:
    FAQ: How do I learn Premiere Pro?
    http://forums.adobe.com/thread/878529?tstart=0
    Getting Started with Premiere Pro CS6
    http://www.video2brain.com/en/getting-started-with-premiere-pro
    Adobe Premiere Pro Help and tutorials
    http://helpx.adobe.com/premiere-pro/topics.html
    Premiere Pro CS5-CS6 Reference
    (.pdf 12 MB download)
    http://helpx.adobe.com/pdf/premiere_pro_reference.pdf

  • Paper does not fit in paper tray

    I just received my PIXMA MG7120 and it seems as though my paper tray is too small.  No matter how much i try the width and length is not adequate to fit standard 8.5 x 11 paper.  The measurement of the tray sent to me is: 8" wide from paper guide to guide and 8" long from topof gray guide to bottomof black end/guide.  Do i have the wrong tray?  Obviously if i can't use the tray, i can't use the printer.  Help!

    I was just going thru the same issue!!! I read nothing about two trays up front. Thank you for posting this! Problem solved

  • Sizing photos to fit 4x6

    Greetigs again:
    I have some baby photos that I want to put onto 4x6 photo paper. I get a message in RED that says the photo is to big to fit. I have tried to crop as much as is feasible and still get the essence of the photo. Once you have cropped the photo how do you know what size it is? When I print it on 8 1/2 x 11 and measure the photo it is 4x6. What is the solution?
    John

    Cropping and resizing are two separate (and generally unrelated) activities. Cropping removes unwanted peripheral elements; resizing determines the real estate covered by the image on the intended media (think of "zooming"). Resizing in iPhoto is typically handled in the Page Setup or Print dialog.
    What finished product are you shooting for?

Maybe you are looking for

  • Grid Control 11g step Repository Configuration running for 24 hours+

    Got through all the prerequisites and am installing GC 11g on an Oracle Linux 5 machine which is also running my repository database instance (11.2.0.1). The GC install went rather smoothly until I hit the 'Repository Configuration' step. It's been s

  • Print Quality Bad from MacBook Pro

    From my G4, OS 9.1, printing to my Brother 2070N has always been terrific. Now, from MacBook Pro, 10.5.6 the text looks bad, like a coarse screen has been applied. I see nowhere in the Page Set-up to check that the correct resolution has been selecte

  • Repetitive Stutter Audio Artifact - Presenter 7

    Hi ... I just installed Presenter 7 ( with Acrobat Pro 9 Extended ) and now published PowerPoint publications ( to local disk and to PDF ) have a brief repetitive stutter type artifact every 30 to 45 seconds in the audio tracks. Anyone else experienc

  • Federated BI portal to ECC portal.

    Dear Experts, I Have configured Federated portal BI portal to ECC portal, when I have seen privew of iview (BI Portal) from ECC Portal, here I'm getting error like "the system is unable to interpret the sso ticket recieved". Please let me know any co

  • After the update today, my Mac shots down after a litlle while....

    Same as the above....