Skip to content

Commit 848d33a

Browse files
author
Philip Niedertscheider
authored
Merge pull request #206 from techprimate/release/2.0.1
Release/2.0.1
2 parents c3aa6f1 + dcf1859 commit 848d33a

File tree

213 files changed

+808
-6775
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+808
-6775
lines changed

CHANGELOG.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,28 @@
55

66
**Implemented enhancements:**
77

8-
- Added deprecation for JSON representation
8+
**Fixed bugs:**
9+
10+
**Closed issues:**
11+
12+
**Merged pull requests:**
13+
14+
15+
## [2.0.1](https://github.com/techprimate/TPPDF/tree/2.0.1) (2020-05-31)
16+
[Full Changelog](https://github.com/techprimate/TPPDF/compare/2.0.0...2.0.1)
17+
18+
**Implemented enhancements:**
19+
20+
- Removed JSON representation
921
- Added deprecation for `table.generateCells`
1022

1123
**Fixed bugs:**
1224

25+
- Missing page break after space which overlaps page end (#204)
26+
1327
**Closed issues:**
1428

15-
**Merged pull requests:**
29+
- #204
1630

1731
## [2.0.0](https://github.com/techprimate/TPPDF/tree/2.0.0) (2020-05-19)
1832
[Full Changelog](https://github.com/techprimate/TPPDF/compare/1.6.0...2.0.0)

Example iOS-SwiftPM/Example.xcodeproj/project.pbxproj

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -156,23 +156,23 @@
156156
D498551D2461FB0B00D54270 /* Examples */ = {
157157
isa = PBXGroup;
158158
children = (
159-
D498551E2461FB0B00D54270 /* PaginationExampleFactory.swift */,
160-
D498551F2461FB0B00D54270 /* TableOfContentsExampleFactory.swift */,
161-
D49855202461FB0B00D54270 /* TableExampleFactory.swift */,
162-
D49855212461FB0B00D54270 /* LineSeparatorExampleFactory.swift */,
163-
D49855222461FB0B00D54270 /* TextStylesExampleFactory.swift */,
164-
D49855232461FB0B00D54270 /* MultiSectionExampleFactory.swift */,
159+
D49855552461FB9A00D54270 /* Examples.swift */,
160+
D498552B2461FB0B00D54270 /* ExperimentFactory.swift */,
161+
D49855262461FB0B00D54270 /* ExternalDocumentExampleFactory.swift */,
165162
D49855242461FB0B00D54270 /* GroupExampleFactory.swift */,
166163
D49855252461FB0B00D54270 /* HeaderFooterExampleFactory.swift */,
167-
D49855262461FB0B00D54270 /* ExternalDocumentExampleFactory.swift */,
168-
D49855272461FB0B00D54270 /* MultipleDocumentsExampleFactory.swift */,
169-
D49855282461FB0B00D54270 /* ListExampleFactory.swift */,
170-
D49855292461FB0B00D54270 /* TextExampleFactory.swift */,
171-
D498552A2461FB0B00D54270 /* ObjectAttributesExampleFactory.swift */,
172-
D498552B2461FB0B00D54270 /* ExperimentFactory.swift */,
173164
D498552C2461FB0B00D54270 /* ImageExampleFactory.swift */,
165+
D49855212461FB0B00D54270 /* LineSeparatorExampleFactory.swift */,
166+
D49855282461FB0B00D54270 /* ListExampleFactory.swift */,
174167
D498552D2461FB0B00D54270 /* MetadataExampleFactory.swift */,
175-
D49855552461FB9A00D54270 /* Examples.swift */,
168+
D49855272461FB0B00D54270 /* MultipleDocumentsExampleFactory.swift */,
169+
D49855232461FB0B00D54270 /* MultiSectionExampleFactory.swift */,
170+
D498552A2461FB0B00D54270 /* ObjectAttributesExampleFactory.swift */,
171+
D498551E2461FB0B00D54270 /* PaginationExampleFactory.swift */,
172+
D49855202461FB0B00D54270 /* TableExampleFactory.swift */,
173+
D498551F2461FB0B00D54270 /* TableOfContentsExampleFactory.swift */,
174+
D49855292461FB0B00D54270 /* TextExampleFactory.swift */,
175+
D49855222461FB0B00D54270 /* TextStylesExampleFactory.swift */,
176176
);
177177
path = Examples;
178178
sourceTree = "<group>";

Shared iOS/UI/ExamplesListViewController.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ import UIKit
1111

1212
class ExamplesListViewController: UITableViewController {
1313

14+
override func viewDidAppear(_ animated: Bool) {
15+
super.viewDidLoad()
16+
//performSegue(withIdentifier: "show-example", sender: IndexPath(row: 0, section: 1))
17+
}
18+
1419
override func numberOfSections(in tableView: UITableView) -> Int {
1520
return Examples.factories.count
1621
}

Shared/Examples/TextExampleFactory.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ class TextExampleFactory: ExampleFactory {
6363
document.set(font: UIFont.italicSystemFont(ofSize: 13))
6464
document.add(text: LoremIpsum.get(words: 100))
6565

66+
document.add(space: 300)
67+
document.add(text: "Test text here")
68+
6669
return [document]
6770
}
6871
}

Source/API/Graphics/PDFLineStyle.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import UIKit
1010
/**
1111
This struct defines how a line or border of a table is drawn.
1212
*/
13-
public struct PDFLineStyle: PDFJSONSerializable {
13+
public struct PDFLineStyle {
1414

1515
/**
1616
Defines the type of this line

Source/API/Graphics/PDFLineType.swift

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,3 @@ public enum PDFLineType {
3535
case dotted
3636

3737
}
38-
39-
// MARK: - JSON Serialization
40-
41-
extension PDFLineType: PDFJSONSerializable {
42-
43-
/**
44-
Creates a serializable object
45-
*/
46-
public var JSONRepresentation: AnyObject {
47-
switch self {
48-
case .none:
49-
return 0 as AnyObject
50-
case .full:
51-
return 1 as AnyObject
52-
case .dashed:
53-
return 2 as AnyObject
54-
case .dotted:
55-
return 3 as AnyObject
56-
}
57-
}
58-
}

Source/API/Groups/PDFGroup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import UIKit
1111
/**
1212
TODO: Documentation
1313
*/
14-
public class PDFGroup: PDFJSONSerializable {
14+
public class PDFGroup {
1515

1616
// MARK: - PUBLIC VARS
1717

Source/API/Groups/PDFGroupContainer.swift

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,24 +60,3 @@ public enum PDFGroupContainer {
6060
}
6161
}
6262
}
63-
64-
// MARK: - JSON Serialization
65-
66-
extension PDFGroupContainer: PDFJSONSerializable {
67-
68-
/**
69-
Creates a representable object
70-
*/
71-
public var JSONRepresentation: AnyObject {
72-
switch self {
73-
case .none:
74-
return 0 as AnyObject
75-
case .left:
76-
return 1 as AnyObject
77-
case .center:
78-
return 2 as AnyObject
79-
case .right:
80-
return 3 as AnyObject
81-
}
82-
}
83-
}

Source/API/Image/PDFImage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import UIKit
1010
/**
1111
Image element for the PDF document. Contains all information about an image, including the caption.
1212
*/
13-
public class PDFImage: PDFDocumentObject, PDFJSONSerializable {
13+
public class PDFImage: PDFDocumentObject {
1414

1515
/**
1616
The actual image

Source/API/Image/PDFImageSizeFit.swift

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,3 @@ public enum PDFImageSizeFit {
2626
case widthHeight
2727

2828
}
29-
30-
// MARK: - JSON Serialization
31-
32-
extension PDFImageSizeFit: PDFJSONSerializable {
33-
34-
/**
35-
Creates representable object
36-
*/
37-
public var JSONRepresentation: AnyObject {
38-
switch self {
39-
case .width:
40-
return 0 as AnyObject
41-
case .height:
42-
return 1 as AnyObject
43-
case .widthHeight:
44-
return 2 as AnyObject
45-
}
46-
}
47-
}

0 commit comments

Comments
 (0)