How do I get printer margins and resolution

How do I get printer margins and dots per inch for the so-called default printer that is attached to my computer (and possible the less critical paper size)

Thanks for your trying it. I learned from you that prinJob.pageDialog() sees the physical limitations on the margins.
I found in the docs: "When creating a Paper object, it is the application's responsibility to ensure that the paper size and the imageable area are compatible".
It seems that most of this stuff is the program telling the printer.
I want the printer to tell the program two critical sets of data: the minimum margins and the resolution.
Thanks again, I really appreciate your efforts, and learning one more thing.
Here is my try. Sorry about the long lines.
    PrinterJob prinJob=PrinterJob.getPrinterJob();
    PageFormat pgFmt = prinJob.defaultPage();       
    System.out.println("old iW="+pgFmt.getImageableWidth()+" iH="+pgFmt.getImageableHeight()+" iY="+pgFmt.getImageableX()+" iX="+pgFmt.getImageableY());
    PageFormat newPgFmt = prinJob.pageDialog(pgFmt); //min: l=.226(16.272pt),r=.273,t=.25(18pt),b=.25 so wid=8.0(576pt), hgt=10.5(756pt)
    System.out.println("new iW="+newPgFmt.getImageableWidth()+" iH="+newPgFmt.getImageableHeight()+" iY="+newPgFmt.getImageableX()+" iX="+newPgFmt.getImageableY());
    Paper pap = newPgFmt.getPaper(); //pageDialog() seems to get the physical printer correctly approx agreeing with MSWord
    System.out.println("pap wid="+pap.getWidth()+" hgt="+pap.getHeight()+" iX="+pap.getImageableX()+" iY="+pap.getImageableY()+" iW="+pap.getImageableWidth()+" iH="+pap.getImageableHeight());
    pap.setImageableArea(0,0,72*8.5,72*11.0); //this allows programmer to set it incorrectly
    System.out.println("pap wid="+pap.getWidth()+" hgt="+pap.getHeight()+" iX="+pap.getImageableX()+" iY="+pap.getImageableY()+" iW="+pap.getImageableWidth()+" iH="+pap.getImageableHeight());
    newPgFmt.setPaper(pap);
    System.out.println("new iW="+newPgFmt.getImageableWidth()+" iH="+newPgFmt.getImageableHeight()+" iY="+newPgFmt.getImageableX()+" iX="+newPgFmt.getImageableY());

Similar Messages

  • How can i get the driver and software for q1342a laser printer 1000

    How can i get a driver and software Cd for HP Laserjet 1000 S/N#CNBJ242828
    Product ID# Q1342A

    The product you have seems to be a commercial printer. For the best chance at finding a solution I would suggest posting in the forum for HP Business Support!
    You may find the Commercial Laserjet board here.
    http://h30499.www3.hp.com/t5/Printers-LaserJet/bd-p/bsc-413
    Hope this helps!
    Help the community by marking this post as a solution if it solved your issue!.
    If my post helped you in any way, please click the blue KUDOS star under my name! It would mean a great deal.

  • How can I remove print margins when manually setting them to zero doesn't work?

    I'm trying to print a web page that I've created with a custom paper size of 4.5x10.25 inches. I want the page to be printed right to the edge of the paper, with no margins at all.
    I've been reading for a few days and the best thing I can find is to use Mac's Page Setup dialog to create a custom paper size and custom margins, which I've done and set to the default for all of my printers. (Hopefully I'm able to post links to images --> http://i.imgur.com/kVbOZLk.png). No matter what I do though I can't get the margins to go away. There's always always always a .75 inch margin when I print and when I print preview (Again, hoping I can post links to images --> http://i.imgur.com/cxlVS8o.png). Just to note: The same thing happens printing other websites and documents (i.e it is not a problem with my website).
    Things I've tried:
    I've read that the margins are only visible in print preview and printing the page will remove them. This didn't work.
    I've tried tricking the system by setting my margins to 0.01 inches
    I've tried adjusting the website to not be exactly the size of the page (I made it smaller) and the margins were still there.
    I've set "print.print_extra_margin" to 0 in Firefox's about:config page.
    I've tried a different printer.
    I've tried a co-worker's machine running a newer version of OSX.
    I've made absolutely sure that my page size it set correctly.
    I'm using OSX 10.6.8 with Firefox v21.0.
    The closest I can come to this is using Google Chrome, where there is a specific option for "none" in margins and the Chrome preview looks okay, but I'm not able to specify paper size unless I click "Print using system dialog" which gives me the same problems as above.
    How do I remove the margins and just fit to the exact size of the page?

    Welcome to Apple Support Communities. We're all users here.
    Does your Print dialog offer photo 'borderless printing' settings for various paper sizes?
    Every photo printer I've ever encountered leaves some unprintable margin, unless 'borderless' and/or 'photo' media are specifically selected.
    On many of the Canon inkjet color printers I've used, borderless printing is only available when one of the photo papers is selected, even when a custom size specified that is smaller than the actual paper, trying to make it 'borderless'
    I stitch together and print panoramas of theatre sets for my local community theater, so I end up with an image about 4.5 inches by 11.5 inches to be printed.
    Selecting a photo and opening in Preview and selecting 'Fill Entire Paper' illustrates the standard unprintable borders for my specific printer.
    When I open the panoramic image in Preview, I get this print preview. (The set image is of course rotated left)
    By selecting Letter and Borderless in the Paper Size dialog for my Canon MG5320 printer, I get this result.
    This particular Canon printer of course does NOT actually 'know' what paper is inserted, but the ink is applied assuming that a photo paper is being used, so it will saturate a standard paper.
    Hope this helps!
    Message was edited by: kostby

  • How do I get rid of and prevent non-content mails dated 1970-01-01?

    How do I get rid of and prevent non-content mails dated 1970-01-01? They come by the hundreds!!

    CSS:
    #navigation {margin-top: -3px;}
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • I have a macbook pro and I connected a new iphone to my computer. Somehow all my pictures in the iphoto app deleted. How can I get them back, and no I do not have my TimeMachine On. Please help!

    I have a macbook pro and I connected a new iphone to my computer. Somehow all my pictures in the iphoto app deleted. How can I get them back, and no I do not have my TimeMachine On. Please help!

    If you are running Lion then all drivers are distributed through Software Update. You do not need to install anything, other than to install the printer in System Preferences > Print & Scan. If you already added the printer while it was connected using USB, you might want to delete it and set it up again wirelessly to avoid confusion. Or, give them two distinct names e.g. "Photosmart D110 (USB)" and "Photosmart D110 (wireless)".
    All scanning functions are now performed using Preview, but you can also access the scanner through the same Print & Scan preference pane, or with Image Capture.
    This HP document may help explain how driver software is distributed now:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03079365&cc=us&dlc=en&lc=en &product=4144493&tmp_track_link=ot_search#N108

  • My old computer is broken, so how do i get my music and photos from my iPod onto my new computer

    my old computer is broken, so how do i get my music and photos from my iPod onto iTunes on my new computer. It says it can only be synced to 1. but my old 1 is broken.

    See this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    Keep in mind that the recovered photos will not be in their full resolution, but instead will be the scaled down versions that were optimized in size and resolution to fit your iPod's smaller LCD screen.
    B-rock

  • How do I get prints to look as good as on screen?

    How do I get prints to look as good as on screen?
    Do apple recommend a printer?

    I recognise this but the prints never look as good as they do on the screen why is this? They are always lighter, darker and just not as punchy. It's very inconsistent.
    Do apple recommend a printer that replicates exactly what's on the screen?

  • Since syncing with iCloud all my photos in my photo app are much lower resolution than they were before. Can anyone explain what happened an how I might get back my high resolution photos?

    Since syncing with iCloud all my photos in my photo app are much lower resolution than they were before. Can anyone explain what happened an how I might get back my high resolution photos?

    Thanks again.
    Unfortunately I don't have iPhoto (running Windows).
    I did, however, figure out a work-around.
    I created an empty directory on my computer, and told iTunes to "Sync Photos from..." that empty directory. This deleted all the photos from the iPod (go figure).
    I then set the "Sync Photos from..." dropdown back to directory that actually contained all my photos, and sync'd again.
    And, yes, they all loaded onto the iPod at their better, higher resolution.
    Thanks for all your help. Photos (and wallpaper) are perfect, again

  • How do I view page margins and drag objects around to fit?

    How do I view page margins and drag objects around to fit?

    Hi Sime,
    Some ideas for workarounds now that Numbers 3 has lost Page Setup, Print View and Layout View.
    1. Numbers 2.3 is still on your computer unless you deleted it. Look in your Applications folder for the iWork '09 folder. Drag the Numbers '09 (Numbers 2) icon to your Dock. It will become an Alias. Right click (or control click) on it then Options > Keep in Dock. You might actually enjoy running both versions at the same time, to compare features. Just be careful which version you are running before you edit and save.
    2. Use Numbers 3 to export a document 'backwards' to Numbers 2. Be aware that features lost in Numbers 3 may not be restored by exporting 'backwards' to Numbers 2.
    3. In Numbers 3 > Preferences > Rulers
    Those Guides help you to align objects with each other.
    4. Menu > View > Show Rulers. This will show zero for the top or right left margin. Then drag a ruler guide from top or left.
    More hints on workarounds here:
    https://discussions.apple.com/message/23622372#23622372
    What has been GAINED in Numbers 3 is here:
    https://discussions.apple.com/thread/5473882?start=45&tstart=0
    If you want to see what has been lost in Numbers 3, go here:
    https://discussions.apple.com/thread/5470448?start=240&tstart=0
    Regards,
    Ian.
    Message was edited by: Yellowbox. Oops, This will show zero for the top or *right* margin. Mirror image this to *left* margin

  • How do i get a plain and simple basic bank reconciliation form?

    how do i get a plain and simple basic bank reconciliation form?

    If you have a system with Microsoft Office Document Imaging loaded, you can Print the PDF to this application. Then once the document opens, Print it to Adobe PDF. This will avoid the distilling errors.
    It is part of Office XP, 2003 & 2007 I believe.
    Otherwise you may be left with Print & Scan.
    Good Luck
    Mark

  • İ have an hp 3052 all in one.how can i get print out with ipad or iphone?

    İ have an hp 3052 all in one.how can i get print out with ipad or iphone?

    Hello,
    Try following the instructions here http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02623193&cc=ad&dlc=en&lc=en&jumpid=reg_r1002_us...
    If that does not help, let me know and I will see what I can do.
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • How do I get print n share to work after upgrade to iOS 5.  I can print from this app thru wifi.  But it can,t print mail, web pages, etc..

    How do I get print n share to work after upgrade to iOS 5.  I can print from the app thru wifi and PC. However am unable to print mail, web pages, etc..
    In mail when I try to print it just says can,t find air printers.  It used to say print with print  n share.

    I sent e-mail to developer regarding this and they said that basically Apple has denied them access to the Airprint dialog in the new source code for iOS 5.  So, the only way to print to pdf is to capture the e-mail or webpage in the internal apps within Print n Share.  INHO, this really *****.  Apple should make printing to pdf files just a standard feature of all their apps.  If they don't do this, they are going to lose alot of business to the Adroid world as pdf file format is the business standard for all documents.

  • How do I get printer code?

    HP DESKJET 3070A printer B611a How can i get printer code?

    Hi there yan_be,
    This link has eprint setup and the printer code is under the setting up eprint heading:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02728147&tmp_task=useCategory&cc=us&dlc=en&lang...
    mary1perez:
    Your's is located here under the setting up eprint heading:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02652473&tmp_task=useCategory&cc=us&dlc=en&lang...
    Let us know if it works and Best of Luck to you both!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • I have just updated to iOS7, no icon for browser, was using Safari, how do I get it back and can I reverse the upgrade and go back to iOS6?

    I have just updated to iOS7, no icon for browser, was using Safari, how do I get it back and can I reverse the upgrade and go back to iOS6?  Thanks to you from the UnTechie

    The icon for Safari has probably moved to make room for new apps. Scroll the Home screen to look for it.
    You cannot reverse the upgrade.

  • How can we get Dynamic columns and data with RTF Templates in BI Publisher

    How can we get Dynamic columns and data with RTf Templates.
    My requirement is :
    create table xxinv_item_pei_taginfo(item_id number,
    Organization_id number,
    item varchar2(4000),
    record_type varchar2(4000),
    record_value CLOB,
    State varchar2(4000));
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'USES','fever','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'HOW TO USE','one tablet daily','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'SIDE EFFECTS','XYZ','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'DRUG INTERACTION','ABC','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'OVERDOSE','Go and see doctor','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'NOTES','Take after meal','TX');
    select * from xxinv_item_pei_taginfo;
    Item id Org Id Item Record_type Record_value State
    493991     224     1265-D30     USES     fever     TX
    493991     224     1265-D30     HOW TO USE     one tablet daily     TX
    493991     224     1265-D30     SIDE EFFECTS     XYZ     TX
    493991     224     1265-D30     DRUG INTERACTION     ABC     TX
    493991     224     1265-D30     OVERDOSE      Go and see doctor     TX
    493991     224     1265-D30     NOTES     Take after meal     TX
    Above is my data
    I have to fetch the record_type from a lookup where I can have any of the record type, sometime USES, HOW TO USE, SIDE EFFECTS and sometimes some other set of record types
    In my report I have to get these record typpes as field name dynamically whichever is available in that lookup and record values against them.
    its a BI Publisher report.
    please suggest

    if you have data in db then you can create xml with needed structure
    and so you can create bip report
    do you have errors or .... ?

Maybe you are looking for