![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A very lightweight library that fill PDF forms using XFDF/FDF with pdftk
You could download pdftk at http://www.accesspdf.com/pdftk/
Nguyên is a fork of Jens Krämer's pdf-forms with addition of filling forms with XFDF feature.
fdf = Nguyen::Fdf.new(key: 'value', other_key: 'other value')
# use to_fdf if you just want the FDF data, without writing it to a file
puts fdf.to_fdf
# write fdf file
fdf.save_to('path/to/file.fdf')
xfdf = Nguyen::Xfdf.new(key: 'value', other_key: 'other value')
# use to_xfdf if you just want the XFDF data, without writing it to a file
puts xfdf.to_xfdf
# write xfdf file
xfdf.save_to('path/to/file.xfdf')
# adjust the pdftk path to suit your pdftk installation
pdftk = Nguyen::PdftkWrapper.new('/usr/local/bin/pdftk')
# find out the field names that are present in form.pdf
pdftk.get_field_names('path/to/form.pdf')
# take form.pdf, set the 'foo' field to 'bar' and save the document to myform.pdf
# with fdf
fdf = Nguyen::Fdf.new(foo: 'bar')
pdftk.fill_form('/path/to/form.pdf', 'myform.pdf', fdf)
# with xfdf
xfdf = Nguyen::Xfdf.new(foo: 'bar')
pdftk.fill_form('/path/to/form.pdf', 'myform.pdf', xfdf)
# will work with xfdf or fdf xml string directly as well
xfdf_string = <<XML
<?xml version="1.0" encoding="UTF-8"?>
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"><fields><field name="foo"><value>bar</value></field></fields></xfdf>
XML
# or xfdf_string = Nguyen::Xfdf.new(foo: 'bar').to_xfdf
pdftk.fill_form('/path/to/form', 'myform.pdf', xfdf_string)
gem install nguyen
git clone http://github.com/ruby-journal/nguyen.git
I greatly welcome contributions, please feel free to fork and submit pull request.
see LICENSE
FAQs
Unknown package
We found that nguyen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.