I have written an intro to PDF tutorial for those that are interested in PDF interactivity within your iPhone apps. This first tutorial, shows how to simply create a PDF that contains an image, some text and a border around the page.
Ok, on to the goods! There are two custom methods in the PDFViewController.m file that you will be looking at mostly. The first is CreatePDFFile. This method does exactly what it says - creates a PDF file. The second method is called createPDF, and is an IBAction method hooked to an UIButton in IB. Upon touching the button this method calls our CreatePDFFile method.
Important - there is no output after clicking the button, meaning you will not see the resulting PDF displayed on the phone. I can create a second tutorial for that purpose, but it seemed like most people were only interested in the creation of the file.
In order to view the resulting PDF go to:
Users/YourUserName/Library/Application Support/iPhone Simulator/User/Applications
In this directory sort by Date Modified. If the example project here was the last app that you ran it will be at the top of this directory. Simply navigate to the documents directory of the PDF example app and you will be able to see the PDF it creates.
Let me know if you have any questions!
P.S. So it seems that the example project was larger than the allowed size for attachments. I will get the whole project up on the web for download soon, but in the meantime I have included the class files which is all you should need.
I am new to iPhone development, so kindly explain it to me. I didnt change anything in your code. But when i commit block of image. Pdf file is generating in the folder you told with "Hello World"...... But for that in console i am getting error
CreatePDFFile[1011] : FT_Load_Glyph failed: error 6.
How can i fix these issues? Any ideas...... Would be greatly thankful to you
Great tutorial. I'm having some issues with the Simulator crashing after I press the "make pdf" button. It is indeed writing the file, but apparently its empty and I can't open it.
If you can share the tutorial with me, it would be much appreciated.
Great tutorial. I'm having some issues with the Simulator crashing after I press the "make pdf" button. It is indeed writing the file, but apparently its empty and I can't open it.
If you can share the tutorial with me, it would be much appreciated.
I have written an intro to PDF tutorial for those that are interested in PDF interactivity within your iPhone apps. This first tutorial, shows how to simply create a PDF that contains an image, some text and a border around the page.
Ok, on to the goods! There are two custom methods in the PDFViewController.m file that you will be looking at mostly. The first is CreatePDFFile. This method does exactly what it says - creates a PDF file. The second method is called createPDF, and is an IBAction method hooked to an UIButton in IB. Upon touching the button this method calls our CreatePDFFile method.
Important - there is no output after clicking the button, meaning you will not see the resulting PDF displayed on the phone. I can create a second tutorial for that purpose, but it seemed like most people were only interested in the creation of the file.
In order to view the resulting PDF go to:
Users/YourUserName/Library/Application Support/iPhone Simulator/User/Applications
In this directory sort by Date Modified. If the example project here was the last app that you ran it will be at the top of this directory. Simply navigate to the documents directory of the PDF example app and you will be able to see the PDF it creates.
Let me know if you have any questions!
P.S. So it seems that the example project was larger than the allowed size for attachments. I will get the whole project up on the web for download soon, but in the meantime I have included the class files which is all you should need.
So I have just a simple quick question.
Is there a website for intro to Xcode4?
Preferably a simplified version of the tutorial would be awesome.
I'm new to the mac and the whole concept of developing.
And i would like a very simple and efficient way to learn.
I am no developer or anything.
Just a complete noob interested in finding a new hobby in creating apps.
Please reply back if possible.
Is this the most simplest way to show a PDF document in an app ? I am creating a tutorial app that I want to just add different PDF files to different views. There should be a simplier solution than this. If I am wrong please PM Me.
hi im creating a project to display the reports of a patient. i need to create a pdf for tat. form ur post i undr ur tutorial is really gud. i would like to use urs. but in tat zip only the files are there, can u mail me the whole project. and can u tel me how to edit the pdf and highlight the text???
I have written an intro to PDF tutorial for those that are interested in PDF interactivity within your iPhone apps. This first tutorial, shows how to simply create a PDF that contains an image, some text and a border around the page.
Ok, on to the goods! There are two custom methods in the PDFViewController.m file that you will be looking at mostly. The first is CreatePDFFile. This method does exactly what it says - creates a PDF file. The second method is called createPDF, and is an IBAction method hooked to an UIButton in IB. Upon touching the button this method calls our CreatePDFFile method.
Important - there is no output after clicking the button, meaning you will not see the resulting PDF displayed on the phone. I can create a second tutorial for that purpose, but it seemed like most people were only interested in the creation of the file.
In order to view the resulting PDF go to:
Users/YourUserName/Library/Application Support/iPhone Simulator/User/Applications
In this directory sort by Date Modified. If the example project here was the last app that you ran it will be at the top of this directory. Simply navigate to the documents directory of the PDF example app and you will be able to see the PDF it creates.
Let me know if you have any questions!
P.S. So it seems that the example project was larger than the allowed size for attachments. I will get the whole project up on the web for download soon, but in the meantime I have included the class files which is all you should need.
Thanks for the tutorial.
I am new to xcode program, could you tell me how to send up the directory so that i can use the file you provided???
thanks
Anyone got this solution work , please help me import this code to my app. I just download all code, import in my application, but when i run it , it show me theard 1 : Program received signal: "SIGABRT" . I don't know how to fix it. Please help me
Anyone got this solution work , please help me import this code to my app. I just download all code, import in my application, but when i run it , it show me theard 1 : Program received signal: "SIGABRT" . I don't know how to fix it. Please help me
Finally i can fix this problem and run this code very well. Thank danielb21 so much !!!
I have written an intro to PDF tutorial for those that are interested in PDF interactivity within your iPhone apps. This first tutorial, shows how to simply create a PDF that contains an image, some text and a border around the page.
Ok, on to the goods! There are two custom methods in the PDFViewController.m file that you will be looking at mostly. The first is CreatePDFFile. This method does exactly what it says - creates a PDF file. The second method is called createPDF, and is an IBAction method hooked to an UIButton in IB. Upon touching the button this method calls our CreatePDFFile method.
Important - there is no output after clicking the button, meaning you will not see the resulting PDF displayed on the phone. I can create a second tutorial for that purpose, but it seemed like most people were only interested in the creation of the file.
In order to view the resulting PDF go to:
Users/YourUserName/Library/Application Support/iPhone Simulator/User/Applications
In this directory sort by Date Modified. If the example project here was the last app that you ran it will be at the top of this directory. Simply navigate to the documents directory of the PDF example app and you will be able to see the PDF it creates.
Let me know if you have any questions!
P.S. So it seems that the example project was larger than the allowed size for attachments. I will get the whole project up on the web for download soon, but in the meantime I have included the class files which is all you should need.
So what was the fix for the issue?
I am also facing the same issue.
Thanks
It was a month ago , so i can't remember how can i fix this problem. Therefore i decide to create an example with this code to show other member how to create pdf file in their application. In addition, i embed some code to show the pdf file after creating. Hope this will helpful for some people