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

  • Home
  • SEARCH
  • 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 7595695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:44:03+00:00 2026-05-30T21:44:03+00:00

I am creating an iPad application, in that i have to use different PDF

  • 0

I am creating an iPad application, in that i have to use different PDF forms. I got some methods to generate PDF files through code using Quartz2D. But I have to write entire forms through code. I may have to update the PDF forms in future, so again I have to write the code. So I heard that there is a component called iTextSharp for .net pdf creation – is there something similar for iOS? So that I can use some XML templates to create the PDF files.
Please help, thanks

  • 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-30T21:44:04+00:00Added an answer on May 30, 2026 at 9:44 pm

    I do this in my app using the iOS print subsystem and the UIMarkupTextPrintFormatter. The trick is to write your own custom UIPrintPageRenderer that overrides and returns correct values from paperRect and numberOfPages. You’ll add your UIMarkupTextPrintFormatter(s) to your custom UIPrintPageRenderer.

    Then, you’ll need routines similar to this, in the context of your custom UIPrintPageRenderer:

    - (CGRect) paperRect
    {
        if (!_generatingPdf)
            return [super paperRect];
    
        return UIGraphicsGetPDFContextBounds();
    }
    
    - (CGRect) printableRect
    {
        if (!_generatingPdf)
            return [super printableRect];
    
        return CGRectInset( self.paperRect, 20, 20 );
    }
    
    - (NSData*) printToPDF
    {
        _generatingPdf = YES;
    
        NSMutableData *pdfData = [NSMutableData data];
    
        UIGraphicsBeginPDFContextToData( pdfData, CGRectMake(0, 0, 792, 612), nil );  // letter-size, landscape
    
        [self prepareForDrawingPages: NSMakeRange(0, 1)];
    
        CGRect bounds = UIGraphicsGetPDFContextBounds();
    
        for ( int i = 0 ; i < self.numberOfPages ; i++ )
        {
            UIGraphicsBeginPDFPage();
    
            [self drawPageAtIndex: i inRect: bounds];
        }
    
        UIGraphicsEndPDFContext();
    
        _generatingPdf = NO;
    
    //    NSString* filename = @"/Volumes/Macintosh HD 2/test.pdf";
    //    [pdfData writeToFile: filename  atomically: YES];
    
        return pdfData;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking into creating an Web or iPad application that will use HTML5. After
I am a developing an iPad application in which i have to use CTRunDelegate
I'm creating a phonegap application for multiple platforms (specifically, Playbook and iPad) that requires
I'm creating an iPad application that supports ONLY LANDSDCAPE mode. I'm using storyboards. Even
I'm currently creating an ipad application. the idea is to have a toolbar at
Recently I have been tasked with creating an application for a business that basically
We are creating an iPad application that uses multiple SplitViewController. From the Apple documentation
Im creating an IPad Application which will have an SQL Server backend. My question
I am creating an iPad application that behaves like a power point presentational. I
I am currently creating an application (iPhone/iPad/Android) that uses a map to display houses

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.