CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Apache 2 |
ReleasedLast Release | Sep 2016 |
Maintained by maomishen.
Easy way to create Pdf file in iOS.
This project is the Demo project
pod ???
LGPdf *pdf = [LGPdf createPDF];
struct LGPageInfo size = {A4_L,A4_S};
[pdf setFileName:@"demo.pdf" pageSize:size];
[pdf readyToWrite];
[pdf newPage];
LGPdfText* text = [[LGPdfText alloc] init];
[text setText:@"hello pdf"];
[pdf addText:text];
Please see the demo code
LGPdfImage *image = [[LGPdfImage alloc] init];
UIImage *uiImage = [UIImage imageNamed:@"pdf_png"];
[image setImage:uiImage];
struct CGSize imageSize = {100, 100};
[image setSize:imageSize];
[pdf addImage:image];
[pdf closeToWrite];
NSLog(@"%@", [pdf getPdfFile]);