{"id":19535921,"url":"https://github.com/miyako/4d-plugin-poppler","last_synced_at":"2026-05-15T10:40:04.879Z","repository":{"id":147172421,"uuid":"354239509","full_name":"miyako/4d-plugin-poppler","owner":"miyako","description":"Extract text from PDF, convert PDF to SVG.","archived":false,"fork":false,"pushed_at":"2023-03-30T15:32:25.000Z","size":369012,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-08T17:57:04.590Z","etag":null,"topics":["4d-plugin","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/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-04-03T08:30:22.000Z","updated_at":"2024-08-27T05:05:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"cb1ecbc8-35e4-4fd5-9905-51a9ca6a0473","html_url":"https://github.com/miyako/4d-plugin-poppler","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-plugin-poppler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-poppler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-poppler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-poppler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miyako","download_url":"https://codeload.github.com/miyako/4d-plugin-poppler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240788802,"owners_count":19857706,"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-plugin","pdf"],"created_at":"2024-11-11T02:20:20.073Z","updated_at":"2026-05-15T10:40:04.873Z","avatar_url":"https://github.com/miyako.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"![version](https://img.shields.io/badge/version-17%2B-3E8B93)\n![platform](https://img.shields.io/static/v1?label=platform\u0026message=mac-intel%20|%20mac-arm%20|%20win-64\u0026color=blue)\n[![license](https://img.shields.io/github/license/miyako/4d-plugin-poppler)](LICENSE)\n![downloads](https://img.shields.io/github/downloads/miyako/4d-plugin-poppler/total)\n\n### Dependencies and Licensing\n\n* the source code of this plugin developed using the [4D Plug-in SDK](https://github.com/4d/4D-Plugin-SDK) is licensed under the MIT license\n* see [Poppler](https://poppler.freedesktop.org) for the licensing of **Poppler** (shared library).\n* the licensing of the binary product of this plugin is subject to the licensing of all its dependencies.\n\n# 4d-plugin-poppler\nExtract text from PDF, convert PDF to SVG.\n\nsee also [4d-plugin-xpdf](https://github.com/miyako/4d-plugin-xpdf)\n\n### Syntax\n\n```4d\nerror:=PDF Convert (pdf;svg;from;to;password;method)\n```\n\nParameter|Type|Description\n------------|------|----\npdf|BLOB|The PDF document BLOB\nsvg|ARRAY PICTURE (or ARRAY TEXT or ARRAY BLOB)|Array to receive the pages (must be defined); See remarks below\nfrom|LONGINT|Starting page (1 based) [optional]\nto|LONGINT|Ending page (1 based) [optional]\npassword|TEXT|Password [optional]\nmethod|TEXT|Callback method [optional]\nerror|LONGINT|Error code\n\n```4d\nerror:=PDF Get text (pdf;svg;from;to;password;method)\n```\n\nParameter|Type|Description\n------------|------|----\npdf|BLOB|The PDF document BLOB\nsvg|ARRAY TEXT|Array to receive the pages \nfrom|LONGINT|Starting page (1 based) [optional]\nto|LONGINT|Ending page (1 based) [optional]\npassword|TEXT|Password [optional]\nmethod|TEXT|Callback method [optional]\nerror|LONGINT|Error code\n\n```4d\n page count (pdf;password)\n```\n\nParameter|Type|Description\n------------|------|----\npdf|BLOB|The PDF document BLOB\npassword|TEXT|Password [optional]\ncount|LONGINT|Page count\n\n### Examples\n\n```4d\n$path:=Get 4D folder(Current resources folder)+\"sample.pdf\"\nDOCUMENT TO BLOB($path;$PDF)\n\nARRAY PICTURE($pages;0)\n$startPage:=0\n$endPage:=0\n$password:=\"\"\n$callback:=\"PDF2SVG_CB_PICTURE\"\n\n\u003c\u003ep:=Progress New \nProgress SET PROGRESS (\u003c\u003eP;0)\nProgress SET BUTTON ENABLED (\u003c\u003eP;True)\n\n$error:=PDF Convert ($PDF;$pages;$startPage;$endPage;$password;$callback)\n\nProgress QUIT (\u003c\u003eP)\n```\n\n```4d\n$path:=Get 4D folder(Current resources folder)+\"sample.pdf\"\nDOCUMENT TO BLOB($path;$PDF)\n\nARRAY TEXT($pages;0)\n$startPage:=0\n$endPage:=0\n$password:=\"\"\n$callback:=\"PDF2TEXT_CB\"\n\n\u003c\u003ep:=Progress New \nProgress SET PROGRESS (\u003c\u003eP;0)\nProgress SET BUTTON ENABLED (\u003c\u003eP;True)\n\n$error:=PDF Get text ($PDF;$pages;$startPage;$endPage;$password;$callback)\n\nProgress QUIT (\u003c\u003eP)\n```\n\n### Callback\n\nThe method is executed in the same process as the calling method.\n\nParameters:\n\n```4d\nC_LONGINT($1;$pos)//1-based\nC_LONGINT($2;$total)\nC_LONGINT($3;$pageNumber)//1-based\nC_PICTURE($4;$page)\nC_BOOLEAN($0;$stop)\n```\n\nTo display a progress bar:\n\n```4d\nProgress SET PROGRESS (\u003c\u003eP;$pos/$total)\n```\n\nTo abort:\n\n```4d\n$0:=Progress Stopped (\u003c\u003eP)\n```\n\n### Error codes\n\n```c\n#define PDF2SVG_ERROR_InvalidSourceData (-1)\n#define PDF2SVG_ERROR_InvalidReturnType (-2)\n#define PDF2SVG_ERROR_AbortedByUser (-3)\n```\n\n### Alternate syntax\n\nAlternatively, you may pass ```ARRAY TEXT``` or ```ARRAY BLOB``` in $2. However, $4 in the callback function will not be used. The current page data will only be passed to the callback method when ```ARRAY PICTURE``` is used. It's main purpose is to  display a preview image. Note that the image is a ref-counted duplicate of the final array element. \n\n### Build notes\n\niconv by cmake may be missing the symbol `libiconv_set_relocation_prefix`\n\nadd a stub function\n\n```c\nextern LIBICONV_DLL_EXPORTED void libiconv_set_relocation_prefix (const char *orig_prefix,\n                                                                  const char *curr_prefix){do {} while(0);}\n```\n\nzlib by cmake may be missing the symbol `_inflateValidate`\n\nnormal `make` instead\n\n---\n\n![](https://github.com/miyako/4d-plugin-PDF2SVG/blob/master/images/screenshot.png)\n\n![](https://github.com/miyako/4d-plugin-PDF2SVG/blob/master/images/screenshot-w.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-plugin-poppler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiyako%2F4d-plugin-poppler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-plugin-poppler/lists"}