Latest 0.1.3-alpha
Homepage https://github.com/LunaGao/LGPdf
License Apache License, Version 2.0
Platforms ios 9.3, requires ARC
Frameworks UIKit, Foundation
Authors

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 'LGPdf', '~> 0.1.3-alpha'

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

Latest podspec

{
    "name": "LGPdf",
    "version": "0.1.3-alpha",
    "summary": "Create Pdf file in iOS",
    "description": "Easy way to create Pdf file in iOS.",
    "homepage": "https://github.com/LunaGao/LGPdf",
    "license": "Apache License, Version 2.0",
    "authors": {
        "LunaGao": "[email protected]"
    },
    "platforms": {
        "ios": "9.3"
    },
    "source": {
        "git": "https://github.com/LunaGao/LGPdf.git",
        "tag": "v0.1-alpha"
    },
    "source_files": [
        "LGPdf",
        "LGPdf/LGPdf",
        "LGPdf/LGPdf/LGPdfElement",
        "LGPdf/LGPdf/LGController"
    ],
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This