Closed StefaniOSApps closed 6 years ago
Can you add the JSON debug of your document? This way I can see how your document looks like
let _ = document.toJSON(options: JSONSerialization.WritingOptions.prettyPrinted) ?? "nil"
print(json)
{
"info" : {
"allowsCopying" : true,
"userPassword" : null,
"title" : "Title",
"keywords" : [
"tppdf",
"pdf",
"generator"
],
"author" : "Author",
"ownerPassword" : null,
"allowsPrinting" : true,
"subject" : "Subject"
},
"pagination" : {
"range" : {
"start" : 0,
"end" : 9223372036854775807
},
"container" : 0,
"style" : "PDFPaginationStyle.default",
"hiddenPages" : [
]
},
"layout" : {
"size" : {
"height" : 842,
"width" : 595
},
"margin" : "UNKNOWN",
"space" : {
"footer" : 15,
"header" : 15
}
},
"objects" : [
{
".1" : {
"font" : {
}
},
".0" : 7
},
{
".1" : {
"simpleText" : null,
"attributedString" : "UNKNOWN",
"attributedText" : null
},
".0" : 7
},
{
".1" : {
"simpleText" : null,
"attributedString" : "UNKNOWN",
"attributedText" : null
},
".0" : 7
},
{
".1" : {
"simpleText" : null,
"attributedString" : "UNKNOWN",
"attributedText" : null
},
".0" : 7
},
{
".1" : {
"font" : {
}
},
".0" : 9
},
{
".1" : {
"simpleText" : null,
"attributedString" : "UNKNOWN",
"attributedText" : null
},
".0" : 9
},
{
".1" : {
"simpleText" : null,
"attributedString" : "UNKNOWN",
"attributedText" : null
},
".0" : 9
},
{
".1" : {
"simpleText" : null,
"attributedString" : "UNKNOWN",
"attributedText" : null
},
".0" : 9
},
{
".1" : {
"font" : {
}
},
".0" : 7
},
{
".1" : {
"font" : {
}
},
".0" : 9
},
{
".1" : {
"font" : {
}
},
".0" : 4
},
{
".1" : {
"simpleText" : null,
"attributedString" : "UNKNOWN",
"attributedText" : null
},
".0" : 4
},
{
".1" : {
"font" : {
}
},
".0" : 4
},
{
".1" : {
"simpleText" : null,
"attributedString" : "UNKNOWN",
"attributedText" : null
},
".0" : 4
},
{
".1" : {
"space" : 20
},
".0" : 4
},
{
".1" : {
"table" : {
"showHeadersOnEveryPage" : true,
"margin" : 0,
"cells" : [
[
{
"content" : null,
"style" : null,
"alignment" : 4
},
{
"content" : null,
"style" : null,
"alignment" : 4
},
{
"content" : null,
"style" : null,
"alignment" : 4
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
],
[
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 3
},
{
"content" : null,
"style" : null,
"alignment" : 5
},
{
"content" : null,
"style" : null,
"alignment" : 3
}
]
],
"style" : {
"columnHeaderStyle" : {
"colors" : {
"fill" : "#53ab68",
"text" : "#ffffff"
},
"borders" : "UNKNOWN",
"font" : {
}
},
"columnHeaderCount" : 1,
"rowHeaderStyle" : {
"colors" : {
"fill" : "#ffffff",
"text" : "#3b3b3b"
},
"borders" : "UNKNOWN",
"font" : {
}
},
"footerCount" : 0,
"rowHeaderCount" : 1,
"outline" : {
"type" : 0,
"width" : 0,
"color" : "#000000"
},
"footerStyle" : {
"colors" : {
"fill" : "#53ab68",
"text" : "#ffffff"
},
"borders" : "UNKNOWN",
"font" : {
}
},
"contentStyle" : {
"colors" : {
"fill" : "#00000000",
"text" : "#3b3b3b"
},
"borders" : "UNKNOWN",
"font" : {
}
},
"alternatingContentStyle" : null
},
"padding" : 2,
"widths" : [
0.29999999999999999,
0.29999999999999999,
0.29999999999999999,
0.10000000000000001
]
},
"styleIndexOffset" : 0
},
".0" : 4
}
]
}
I did not test it with your example, but I did encounter the same issue with mine. I will close this for now, as I think I have resolved it
During testing, I noticed that certain content is creating a new page, but no content is displayed except for the header.