Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7504811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:41:50+00:00 2026-05-29T21:41:50+00:00

Currently I am working on a Paint Application for iPhones and iPads. I want

  • 0

Currently I am working on a Paint Application for iPhones and iPads. I want to print the current screen display (Drawing) of the screen. Can any body help me in these case ?

Here is the code i have used so far ,

-(void)printImage { 
    NSString *path = [[NSBundle mainBundle] pathForResource:@"micky" ofType:@"png"];
    NSData *dataFromPath = [NSData dataWithContentsOfFile:path];

    UIPrintInteractionController *pCon = [UIPrintInteractionController sharedPrintController];

    if(pCon && [UIPrintInteractionController canPrintData:dataFromPath]) {
        pCon.delegate = self;   
        UIPrintInfo *printInfo = [UIPrintInfo printInfo];
        printInfo.outputType = UIPrintInfoOutputGeneral;
        printInfo.jobName = [path lastPathComponent];
        printInfo.duplex = UIPrintInfoDuplexLongEdge;
        pCon.printInfo = printInfo;
        pCon.showsPageRange = YES;
        pCon.printingItem = dataFromPath;

        void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) = ^(UIPrintInteractionController *printController, BOOL completed, NSError *error) {
            if (!completed && error) {
                NSLog(@"Unsuccessfull %@ error%u", error.domain, error.code);
            }
        };

        [pCon presentAnimated:YES completionHandler:completionHandler];

    } 
}

Again , all what i want to know is i should be able to print the Current Window(Drawing, Screen) instead of the Image Micky.png (as in the code)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:41:52+00:00Added an answer on May 29, 2026 at 9:41 pm

    This code takes a screenshot of the current view and outputs an UIImage of it:

    UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, YES, 0);
    CGContextRef context = UIGraphicsGetCurrentContext();
    [self.view.layer renderInContext:context];
    UIImage *imageFromCurrentView = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on an application in Android. As a start, I want to
I am currently working on the WPF project which involves creating a touch-screen application
I am currently working on an Paint-like WPF application and now stand before the
I am new to iPhone application development and currently working on a simple paint
Am currently working on an application that requires users to submit posts and comments
I am currently working with a codeigniter PHP based application and have come to
I am currently working on an application named BlackBerry Contacts Sync and I am
The application that I'm currently working on has a funky set up for the
I am currently working on an ASP.NET 3.5 and C# web application which deals
Intro In the application I 'm currently working on, there are two kinds of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.