Print PictureBox image to fit on A4 paper?

hello, i'm working on a small project using c# windows forms, in my project i have a form with two buttons and a picturebox the first button is for scan an image from the scanner using WIA program and display it on a picturebox the another button is form
printing the pictureBox image on an A4 paper (fit A4 without margins), i have a problem with printing button when i print the it does not fit the A4 paper i googled for the problem and tried more than one article but still i have a problem, any one can help
please? and this is the last code that i used         private void print_bt_Click(object sender, EventArgs e)
            try
                string p_height = "1100";// height of A4 paper size
                double Height = Convert.ToDouble(p_height);
                double width = 0;
                double aspectRatio = 0;
                aspectRatio = (double)PictureBox1.Image.Width / (double)PictureBox1.Image.Height;
                width = Height * aspectRatio;
                    int wi = 0;
                    wi = Convert.ToInt32(width);
                    int hi = 0;
                    hi = Convert.ToInt32(Height);
                    Bitmap New_Bitmap = new Bitmap(PictureBox1.Image, wi, hi);
                    PictureBox1.Image = New_Bitmap;
                if (myPrinDialog.ShowDialog() == DialogResult.OK)
                    prntdoc.DefaultPageSettings.PaperSize = new PaperSize("A4", 827, 1169);
                    prntdoc.DefaultPageSettings.Margins = new Margins(0, 0, 0, 0);
                    prntdoc.Print();
            catch (Exception ex)
                MessageBox.Show("error" + ex.Message);
        private void prntdoc_PrintPage1(object sender, PrintPageEventArgs e)
            e.PageSettings.Margins = new Margins(0, 0, 0, 0);
            e.Graphics.DrawImage(PictureBox1.Image,0, 0);
        }

Hi
hunar abubakir,
Could you show me your screen capture on your side? It could be better to help us understand your scenario more clearly.
Now based on your code, What I first think of in my mind is that I doubt the width is more than 827. So please try to debug your code to see whether the width size
is appropriate.
By the way, Are you sure the A4 size is (827, 1169)?
If your picture size is ok, another possibility is the setting of printer.  Using
Margins(0, 0, 0, 0) to set the border. But still will meet result in the edge getting cut off in the printer.
Some similar scenario like yours
Margin Bounds Wider & Taller In PrintDocument.Print() Than In PrintPreviewDialog.ShowDialog()
Here is a way to print Borderless on your printer, It is Inkjet Printer. My suggestion is you could ask your IT department for better help.
http://www.redrivercatalog.com/infocenter/tips/inkjet-borderless-size-printing.html
Best regards,
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • HT204135 Hi does anybody know how to tile print an image On an iMac ? So blow an image up and print that image on several pieces of paper . ? Appreciate any help Thank you Laura

    Hi does anybody know how to tile print an image On an iMac ? So blow an image up and print that image on several pieces of paper . ?
    Appreciate any help Thank you Laura

    There's an app for that...
    https://www.macupdate.com/app/mac/45688/tile-photos-fx
    Also see...
    http://www.blockposters.com

  • Can we set Print Quality and Page 'Fit in to paper' thrue AS

    Hi All,
    while taking Movieclip printout thru actionscipt, whatever text i used inside the Movieclip is get blurred. Moreover the print is not fit into the paper size (A4 size used).
    Is there any setting available to change resolution while its get convert to bitmap and also is there any option to set "fit in to the paper size"
    Here i am using this...
    import flash.display.BitmapData;
    var newBitmap:BitmapData = new BitmapData(myMC._width, myMC._height);
    var tempMC:MovieClip = this;
    var printFC:PrintJob = new PrintJob();
    newBitmap.draw(myMC);
    tempMC.createEmptyMovieClip("printMC", 1);
    printMC.attachBitmap(newBitmap, 1);
    printFC.start();
    printFC.addPage(printMC, null, {printAsBitmap:true});
    printFC.send();

    I found the solution form a website !!!
    I missed out to mention the parameter while attaching bitmap.
    The correct code is...
    printMC.attachBitmap(newBitmap, 1, "auto", true);
    "auto" is for pixelSnapping
    true is for smoothing
    Thanks,

  • Printing Multiple images on one sheet of paper ( Printer Package)

    I want to print multiple different images on one sheet of paper using PhotoShop 6 Printer Package, (operating system windows7 h/p)  I have figured out how to get multiple images of the same image on one sheet, but not two different images.
    I seen these instructions on the web and can do 1.2.3....4.  has me lost.  I think this may work for me, unless there is another method that is easier.
    Important: Mac OS X users much first apply an update to Photoshop before attempting to customize the Picture Package layouts. Information and and a download link can be found at [url]http://www.adobe.com/support/downloads/[/url] (Thank you Matt Jones for this tip!)
    Copy the next five lines and paste them into a text editor, like NotePad or SimpleText:
    I 8 10
    Letter (3) 4x6
    0 0 6 4
    0 4 4 6
    4 4 4 6 
    Name this file FourBySixes.txt 
    Copy the file to your Adobe\Photoshop X.0\Presets\Layouts folder where X represents your version of Photoshop. 
    Open Photoshop and try it!
    I copyed  #3 and save to my documents, but I can't figure out how to do #4, or where the Adobe X.0\ Presets\Layout folder is at, if you could dumb this down for me I would be very grateful.
    thanks

    I can only guess that Photoshop 6 under Win7 would have the layouts under Program Files (x86)\Adobe\Photoshop 6\Presets or thereabouts.  This is the Photoshop Elements forum,  you may want to try the full Photoshop forum: http://forums.adobe.com/community/photoshop/photoshop_windows
    Juergen

  • Printing an Image to Multiple sheets of paper...

    \/\/TF, Apple?
    Whenever I choose the scale of the image to be 100% in the print options, instead of adding pages, to print the entire image, it decides to only print one page. Now, the little preview thing doesn't even acknowledge that there need to be multiple pages. Just a little 1 of 1 at the bottom when the image is clearly cut off. My image should fit on 4 pages...
    How do i fix this?

    You need an application, such as GraphicConverter, that can do this for you.

  • Printing Multiple Images 4x6 in CS4

    Hello Folks,
    I use LR 2.0 to edit my photo images and want to print a "batch" of edited 4x6 images all landscape using CS4 on my Epson 2880 printer. However it seems that all I can print is (1) image at a time, is this true?
    I've read a help file on printing using "automate" and selecting a folder of images which I have tried but there is no template for 4x6 images. I tried to create and save a new one that is 4x6, but that will still not work, only able to print one image.
    Can anyone help with this?
    Thanks for any info provided.
    Jim

    jasdelta wrote:
    Yes, this is exactly what I want to do is to print "different" images on a
    single 4x6 paper.
    I hope that's a typo, Jim. 
    You really want different images on one and the same single 4x6 sheet of paper?? !!  I don't think so…
    If you mean, multiple prints of the same image, just input the number of copies in the printer driver dialog box.
    If you mean different 4x6 images on a single, larger sheet of paper (say letter-size). then Picture Package is exactly what you want.  See this link in order to learn what must be done to restore Picture Package to CS4, as that functionality, present in CS3 and earlier versions, was removed from the default installation of CS4.
    http://blogs.adobe.com/jnack/2009/04/a_few_useful_reminders.html
    jasdelta wrote:
    Can you point me to a tutorial or how to on creating and
    action or droplet or script to do so?
    No, I don't think so.  But Google might help, if it's at all possible to automate Picture Package completely, down to the level of selecting sets of three images succesively (to fit on an 8.5 x 11 sheet, letter size).
    Use keywords like Photoshop picture package automate script to search Google.
    For Google results, CLICK HERE.

  • Printing problem on 4 X 6 photo paper

    When I print from my iPad using wireless the photo prints too large to fit on the paper. Also when printing on paper the font size is too large. How can I adjust the size? Thank you.

    Hi,
    If you are using the AirPrint functionality of your iphone, this has limitations in terms of the paper size, scaling and resizing of photos.
    If you download the HP eprint app, you'll find that this offers much more flexability in terms of papaer size and resizing of images. HP eprint is free to download from the app store.
    "Although I work for HP, I'm speaking for myself and not on behalf of HP"
    "Say "Thanks" by clicking the Kudos Star in the post that helped you.
    --Please mark the post that solves your problem as "Accepted Solution"

  • How do I Configure Desktop Printer to scale to fit?

    I love the feature of drag and drop printing and I often need to print many pdfs. However when I drag pdfs to the desktop printer icon it prints them on letter sized paper without scaling them to fit. I have configured the printer in the setup utility to print on tabloid but it still prints on letter with no scaling. How can I configure the desktop printer to scale to fit and select paper size? booya

    Hi Daniel, and a warm welcome to the forums!
    Doesn't your printer have a setting for the default size in it rather than just on the Mac?
    What size are these in the first place?
    I think the secret is to save the Tabloid size as a Default, but I don't have a Tabloid to test with, so I used Preview, (which you may end up having to use to drop on or Script to, dunno yet).
    I made a new Page size of Tabloid...
    Then saved as default...
    You'll have to test this... not even sure it works to Scale to Size, but at least you could drop them on Preview then +p to see.

  • How to default Preview/Finder to print "Scale to Fit Print Entire image/Fill Entire Paper"?

    Hello all,
    I have to print PDFs. Preview or printing directly from Finder prints scaling 100% and many many times the edges of the PDFs are left outside of the printing area. I have the correct paper size selected (A4) and actually the PDFs are also A4 but for some reason 100% zooms in a bit and cuts the sides of the print outside.
    I can of course fix this by selecting Scale to Fit and Print Entire Image but I do have to do this every single time I open a PDF. I want to make this option my default! And preferrably so that I can use CMD+P from Finder to print directly without having to open the PDF. I already know what is in it...
    I have tried different Terminal tricks I have found searching the web but no luck, this and others with Preview closed before executing the command
    defaults delete com.apple.Preview PVImagePrintingScaleMode
    Please help and make my life easier. Cannot be this hard.

    I got a work around for this. Instead of using RTF template, I used Microsoft Excel itself as template and did the formatting in excel.
    thanks,
    Vijay

  • Printing Questions - "Poster" - One image on multiple sheet of paper (to create an enlargement)

    Hello,
    Tried to find this in the archives - apologies if this has already been answered. Kindly reply with that link and I won't ask you to chew your cabbage twice...
    On my older PC, I used to be able to print an image in "poster" mode, which essentially let me print and enlarge an image by printing it across multiple pages (e.g. 4, 6, 9 pages.) Since I'm a painter, this was an easy way for me to print out an image - and enlarge it - from which I could tape the pages together to create the enlargement. I then could use that rough poster-enlargement-on-multiple-sheets-of-paper to trace on to my canvas. (And my photographer friends have already pointed out the ease of which to actually print poster size images, but I don't need that expense or hassle for my purposes. I basically want an enlargement to trace onto a larger size canvas to paint on.)
    Since I just got a new Mac, I've downloaded PSE9 Mac trial, but can't for the life of me figure out how to replicate what I used to do on my PC, granted with an older version of PSE.
    Hoping this makes sense - and hoping against hope that someone can nudge me in the right direction...
    Thanks!
    Greg
    BTW - IF this does make sense, AND I can do on the Mac or the newer version of PSE - anybody got an idea for a workaround? (Short of buying PS CS5...?)

    Juergen,
    Thanks so much! Of course you're right - and this does the job perfectly! Thank you so much for the prompt replay, explained clearly, and very helpful! You've really helped me move onto items which I've really wanted to do!
    Very gratefully,
    Greg

  • How do I print multiple PDFs AND fit them to my paper size?

    Hi,
    I'm using a 24 inch wide plotter with roll paper. I want to be able to print multiple PDFs  AND fit them to a specified paper size. I can print one page and fit it to the paper, but I can't do it with multiple PDFs.
    For example, I have two PDFs that are only 8x8 inches. I want to print them side by side on a 24 inch x 12 inch page size and fit them to size and then FIT them to the page size so the end result will be 2 PDFs printing at 12 x 12 side by side.
    I can't seem to be able to do this. I'm sure I was able to do this using earlier versions. As it is, I have to print one at a time and waste half of my roll paper size.
    Any help?
    Adobe Acrobat Pro, Windows 7 Proffesional, HP Designjet 111 roll fed plotter.
    Thanks

    Note this illustration is Based on Mac version of HP Print Driver standard inkjet. However Control should be smilar Layouts and titles may be different:
    Adjust items shown according to pages desired

  • When I print a selected area of web page, it doesn't fit to the paper. The end of each page are cut off. Is there any solution?

    When I print a selected area of web page, it doesn't fit to the paper. The end of each page are cut off.
    I'm very sure my printer is set cirrectly.
    Can't Firefox shrink to fit when I want to print a selected area of web pages?
    This has never occurred in IE.

    File >Page Setup -- check your margins, I have set size to 85% which is probably left over from some problem. Also check your printer that it is correctly set to the size of the paper.

  • 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?

  • Is Custom print package "rotate to fit" still not implemented?

    On Dec 2, Al-R started a discussion thead for LR3 beta about a problem he was having with rotating an image to fit a frame he created using the Custom Print Package. He couldn't get the image to rotate to fit. I get the sense that the "rotate to fit" check box wasn't available. I never downloaded the beta of LR3 so I don't know this for sure, but that seemed to be the case based on the dialogue in his thread.
    Ian Lyons solved the mystery by pointing out that the Custom Print Package feature was not complete in the beta, and that Rotate To Fit was one of the things that hadn't been implemented. He said he expected it to be implemented in the final shipping release.
    While the Rotate To Fit check box is now available in the Custom Print Packate (shipping version 3.0), it doesn't have the intended effect. When dropping a portrait image onto a landscape frame in the Custom Print Package, the frame is ignored and the image expands to fit the paper size. Checking Rotate To Fit on and off has no effect. The only work-around I have found is to rotate the image prior to dropping it on the frame. Once the orientations match, the image fills the frame properly.
    Is this a case of the feature not making it into the final release, or is this a bug, or am I missing something really important here?
    Thanks for your help,
    Charlie

    What OS?
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.9 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

  • Unable to center a print on 8/5 x 11 inch paper with Pixma Pro 100

    I've been using a Pixma Pro 100 for just 3 weeks.  No matter what I do or try, prints on 8.5 by 11 inch paper using the manual feed tray are not centered.  In portrait orientation, the margin on the leading edge short edge is slightly less no matter what size the image.  For example, if the leading edge margin is 1/4 inch, the opposite margin is 3/8 inch.  If the leading edge is 7/8 inch, the opposite margin is 1 inch dead.  The long side margins are equal.  I'm using Photoshop Elements 9.0.  I've tried printing out of the edit space, where "center print" is an option, but I realize now that this just centers the image in the window representing the print, that it does not center the image on the page.  I have not notice this problem with smaller size paper, such as 4 x 6.  Any suggestions?  I have not tried loading the paper in the internal or "rear" tray because I thought the paper path with the manual feed would be straighter.  Besides, I'd like to be able to use the manual feed with even larger paper and get centered prints.
    P.S.  I just tried selecting "borderless" print in PSE 9 with a custom image size smaller than the paper, e.g. 7 x 9.8 inches, and crop to fit.  Just looking at the preview, this seems to have resulted in equal margins left and right, top and bottom (the L-R margins are different than the T-B margins of course).  I was unable to make any of the necessary adjustments in Canon Print Studio Pro - I could not figure out how to unlink the height and width of the image.

    "...  that is a remarkably unhelpful and condescending response."
    Condescending or not, however, it is still most likely PSE that accomplishs this task.  I don't use PSE anymore since I switched to Lightroom.  Hence the suggestion to find a PSE forum.
    But it is the software that let's you move or put the photos where you want them to print.
    A PSE forum may be able to show you how to do this.  Example below, if I want two 5x7s in oppoiste corners, it is done easily in LR.
    If I wanted one photo centered it is a simple click to get the adjustment "squares" and move the photo.  (Bottom picture)
    BTW, I am not worried.
    EOS 1Ds Mk III, EOS 1D Mk IV EF 50mm f1.2 L, EF 24-70mm f2.8 L,
    EF 70-200mm f2.8 L IS II, Sigma 120-300mm f2.8 EX APO
    Photoshop CS6, ACR 9, Lightroom 6

Maybe you are looking for

  • IPhone 3 to 4.0.2 upgrade - lost contacts, messages, mail, calendar, notes

    I have just upgraded my iPhone 3 to to the latest 4.0.2 OS. However, in doing so I have lost all my contacts, messages, mail, calendar and notes. How do I get all my lost information back.

  • Acrobat Pro 9 - URL link to open in browser in background (behind PDF)?

    Hi!  I've been searching for days now... does anyone know if it's possible using Acrobat Pro 9 to force a URL link to open in the background, behind a PDF in order to keep the reader at the PDF instead of instantly switching to their web browser?  Th

  • How to extend the material in the material master?

    hi all gurus i have to change and add the MRP tabs in the existing material which is not availble in the material. so, how can i add it in the master data. thnx in advance. rgrds, rajesh

  • Generator +Alpha not rendering w/alpha???

    Is it me or what? A simple 1.2 second flash transition using: 1. one instance of lens flare from left to right 2. one instance of lens flare from right to left when the two intesect at center of canvas, I blast the intensity to wipe the screen as a t

  • Synchronize SAP Roles with IDM Roles

    Hi, i have a question concerning SAP integration in IDM. Is it possible to import the Roles from SAP (named Activity groups) in IDM? And how does the "synchronize identity system roles with resource roles" function work? Thanks in advance! gojo