I find the Apple documentation difficult to read through. Perhaps someone out there is willing to share some code on how to easily print a JPG or PNG file in iOS 4.2?
There are three basic steps:
Instantiate an NSData object from your file.
Create a UIPrintInfo object that contains the job specs.
Send the data to a UIPrintInteractionController, which will begin the process.
See this article for a code sample.
Related
I just got into xcode and swift using Parse. I've created a view controller with an image view and some labels. I also set up a Parse server with images and description of those images (for example: an image of a tree with a separate file of the description of the tree). I've looked around and I cant seem to find an answer. How do I upload the image on parse to my image view with the corresponding description of the image? Thanks you.
Did you already look into the Parse Ios guide?
I think that you have to implement the Parse SDK for Ios.
and then use what they say there store images in Parse with swift
In my iOS Swift application I have images stored as NSData in a Realm database. Now I want to combine these images (or a subset query of them) into a single ZIP file and make it available for further transfer via Airdrop, Email and so on.
I am fine with how to transfer and how to get them out of the database but I have no clue how to create a single ZIP file out of a bunch of NSData objects.
After changing some keywords in Google for the search, I found 2 interesting looking Libs/Frameworks I now will start investigating in.
ZIP from Marmelroy
and
ZipArchive
Both can be found on GitHub. I have no big experiences with both of them at the moment. But ZipArchiveseems to have options for NSDataSupport as this is already stated in the Readme
Zip-up NSData instances. (with a filename)
So this might be an indicator for me.
You could simply serialize and archive your images instead before AirDrop sharing. See AirDropSample.
Quick question, that I haven't found a solid answer yet.
Is it possible to generate a PDF in iOS that includes layers, which can then be removed/separated in Photoshop?
What I'm trying to achieve is take a picture with the camera of the phone, then place text over it, submit it as pdf to a customer and then have the customer read the text and remove it.
I can do everything except the layering of the pdf and I have found some hints that this isn't possible to do with the standard iOS library, but I wanted to know if anyone has come across this before.
Thank you.
The standard iOS API for creating PDF files cannot create layers (optional content) in a PDF page.
This library IFXPDFFactory seems to be able to generate PDF files with layers.
PoDoFo and libHaru can also be used to generate PDF files on iOS but I do not know if they support layers.
I am a newbie in iPhone development. I am planning to do a PDF application for iPhone. The functionality is:
User will type their input in a text field (which is going to be the content of the PDF file).
I have to modify the PDF file through code while saving (paragraphs, tables, bullets etc).
User can save it in their own name.
User can send the PDF file as attachment of MFMailComposer.
So I have searched and got many links. However I didn't find any leading details to create and modify a PDF file in iPhone/iPad.
Can anyone please provide me a good reference to do this. Are there any alternatives to do this?
I've used this reference: https://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf/dq_pdf.html
It contains theoretical explanations and source code examples
Please use the below link to download sample apps for PDF Reader/Viewer in iOS
PDF Reader/Viewer in iOS
Also please look at detail about pdf creation, manipulation etc in below links
developer.apple: PDF Document Creation, Viewing, and Transforming
Fast-and-lean-pdf-viewer-for-iphone
If you were doing a Phonegap app I'd say got for jsPDF, which would enable you to create (basic) PDF files in Javascript. I don't do Obj-C, but a quick look on SO provides good links.
For a project we need to download and save pdf files on an IPAD device for offline use through an AIR for iOs application.
After a lot of searching I haven't found much information on this subject. My question is, can it be done, and if so, can you provide us with some pointers to lead us in the right direction.
Thanks for your time!
Sure, first you check if you can access the web - can use a class like air.net.URLMonitor, if you can you can set up a URLStream instance.
You get data while its downloading the file using the progress event, write that out to a File instance using the FileStream class.
To display the PDF file you can use a StageWebView or HTMLLoader.