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 6002407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:58:25+00:00 2026-05-23T00:58:25+00:00

I have a MonoTouch application that generates some PDFs locally and then prints them

  • 0

I have a MonoTouch application that generates some PDFs locally and then prints them to a network printer. To get this working I initially just added a PDF resource to the project that I could try and print but am having a heck of a time. When I print just HMTL or a string value everything is good but printing the PDF has me lost. When debugging it looks like the app is getting the proper URL.

Any help would be greatly appreciated and my sampled code is below:

public void PrintSomePDF ()
    {
        var printInfo = UIPrintInfo.PrintInfo;
        printInfo.OutputType = UIPrintInfoOutputType.General;
        printInfo.JobName = "Test: PDF Print";

        string pdfFileName = "printthispdf_01.pdf";
        NSUrl url = NSUrl.FromFilename(pdfFileName);           

        var printer = UIPrintInteractionController.SharedPrintController;
        printer.PrintInfo = printInfo;
        printer.PrintingItem = url.Path;
        printer.ShowsPageRange = true;

        printer.Present (true, (handler, completed, err) => {
            if (!completed && err != null){
                Console.WriteLine ("error");
            }
        });
    }

I was able to resolve the problem with the way I passed in the NSUrl to the PrintingItem. Before I was passing in printer.PrintingItem = url.Path; which was basically just passing in a string of the path and not the actual shape of NSUrl.

printer.PrintingItem = url;
  • 1 1 Answer
  • 3 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-23T00:58:26+00:00Added an answer on May 23, 2026 at 12:58 am

    What I’ve always preferred to do (and this depends very much on the deployed device – in my case it was a server I controlled) was to just install a PDF printer and then it’s as easy as printing any other kind of document.

    Something like BullZip is free and allows you to write any settings for the print to a RunOnce.ini (xml) file to have a silent mode print with settings for the filename and so forth.

    Obviously not a great solution if you don’t have control of the system you’re deploying to, but a solid and easy one if you do.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MonoTouch application that seems to throw an exception randomly on the
I have an application that uses Monotouch/C# on the Mac as the front end,
I have ported over some code from a Windows application to Monotouch. It is
I have made the decision to use monotouch to develop an application that browses
I have got an application developed with Monotouch 4.0.7. This app is running on
I have an monotouch application that includes an objective-c static library. The application runs
I have an iPhone Windows-based Monotouch application that appears to use more memory to
I'm writing an application for the iPhone in MonoTouch, and I have some performance
I have an application that is written in Monotouch and one function that it
I have an application that is making use of the PhoneGap (version 1.4.1). It

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.