{"id":15504063,"url":"https://github.com/hamajyotan/librepdf","last_synced_at":"2025-04-23T18:21:06.022Z","repository":{"id":2905754,"uuid":"3914311","full_name":"hamajyotan/librepdf","owner":"hamajyotan","description":"This software changes a document into PDF by Libreoffice assistance under JRuby.","archived":false,"fork":false,"pushed_at":"2012-04-03T08:58:10.000Z","size":1692,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T02:16:12.671Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","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/hamajyotan.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-03T03:28:29.000Z","updated_at":"2017-01-05T23:38:35.000Z","dependencies_parsed_at":"2022-08-20T22:31:22.608Z","dependency_job_id":null,"html_url":"https://github.com/hamajyotan/librepdf","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamajyotan%2Flibrepdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamajyotan%2Flibrepdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamajyotan%2Flibrepdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamajyotan%2Flibrepdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamajyotan","download_url":"https://codeload.github.com/hamajyotan/librepdf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250487643,"owners_count":21438629,"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":[],"created_at":"2024-10-02T09:15:40.029Z","updated_at":"2025-04-23T18:21:06.003Z","avatar_url":"https://github.com/hamajyotan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Librepdf\n\nThis software changes a document into PDF by Libreoffice assistance under JRuby.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'librepdf'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install librepdf\n\n## Set before use\n\n### Start libreoffice as a service without GUI.\n\n    $ /opt/libreoffice3.5/program/soffice.bin \\\n        --accept=\"socket,host=127.0.0.1,port=8100,tcpNoDelay=1;urp;\" \\\n        --headless \\\n        --invisible \\\n        --nodefault \\\n        --nofirststartwizard \\\n        --nolockcheck \\\n        --nologo \\\n        --norestore \\\n        \u0026\n\n### When multiinstance, required change user profile location.\n\n    $ /opt/libreoffice3.5/program/soffice.bin \\\n        --accept=\"socket,host=127.0.0.1,port=8100,tcpNoDelay=1;urp;\" \\\n        --headless \\\n        --invisible \\\n        --nodefault \\\n        --nofirststartwizard \\\n        --nolockcheck \\\n        --nologo \\\n        --norestore \\\n        -env:UserInstallation=file:///home/foo/.libreoffice/3 \\\n        \u0026\n\n## Usage\n\n### Simple example\n\n    require 'librepdf'\n   \n    con = Librepdf::Connection.new 'host' =\u003e '127.0.0.1', 'port' =\u003e 8100\n    doc = con.load 'file:///foo/bar/baz.doc'\n    doc.convert_pdf 'file:///foo/bar/baz.pdf'\n    doc.close\n    con.close\n\n### Safety usage\n\n    require 'librepdf'\n   \n    Librepdf::Connection.new('host' =\u003e '127.0.0.1', 'port' =\u003e 8100) { |con|\n      con.load('file:///foo/bar/baz.doc') { |doc|\n        doc.convert_pdf 'file:///foo/bar/baz.pdf'\n      }\n    }\n\n### Password file\n\n    require 'librepdf'\n   \n    Librepdf::Connection.new('host' =\u003e '127.0.0.1', 'port' =\u003e 8100) { |con|\n      con.load('file:///foo/bar/baz.doc', 'Password' =\u003e '@SecretP@ssW0rd') { |doc|\n        doc.convert_pdf 'file:///foo/bar/baz.pdf'\n      }\n    }\n\n### Pickup page\n\n    require 'librepdf'\n   \n    Librepdf::Connection.new('host' =\u003e '127.0.0.1', 'port' =\u003e 8100) { |con|\n      con.load('file:///foo/bar/baz.doc') { |doc|\n        doc.convert_pdf 'file:///foo/bar/baz1.pdf', 'FilterData' =\u003e { 'PageRange' =\u003e '1-1' }\n        doc.convert_pdf 'file:///foo/bar/baz2.pdf', 'FilterData' =\u003e { 'PageRange' =\u003e '2-2' }\n        doc.convert_pdf 'file:///foo/bar/baz3.pdf', 'FilterData' =\u003e { 'PageRange' =\u003e '3-3' }\n      }\n    }\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Added some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamajyotan%2Flibrepdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamajyotan%2Flibrepdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamajyotan%2Flibrepdf/lists"}