{"id":19535585,"url":"https://github.com/miyako/4d-component-print-settings","last_synced_at":"2026-03-03T11:42:14.032Z","repository":{"id":147172275,"uuid":"351079944","full_name":"miyako/4d-component-print-settings","owner":"miyako","description":"Windowsの印刷設定をダイレクトに制御","archived":false,"fork":false,"pushed_at":"2021-04-02T07:30:14.000Z","size":46,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T17:55:26.976Z","etag":null,"topics":["4d-component"],"latest_commit_sha":null,"homepage":"","language":"4D","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":"2021-03-24T12:56:50.000Z","updated_at":"2021-05-04T00:43:05.000Z","dependencies_parsed_at":"2023-09-14T01:17:50.331Z","dependency_job_id":null,"html_url":"https://github.com/miyako/4d-component-print-settings","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/miyako%2F4d-component-print-settings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-component-print-settings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-component-print-settings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-component-print-settings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miyako","download_url":"https://codeload.github.com/miyako/4d-component-print-settings/tar.gz/refs/heads/main","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:13.396Z","updated_at":"2026-03-03T11:42:09.012Z","avatar_url":"https://github.com/miyako.png","language":"4D","funding_links":[],"categories":[],"sub_categories":[],"readme":"![version](https://img.shields.io/badge/version-18%2B-EB8E5F)\n[![license](https://img.shields.io/github/license/miyako/4d-component-print-settings)](LICENSE)\n\n# 4d-component-print-settings\nWindowsの印刷設定をダイレクトに制御\n\n\n```4d\n/*\n\t\n\twindowsでプリンターをモノクロにするには\n\t\n*/\n\n$success:=print_settings (\"windows\").setPrintOption(\"dmColor\";DMCOLOR_MONOCHROME)\n\n$printSettings:=print_settings .generateSettings()\n\n$success:=(0\u003cBLOB to print settings($printSettings))\n```\n\n* [`DEVMODE`](https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-devmodew)と[`DEVNAMES`](https://docs.microsoft.com/en-us/windows/win32/api/commdlg/ns-commdlg-devnames)の読み書きができます。\n\n* `wingdi.h`の[定数](https://github.com/miyako/4d-component-print-settings/blob/main/print_settings/Resources/constants.xlf)がそのまま使用できます。\n\n### Examples\n\ncreate a standard print settings object for windows\n\n```4d\nprint_settings (\"windows\")\n```\n\n`print_settings` is a shared component method that creates a shared singleton object in `Storage`.\n\nload a print settings BLOB \n\n```4d\n$printSettings:=Folder(fk resources folder).file(\"windows.printSettings\").getContent()\nprint_settings ($printSettings)\n```\n\naccess attributes of the `DEVNAMES` or `DEVMODE` object\n\n```4d\n$printSettings:=print_settings .getSettings()\n```\n\nthe returned object is a shared object representation of `DEVNAMES` or `DEVMODE`. you can read or write any attribute.\n\nalternatively, you can use the `setPrintOption()` utility method (see above).\n\ncreate a binary print settings BLOB\n\n```4d\n$printSettings:=print_settings .generateSettings()\n```\n\nyou can pass this to ``BLOB to print settings``\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-component-print-settings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiyako%2F4d-component-print-settings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-component-print-settings/lists"}