{"id":23740204,"url":"https://github.com/mustaddon/arraytopdf","last_synced_at":"2025-09-04T15:32:04.163Z","repository":{"id":65358906,"uuid":"238716394","full_name":"mustaddon/ArrayToPdf","owner":"mustaddon","description":"Create PDF from Array (List, DataTable, ...)","archived":false,"fork":false,"pushed_at":"2024-06-19T04:41:38.000Z","size":1212,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T08:07:27.588Z","etag":null,"topics":["array","converter","dataset","datatable","dictionary","dotnet","list","pdf"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mustaddon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-06T15:10:37.000Z","updated_at":"2024-10-26T01:03:24.000Z","dependencies_parsed_at":"2024-02-05T14:04:14.848Z","dependency_job_id":null,"html_url":"https://github.com/mustaddon/ArrayToPdf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mustaddon%2FArrayToPdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mustaddon%2FArrayToPdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mustaddon%2FArrayToPdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mustaddon%2FArrayToPdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mustaddon","download_url":"https://codeload.github.com/mustaddon/ArrayToPdf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231970943,"owners_count":18453930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["array","converter","dataset","datatable","dictionary","dotnet","list","pdf"],"created_at":"2024-12-31T09:47:27.178Z","updated_at":"2024-12-31T09:47:27.882Z","avatar_url":"https://github.com/mustaddon.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArrayToPdf [![NuGet version](https://badge.fury.io/nu/ArrayToPdf.svg?23)](http://badge.fury.io/nu/ArrayToPdf)\nCreate PDF from Array (List, DataTable, ...)\n\n### Example 1: Create with default settings\n```C#\nusing ArrayToPdf;\n\nvar items = Enumerable.Range(1, 100).Select(x =\u003e new\n{\n    Prop1 = $\"Text #{x}\",\n    Prop2 = x * 1000,\n    Prop3 = DateTime.Now.AddDays(-x),\n});\n\nvar pdf = items.ToPdf();\n```\nResult: \n[example1.pdf](https://github.com/mustaddon/ArrayToPdf/raw/master/Examples/example1.pdf)\n\n\n### Example 2: Rename title and columns\n```C#\nvar pdf = items.ToPdf(schema =\u003e schema\n    .Title(\"Example name\")\n    .ColumnName(m =\u003e m.Name.Replace(\"Prop\", \"Column #\")));\n```\nResult: \n[example2.pdf](https://github.com/mustaddon/ArrayToPdf/raw/master/Examples/example2.pdf)\n\n\n### Example 3: Sort columns\n```C#\nvar pdf = items.ToPdf(schema =\u003e schema\n    .ColumnSort(m =\u003e m.Name, desc: true));\n```\nResult: \n[example3.pdf](https://github.com/mustaddon/ArrayToPdf/raw/master/Examples/example3.pdf)\n\n\n### Example 4: Custom column's mapping\n```C#\nvar pdf = items.ToPdf(schema =\u003e schema\n    .PageOrientation(PdfOrientations.Portrait)\n    .PageMarginLeft(15)\n    .AddColumn(\"MyColumnName #1\", x =\u003e x.Prop1, 30)\n    .AddColumn(\"MyColumnName #2\", x =\u003e $\"test:{x.Prop2}\")\n    .AddColumn(\"MyColumnName #3\", x =\u003e x.Prop3));\n```\nResult: \n[example4.pdf](https://github.com/mustaddon/ArrayToPdf/raw/master/Examples/example4.pdf)\n\n\n### Example 5: Filter columns\n```C#\nvar pdf = items.ToPdf(schema =\u003e schema\n    .ColumnFilter(m =\u003e m.Name != \"Prop2\"));\n```\nResult: \n[example5.pdf](https://github.com/mustaddon/ArrayToPdf/raw/master/Examples/example5.pdf)\n\n\n### Example 6: Create from DataTable\n```C#\nvar table = new DataTable(\"Example Table\");\n\ntable.Columns.Add(\"Column #1\", typeof(string));\ntable.Columns.Add(\"Column #2\", typeof(int));\ntable.Columns.Add(\"Column #3\", typeof(DateTime));\n\nfor (var x = 1; x \u003c= 100; x++)\n    table.Rows.Add($\"Text #{x}\", x * 1000, DateTime.Now.AddDays(-x));\n\nvar pdf = table.ToPdf();\n```\nResult: \n[example6.pdf](https://github.com/mustaddon/ArrayToPdf/raw/master/Examples/example6.pdf)\n\n\n[Example.ConsoleApp](https://github.com/mustaddon/ArrayToPdf/tree/master/Examples/Example.ConsoleApp/Program.cs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmustaddon%2Farraytopdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmustaddon%2Farraytopdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmustaddon%2Farraytopdf/lists"}