CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

LGPdf 0.1.3-alpha

LGPdf 0.1.3-alpha

TestsTested
LangLanguage Obj-CObjective C
License Apache 2
ReleasedLast Release Sep 2016

Maintained by maomishen.



LGPdf 0.1.3-alpha

  • By
  • LunaGao

Bless

Create pdf file in iOS

Easy way to create Pdf file in iOS.

Demo

This project is the Demo project

Pdf screenshot

Screenshot

How to Use

Pod

    pod ???

Gudie

Init Pdf

    LGPdf *pdf = [LGPdf createPDF];
    struct LGPageInfo size = {A4_L,A4_S};
    [pdf setFileName:@"demo.pdf" pageSize:size];
    [pdf readyToWrite];
    [pdf newPage];

Text

    LGPdfText* text = [[LGPdfText alloc] init];
    [text setText:@"hello pdf"];
    [pdf addText:text];

Table

Please see the demo code

Image

    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];

Close Pdf

    [pdf closeToWrite];
    NSLog(@"%@", [pdf getPdfFile]);