{"id":19535587,"url":"https://github.com/miyako/4d-component-wkhtmltopdf","last_synced_at":"2026-03-19T10:20:57.129Z","repository":{"id":147172276,"uuid":"155137469","full_name":"miyako/4d-component-wkhtmltopdf","owner":"miyako","description":"4D wrapper for wkhtmltopdf","archived":false,"fork":false,"pushed_at":"2022-09-14T03:50:42.000Z","size":56904,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-08T17:55:18.186Z","etag":null,"topics":["4d-component"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/miyako.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":"2018-10-29T02:03:43.000Z","updated_at":"2023-10-04T20:26:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"89473db4-8c24-447a-913f-d47e675a251b","html_url":"https://github.com/miyako/4d-component-wkhtmltopdf","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-component-wkhtmltopdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-component-wkhtmltopdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-component-wkhtmltopdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-component-wkhtmltopdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miyako","download_url":"https://codeload.github.com/miyako/4d-component-wkhtmltopdf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240788773,"owners_count":19857699,"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":["4d-component"],"created_at":"2024-11-11T02:19:14.043Z","updated_at":"2026-03-04T13:02:18.406Z","avatar_url":"https://github.com/miyako.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"![platform](https://img.shields.io/static/v1?label=platform\u0026message=mac-intel%20|%20win-64\u0026color=blue)\n![version](https://img.shields.io/badge/version-18%2B-EB8E5F)\n[![license](https://img.shields.io/github/license/miyako/4d-component-wkhtmltopdf)](LICENSE)\n![downloads](https://img.shields.io/github/downloads/miyako/4d-component-wkhtmltopdf/total)\n\n# 4d-component-wkhtmltopdf\n4D wrapper for wkhtmltopdf\n\n### Discussion\n\nIt is very hard to use ``libwkhtmltopdf`` as a plugin-style module for 4D. The menu bar is corrupted, the event loop is disrupted...just not worth it. Much easier to run the CLI with ``LAUNCH EXTERNAL PROCESS``. Thankfully the command is now thread safe. \n\n#### About Apple Silicon\n\nsee https://wkhtmltopdf.org/status\n\nthere is no native support (needs Rosetta 2)\n\n#### About Notarisation\n\nIf ``wkhtmltopdf`` is notarised without entitlements,\n\ni.e.\n\n```sh\ncodesign \n\t--verbose \n\t--deep \n\t--timestamp\n\t--force \n\t--sign \"Developer ID Application: keisuke miyako (Y69CWUC25B)\" \n\t--options=runtime \n```\n\nit will not work anymore.\n\n```\nLoading pages (1/6)\nBus error: 10                                                ] 10%\n```\n\nIt must be codesigned and notarised with sufficient entitlements.\n\n### Usage\n\nPass the [standard arguments](https://wkhtmltopdf.org/usage/wkhtmltopdf.txt) in camelcase.\n\n```\n$path:=Get 4D folder(Current resources folder)+\"test.html\"\n\n$html:=Document to text($path;\"utf-8\")\n\nC_OBJECT($options)\n$options:=New object\n$options.grayscale:=True\n$options.dpi:=72\n$options.logLevel:=\"none\"\n$options.externalLinks:=False\n$options.collate:=False\n$options.copies:=1\n$options.imageDpi:=300\n$options.imageQuality:=100\n$options.lowquality:=True\n$options.orientation:=\"Landscape\"  //Portrait\n$options.marginBottom:=\"0mm\"\n$options.marginLeft:=\"0mm\"\n$options.marginRight:=\"0mm\"\n$options.marginTop:=\"0mm\"\n  //$options.pageHeight:=\"30cm\"\n  //$options.pageWidth:=\"30cm\"\n$options.pageSize:=\"A4\"\n$options.title:=\"TEST\"\n$options.pdfCompression:=False\n\n$options.outline:=True\n$options.outlineDepth:=8\n\n$options.background:=True\n$options.loadErrorHandling:=\"skip\"  //abort,ignore\n$options.loadMediaErrorHandling:=\"skip\"  //abort,ignore\n$options.localFileAccess:=True\n  //$options.minimumFontSize:=20\n\n$options.zoom:=2\n\n  //repeatable properties not implemented;\n  //allow,bypassProxyFor,cookie*,customHeader,post,postFile,runScript,replace\n\n$pdf:=wkhtmltopdf ($options;$html;\"utf-8\")\n\n  //$pdf is empty in case of conversion failure\n  //$options.errors[] may contain error information (may not be failure)\n  //$options.value contains the command line string\n\nIf (BLOB size($pdf)#0)\n\t\n\t$path:=System folder(Desktop)+Generate UUID+\".pdf\"\n\t\n\tBLOB TO DOCUMENT($path;$pdf)\n\tOPEN URL($path)\n\t\nEnd if \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-component-wkhtmltopdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiyako%2F4d-component-wkhtmltopdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-component-wkhtmltopdf/lists"}