{"action":"opened","issue":{"url":"https://api.github.com/repos/Techprimate/TPPDF/issues/81","repository_url":"https://api.github.com/repos/Techprimate/TPPDF","labels_url":"https://api.github.com/repos/Techprimate/TPPDF/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/Techprimate/TPPDF/issues/81/comments","events_url":"https://api.github.com/repos/Techprimate/TPPDF/issues/81/events","html_url":"https://github.com/Techprimate/TPPDF/issues/81","id":349809925,"node_id":"MDU6SXNzdWUzNDk4MDk5MjU=","number":81,"title":"Table Alignments Don't Match Data","user":{"login":"snoop168","id":2731594,"node_id":"MDQ6VXNlcjI3MzE1OTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2731594?v=4","gravatar_id":"","url":"https://api.github.com/users/snoop168","html_url":"https://github.com/snoop168","followers_url":"https://api.github.com/users/snoop168/followers","following_url":"https://api.github.com/users/snoop168/following{/other_user}","gists_url":"https://api.github.com/users/snoop168/gists{/gist_id}","starred_url":"https://api.github.com/users/snoop168/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snoop168/subscriptions","organizations_url":"https://api.github.com/users/snoop168/orgs","repos_url":"https://api.github.com/users/snoop168/repos","events_url":"https://api.github.com/users/snoop168/events{/privacy}","received_events_url":"https://api.github.com/users/snoop168/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-12T12:46:25Z","updated_at":"2018-08-12T12:46:25Z","closed_at":null,"author_association":"NONE","body":"Using the documentation sample code (images converted to strings for simplicity) I do this (try is wrapped in do/catch in my full code):\r\n\r\n            let document = PDFDocument(format: .usLetter)\r\n            let table = PDFTable()\r\n\r\n            try table.generateCells(data: [\r\n                [nil, \"Name\", \"Image\", \"Description\"],\r\n                [1, \"Waterfall\", \"test\", \"Water flowing down stones.\"],\r\n                [2, \"Forrest\", \"test\", \"Sunlight shining through the leafs.\"],\r\n                [3, \"Fireworks\", \"test\", \"Fireworks exploding into 100.000 stars\"],\r\n                [4, \"Fields\", \"test\", \"Crops growing big and providing food.\"],\r\n                [1, \"Waterfall\", \"test\", \"Water flowing down stones.\"],\r\n                [2, \"Forrest\", \"test\", \"Sunlight shining through the leafs.\"],\r\n                [3, \"Fireworks\", \"test\", \"Fireworks exploding into 100.000 stars\"],\r\n                [4, \"Fields\", \"test\", \"Crops growing big and providing food.\"],\r\n                [nil, nil, nil, \"Many beautiful places\"]\r\n                ],\r\n                alignments: [\r\n                    [.center, .left, .center, .right],\r\n                    [.center, .left, .center, .right],\r\n                    [.center, .left, .center, .right],\r\n                    [.center, .left, .center, .right],\r\n                    [.center, .left, .center, .right],\r\n                    [.center, .left, .center, .right],\r\n                    [.center, .left, .center, .right],\r\n                    [.center, .left, .center, .right],\r\n                    [.center, .left, .center, .right],\r\n                    [.center, .left, .center, .right],\r\n                    ])\r\n\r\n        document.addTable(table: table)\r\n        do {\r\n            let file = try  (PDFGenerator.generateURL(document: document, filename: \"example.pdf\"))\r\n        } catch { //*****ERROR BEING CAUGHT HERE*****\r\n            print(error)\r\n        }\r\n\r\nI am catching the following error:\r\ntableStructureInvalid(\"Data and alignment for row with index 0 does not have the same amount!\")\r\nThat seems to tell me that my first Row (Index 0) does not have a matching number of data and alignments. In the above case, Index 0 in both arrays has 4 elements. Am I doing something wrong?"}}
{"actor":{"display_login":"snoop168"}}