Printing to Airprint

Thank you for all the Xojo iOS users who need to print.

thanks for this example, but the class is locked …
I presume it’s all about declares
it’s only to know what they are …

Yes unfortunately the class is locked, but as long as it works correctly, don’t ask how it works :wink:

It is a very real issue to decide to use Xojo iOS rather than, say, B4i, for a new project that will print.

Right now I am pressed between the rock and the plate about that. I have almost completed Check printer for iOS in Xojo, using dtPlugins for printing.

But I am more than hesitant to release. I love Jean-Paul, but now that he left the market, I am at the mercy of a change in the system, and as Sam Rowlands has many times testified to it, Apple loves to change stuff on a whim. Printing is at the core of my app (in Fact two apps, Check Printer and Check Writer).

I cannot invest hours and hours of development with a sword over my neck. I need to know what I create will have enough durability to last the several years of app life span.

Using plugins no longer supported is a very real issue. There are a significant number of posts in this forum about people left dead in the water because the system changed and they could no longer follow. I cannot fathom hundreds of App Store customers all the sudden unable to use the app because of a change. With iOS adoption rate, it would be such an uproar, I don’t want to risk that.

Given the responses from Xojo, who visibly does not have the slightest concern over the issue, and seems to consider a core feature of a language like a petty feature request (“That IS how the feedback system works.”), and although that promises quite a bit of work, I will have to switch to a more complete development tool. I will consider the Xojo development as a mock up, and be done with all that pain and suffering.

At least, with a more serious language, I will have the assurance that the features I need are supported by the publisher in a professional manner.

I will be in good company ; there are a significant number of excellent programmers who had to leave Xojo for similar reasons.

I’m sure Michel would buy it with uncrypted source code …

I wish you a happy switch, and hope you’ll stop complaining each day on the forums!

You may be surprised to know that in fact, even if I had a source code of such a plugin, I would not touch it. Printing in iOS is way more complex than simply setting a property in a class. I looked into it when Xojo iOS came around (actually at the same time as the December 2014 feature request), and it is beyond my current skills.

Sure, I could yet again spend a significant number of hours becoming fluent in Objective C which for some reason, I detest the syntax of, but frankly, this is no way to work.

Sure, bury the problem in the sand, and be done with it. Contrary to some, I take supporting my customers very seriously.

Xojo is not a sect. At least I hope so. I don’t always complain, and have always kept a positive outlook, until I bumped into a situation I believe to be unacceptable. Don’t worry. I will soon hide the iOS channel, and you can be content sitting in the mud.

it’s not a plugin, it’s a encrypted class.
I also would not touch a c plugin even with source code.

if you are working on app that no use printer that is ok but 90% of my app need to print so how i do it i have to go to xcode and no XOJO.

If you look at the market of business software there are tons of reasons to have the ability to print. Keep in mind that mobile computing ist the most growing market and we have to notice that tablets and smartphones will be the notebooks and desktops of the near future. If you agree with this look at all the existing software on desktops and notebooks and then tell me again that there is no need to print.

any news for printing direct from xojo

I could really use this facility .
Tempted to try embedding the dtPlugins but Michel has a valid point.
All gravy right up to the day when Apple changes something , then boom… a key feature stops working and your app is dead in the water.
]

yes jeff
is a big problem for printing out of using XOJO lib

any news on XOJO printing direct

Place a sharing panel on your screen
If you have a text area containing on screen text…

use a button action as follows:

SharingPanel1.ShareText(AboutTextArea.text, Self, Me)

This opens the iPhone sharing functionality and one can print to Mail, Message, add to notes, and a local printer if connected by wifi or bluetooth.

The text area can be replaced by a record. I haven’t tried it with a Xojo report, but it should work.

Here is an example of a record:

Dim v As Int64
Dim Sexas Text
v = SegmentedControl1.value
if v = 0 then
Sex= “Male”
else
Sex= “Female”
End if

DIm Anticoagulant as text
Dim Slope AS Double = 0.0
if AspirinFlag then
Slope = Aspirin
Anticoagulant = “Aspirin”
end if
If NoOACFlag then
Slope = NoOAC
Anticoagulant = “None”
end if
If ApixabanFlag then
Slope = Apixaban
Anticoagulant = “Apixaban”
end if
If DabigatranFlag then
Slope = Dabigatran
Anticoagulant = “Dabigatran”
end if
If RivaroxabanFlag then
Slope = Rivaroxaban
Anticoagulant = “Rivaroxaban”
end if
If WarfarinFlag then
Slope = Warfarin
Anticoagulant = “Warfarin”
end if

Dim Record As Text = “Summary of Patient Record,”
Record = Record +" Height, Weight, Sex, EBV, preHeparinACT, desiredACT,InitialHeparinDose,postHeparinACT,Anticoagulant,Slope" + &u0A
Record = Record + " ,"+ HeightTextField.text + “,” + WeightTextField.text + “,” + Sex + “,” + preHeparinTextField.text + “,” + desiredACTTextField.text + “,”
Record = Record + BolusGivenTextField.text + “,” + postHeparinTextField.text + “,” + Anticoagulant + “,” + Slope.ToText + &u0A

SharingPanel1.ShareText(Record, Self, Me)

By the way, Printer Pro from Readdle is a cheap way to be able to connect to printers linked by WiFi. They also have an option to print to pdf, which can then be e-mailed

Well that just rubs salt into the wound.
Printer Pro is no good to my app.

?
Suggested printer pro as a separate app. You don’t need it, as you can use the sharing panel to send a document to your self or anyone else using mail on iOS. Then you can do what you like. I don’t mean to make your life harder, but trying to make it easier.
Good luck with your projects

But we want to print. And not just a couple of lines of shared text - there IS no document.
At a massive push, maybe get away with creating a PDF file (but that too is beyond Xojo)

if any news on this printing from iOs