Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can we sign pdfs? Fill out pdf forms?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2562

PostPosted: Tue Sep 13, 2016 10:31 pm    Post subject: Can we sign pdfs? Fill out pdf forms? Reply with quote

Hi,

I need to sign pdfs, and sometimes fill out pdf forms which also need to be signed. At the moment I get them, print them, sign them and scan them back in to return to the sender. I'd like to simplify that.

I know that on Windows and Mac OS your adobe software can sign the pdf, but I don't even know how that works exactly.

It would be really neat if there were an app which could handle all that.

Oh yeah, another thing. Some forms (all?) when you fill them out and print them have a bar of machine-readable gobbledygook on the page which lets the recipient of a printed pdf scan the data back in with 100% accuracy. That would be neat too.

Thanks.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Sep 14, 2016 10:42 am    Post subject: Reply with quote

AFAIK on windows a very expensive software by adobe can do that. When you have such a license you may use wine to use that software in gentoo. You may set up a virtualbox with windows in a box with that software too.

Last time i checked for pdf reader editior featuers, 1-2 years ago, the features were very limited regarding open source software.

Quote:
gobbledygook


A 2-d or 3d barecode?

personal opinion: Adobe has propiertary exention and therfore only adobe software can do it, i doubt its an open standard, i assume its an adobe properitary extension and becuase guys use windows with adobe they think its mechanics are available. Also the reason why microsoft office documents will never open properly anywhere else except microsoft products for the same reason. The functionality would be long time implemented by different open source software pieces when it has been an open standard those features
Back to top
View user's profile Send private message
soka
Tux's lil' helper
Tux's lil' helper


Joined: 27 Dec 2006
Posts: 92
Location: Argentina

PostPosted: Wed Sep 14, 2016 11:09 am    Post subject: Reply with quote

You can use app-text/xournal to edit the pdf file and add a scanned image of your sign.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2562

PostPosted: Wed Sep 14, 2016 2:10 pm    Post subject: Reply with quote

@Roman_Gruber,

Adobe reader for Windows (the free-to-use product) does what I'm talking about.

My wife's Windows 10 computer has all the features I'm talking about, using the free software. So as far as "very expensive licenses" no, nothing like that is needed.

The part about it being proprietary software, that I can believe.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1773
Location: United Kingdom

PostPosted: Wed Sep 14, 2016 2:36 pm    Post subject: Reply with quote

The way I do it is to open the PDF file in LibreOffice Writer (which, in turn, opens LibreOffice Draw), insert a PNG image of my signature with a transparent background (which I created previously using GIMP on a scanned image of my signature), drag the signature to the desired position on the page and resize it as desired, then save the file using 'File' > 'Export as PDF...'. I can also enter text in fields if the PDF file has editable fields.
_________________
Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2562

PostPosted: Wed Sep 14, 2016 3:07 pm    Post subject: Reply with quote

@Fitzcarraldo,

That sounds like a really good idea. I'll give it a try. It should solve everything except the 2d/3d bar code part, which I expect won't get fixed.

While I strongly support the idea of both free and proprietary software, it's times like this I regret closed standards.

I use Linux for work, and unfortunately I need to deal with this one thing that requires "office" software. Nothing else I do professionally has anything to do with that.

There are sometimes documents like contracts which may require the use of Adobe. I'll see what this idea gives me, but I'm afraid I'll have to use Windows-based software for some of it.

Thanks.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2562

PostPosted: Wed Sep 14, 2016 3:10 pm    Post subject: Reply with quote

The really frustrating part of this is that I have 3 Windows VMs. The license for them is for testing purposes only, so I can't use them commercially without changing the license.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1773
Location: United Kingdom

PostPosted: Wed Sep 14, 2016 3:34 pm    Post subject: Reply with quote

1clue wrote:
It should solve everything except the 2d/3d bar code part, which I expect won't get fixed.

Although I have to enter information and my signature on PDF forms from time to time for work purposes, and I use the method described in my previous post, I have not come across the bar code functionality before. What exactly does the bar code contain? Does it contain just the text you entered in the fields, with each field separated by a Carriage Return and Line Feed? There are several open-source applications to generate 1D and 2D bar codes (my favourite for QR Codes is Portable QR-Code Generator -- see my blog post More tools for creating QR Codes in Linux for details) but there are also several Web sites that can be used to generate 1D and 2D bar codes, for example:

https://www.barcodesinc.com/generator/index.php

http://www.i-nigma.com/CreateBarcodes.html

http://generator.onbarcode.com/online-pdf417-barcode-generator.aspx

If you just need to encode the contents of the fields that you have entered on the form, it would be relatively straightforward to enter the contents in a bar code generation application (or one of the aforementioned Web sites) to produce a PNG or JPG file with the bar code that you could then add to the PDF file using LibreOffice in the same way as I described for the signature.
_________________
Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2562

PostPosted: Wed Sep 14, 2016 4:00 pm    Post subject: Reply with quote

I don't know how to read the bar codes or how they're encoded.

One example I can think of is on many government forms, the bar code shows up on Windows when you print the document. I imagine it's the entire page of the form represented somehow, including fields and values.

I don't know how it's encoded, or how touchy it is. I know that:


  1. On some forms I can fill out everything but I don't get the bar code that shows up on Windows when printed.
  2. On some forms I can fill out most of it but some fields can't be changed that can be changed on Windows.
  3. Calculated values in the forms usually fail.
  4. Sometimes the form has built-in validation which will fail.
  5. I don't know if other validation passes.
  6. Some forms, like contracts, will probably require commercial software to sign, as they have features to ensure the data has not been modified.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1773
Location: United Kingdom

PostPosted: Wed Sep 14, 2016 4:16 pm    Post subject: Reply with quote

Interesting. I've just been doing some googling and found the following:

https://helpx.adobe.com/acrobat/using/pdf-barcode-form-fields.html

https://acrobatusers.com/assets/collections/tutorials/legacy/id_1781/2d_barcodes.pdf

It appears that the 2D bar code symbology can be PDF417, QR Code, or Data Matrix, as the user chooses, and the data can be encoded as XML or Tab Delimited, again as the user chooses.

If one chooses to encode the data as XML and the form has the fields e.g. Name, Department and Extension then the text encoded in the barcode would be something like the following:

Code:
<form1>
<Name>Fitzcarraldo</Name>
<Department>IT</Department>
<Extension>18754</Extension>
</form1>


EDIT: The following video by Adobe is of interest too:

http://tv.adobe.com/watch/working-with-adobe-livecycle-es2/capture-electronic-data-from-printed-forms/
_________________
Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
mrbassie
Guru
Guru


Joined: 31 May 2013
Posts: 561

PostPosted: Wed Sep 14, 2016 5:39 pm    Post subject: Re: Can we sign pdfs? Fill out pdf forms? Reply with quote

1clue wrote:
Hi,

At the moment I get them, print them, sign them and scan them back in to return to the sender. I'd like to simplify that.


I think you can do that with kde-apps/okular.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1770

PostPosted: Wed Sep 14, 2016 6:28 pm    Post subject: Reply with quote

Quote:
At the moment I get them, print them, sign them and scan them back in to return to the sender. I'd like to simplify that.
Sign them with a crypto key instead.
When I had to sign some papers I received via email, I opened them with gimp (surprisingly, it loaded those documents as images - I didn't think it was capable of that) which allowed me to draw my signature.
Unfortunately openoffice attempts to be smart and "fixes" my signature to the point it doesn't look like handwriting anymore... or any writing at all actually.
Fortunately it was only once in a few years, so whatever, there are more important matters :)

Still.. yes, support for interactive forms is not very good. Pdf works much better for portable books.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2562

PostPosted: Wed Sep 14, 2016 8:41 pm    Post subject: Reply with quote

A crypto key will not work for most of my documents. This is WAY beyond the technical ability of the usual recipients to deal with.

The documents I have to sign most regularly are going to the local office of a state government agency, and in the end it's going to be printed and stuck in a filing cabinet so the visible signature is necessary anyway. Not only do they not understand this sort of thing they literally can't allow any extra software to be installed on their computers, by decree from the bureaucracy.

I tried long and hard to get my coworkers, who are programmers, to do cryptographically signed emails and they looked at me like I was an alien. I'm positive that they understand what cryptography is, but don't see how it applies to their lives.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Thu Sep 15, 2016 7:15 am    Post subject: Reply with quote

There are some barcode readers for smartphones. Have you considered tinkering with those?

There are different standards last time I worked with barcodes. I programmed a handheld one barcode scanner to only accept one type of barcode.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1773
Location: United Kingdom

PostPosted: Thu Sep 15, 2016 2:18 pm    Post subject: Reply with quote

1clue,

Out of curiosity I used a barcode reader to read from my computer monitor the 2D barcode generated by the person in the Adobe video I referenced in my previous post. That barcode contains the following text (the presenter chose XML via the GUI of Adobe LiveCycle Designer when he was creating the form):

Code:
<?xml version="1.0" encoding="UTF-8"?><form1><DropDownList1/><TextField1>Hello</TextField1><TextField2>fjhkdlsfhjksdhjashd</TextField2><DateTimeField1>2010-03-24</DateTimeField1><RadioButtonList>1</RadioButtonList></form1>


That corresponds to the demo PDF form in the video, which contains the following fields (the field labels on the form are shown here in bold): Drop-down List (with no entries), Date/Time Field (with a date entered), Text Field (with "Hello" entered), Radio Button (a single radio button, which has been clicked), Text Field (with "fjhkdlsfhjksdhjashd" entered).

I notice that the Adobe LiveCycle Designer GUI allows you to select either Delimited or XML for the data format to be encoded. If you select Delimited you can specify which of the following delimiters you wish the barcode to contain: Tab; Pipe; Comma; Space; Carriage Return. I also notice that you can specify that the bar code should apply to 'Collection Data' or 'Entire Form Data' (he selected 'Entire Form Data').

So each organisation issuing a PDF form can decide on the data format, scope and symbology it wishes to use for the barcode on its form, so you would need to know what those are for that specific PDF form in order to produce a barcode from scratch in Linux and insert it into the PDF form opened in e.g. LibreOffice Writer/Draw. As a hypothetical example, PDF forms issued by company FOO could have been designed to use XML for 'Collection Data' only and encoded using PDF417 symbology, whereas PDF forms issued by company BAR could have been designed to use comma-delimited text for 'Entire Form Data' and encoded using QR Code symbology. Whilst it seems that, if you know the specification used by the form issuer, it would be possible to generate manually the necessary barcode and add it to the form in Linux, if you have to do this more than once it would be fiddly and time-consuming, i.e. impractical. It looks to me like your only practical solution would be to use a Windows application that can open PDF files containing forms which generate barcodes automatically from the entered field data. Nothing in Linux that I know of can do it. Various Linux applications can handle PDF forms with fields, but they can't handle PDF forms which include barcodes encoded automatically from the field data you enter. Looks like you or your company are going to have to buy a commercial licence for Adobe Acrobat DC, or whatever it's called these days.
_________________
Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1773
Location: United Kingdom

PostPosted: Fri Sep 16, 2016 11:03 pm    Post subject: Reply with quote

1clue,

If you're prepared to use WINE, hopefully I have some good news for you. I have found a Windows application that works under WINE and, unlike Adobe Acrobat Reader DC, can be used free of charge in your office without needing to buy a commercial licence.

First I found PDF-XChange Viewer:

Quote:
The FREE PDF viewer download of the PDF-XChange Viewer may be used without limitation for Private, Commercial, Government and all uses, provided it is not -: incorporated or distributed for profit/commercial gain with other software or media distribution of any type - without first gaining permission.

Although it is still available and I installed it under WINE and used it successfully with PDF forms which include automatically-updating barcodes (such as sample_barcoded_demo.pdf) I had downloaded from the Web, the PDF-XChange Viewer Web page states:

Quote:
The PDF-XChange Viewer has been discontinued and replaced by the PDF-XChange Editor which is now available including all the features of the Viewer and much, much more. . .

So I installed the newer PDF-XChange Editor under WINE, and it has more features than PDF-XChange Viewer and also works with a PDF form which includes automatically-updating barcodes. The Web page for PDF-XChange Editor states:

Quote:
The FREE download of the PDF-XChange Editor may be used without limitation for Private, Commercial, Government and all uses, provided it is not: incorporated or distributed for profit/commercial gain with other software or media distribution of any type - without first gaining permission.

So you should be able to use it.

Here is how I installed PDF-XChange Editor in WINE after I downloaded the file PDFXVE6.zip from the link given above:

Code:
$ export WINEPREFIX=$HOME/.wine-pdfxve6
$ export WINEARCH="win32"
$ winecfg # Select Windows 10.
$ cd .wine-pdfxve6/drive_c/
$ # Copy downloaded installer to C: drive:
$ cp ~/Downloads/PDFXVE6.zip .
$ unzip PDFXVE6.zip
$ # Install PDF-XChange Editor:
$ wine PDFXVE6.exe

- Click 'Install'.
- Click 'Next'.
- Select 'I accept the terms in the License Agreement' and click 'Next'.
- Click 'Custom'.
- Click 'Browsers Plugins' and select 'Don't install'. Click 'Next'.
- Leave 'Create a Start Menu folder' ticked. Untick 'Create Desktop Icons'. Untick 'Set PDF-XChange Editor as default application for PDF files'. Untick 'Set Printer "PDF-XChange Lite V6" As Default'. Click 'Next'.
- Select 'Free Version' and click 'Next'.
- Click 'Install'.
- Untick 'Launch PDF-XChange Editor' and click 'Finish'.
- Click 'Close'.

KDE Plasma 5 then has an icon for PDF-XChange Editor in Plasma's Application Launcher under 'Applications' > 'Wine' > 'Programs' > 'Tracker Software'. Or, if I wanted to launch PDF-XChange Editor from the command line, I would need to enter the following command:

Code:
$ WINEPREFIX="$HOME/.wine-pdfxve6" && WINEARCH="win32" && wine $WINEPREFIX/drive_c/Program\ Files/Tracker\ Software/PDF\ Editor/PDFXEdit.exe


By the way, I have tried PDF-XChange Viewer and PDF-XChange Editor under both Linux/WINE and in native Windows 10. I also have Adobe Acrobat Reader DC installed in Windows 10. When I use the PDF-XChange applications to open the PDF forms I had downloaded from the Web, the barcodes change when I enter text in the forms' fields. However, when I open the same forms in Adobe Acrobat Reader DC the barcodes are not even displayed, let alone changed when I enter text in the forms' fields.


EDIT (2016-09-21): I have now blogged about fillable PDF forms, adding signatures, and update-able bar codes. My post includes screenshots to compare the performance of various PDF viewers: Completing PDF forms and adding your signature without having to print the form.
_________________
Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.

Fitzcarraldo's blog


Last edited by Fitzcarraldo on Wed Sep 21, 2016 11:18 am; edited 1 time in total
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Sat Sep 17, 2016 7:24 am    Post subject: Reply with quote

Interesting question, current version of evince is said to be okay with filling out pdf forms.
The part about signing a pdf is to be implemented. Already in poppler, there are patches for evince, but poppler-glib needs fixing first.

https://bugzilla.gnome.org/show_bug.cgi?id=614929#c35
_________________
boost|select libs to build|slotable|python-buildid

hear hear
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Sun Jan 15, 2017 8:27 am    Post subject: Reply with quote

Hokay, poppler just verifies PDF signatures. Though, LibreOffice 5.3 or newer will be able to actually sign a PDF.
I wonder if signing PDF forms (or single form fields) is supported.

LibreOffice developer blog post:
http://vmiklos.hu/blog/pdf-sign.html
_________________
boost|select libs to build|slotable|python-buildid

hear hear
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2721

PostPosted: Tue Jan 31, 2017 9:45 am    Post subject: Reply with quote

https://bugs.ghostscript.com/show_bug.cgi?id=697469 and https://bugs.ghostscript.com/show_bug.cgi?id=697334sound like even mupdf were providing forms filling and signing.
However it seems Gentoo ebuilds have it not enabled :-(
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1715

PostPosted: Tue Jan 31, 2017 6:12 pm    Post subject: Reply with quote

If you think think it may be an case that one of the ebuilds is missing a configuration and/or USE flag, may want to see what the config switch is and test to see if it causes any issues/fixes the problem. If it works, throw a bug report to have the ebuild updated with the new USE flag/configuration enabled. The second patch indicates there may be a patch out from Debian that possibly helps resolve this issue? May want to look into that, see if we need that patch or not.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2721

PostPosted: Wed Feb 01, 2017 6:52 am    Post subject: Reply with quote

ct85711 wrote:
... The second patch indicates there may be a patch out from Debian that possibly helps resolve this issue? May want to look into that, see if we need that patch or not.

That patch seems to be done already:
https://bugs.ghostscript.com/show_bug.cgi?id=697334#c5 wrote:
This issue is solved in mupdf-1.10-rc2
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Sat Jun 24, 2017 5:45 am    Post subject: Reply with quote

JFYI, there are two bugreports to poppler to extract signature data[0] and actually sign a full PDF document[1] with work-in-progress patches. Qt5 frontend integration seems included. :o

[0] https://bugs.freedesktop.org/show_bug.cgi?id=99271
[1] https://bugs.freedesktop.org/show_bug.cgi?id=99416
_________________
boost|select libs to build|slotable|python-buildid

hear hear
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum