Filling PDF forms with LibreOffice

Salam,

I need to fill PDF forms at work, im using the arabic, english and french
languages, and i'm using the oracle pdf import extension

the problem is that :

arabic characters in pdf files are not rendered well

some french characters are not rendered well

only the english pdf forms are correctly rendered when using LibreOfficeDraw

my only way to fill my arabic forms correctly is by using GIMP

what is the problem...?

LibreOffice-3.3-RC3 on Ubuntu-10.10-32bits

$ sudo apt-get install xournal
Then: Applications|Accesories|Xournal

http://packages.ubuntu.com/maverick/xournal
https://launchpad.net/ubuntu/+source/xournal/+bugs

http://xournal.sourceforge.net/manual.html
[PDF annotation]

Salam NoOp,

but as i said in the title "Filling PDF forms with LibreOffice", i'm looking
for a solution with LibreOffice because as you certainly may know it's an
Office suite.

and GIMP is sufficient for doing that, exept that, once the pdf form has
been edited and exported to PDF, if you open it after that it will be an
image contained in a PDF and not text contained in a PDF. so it'll be very
ambarassing to refill all the form once again beacause you've made a mistake
in the name, age or whatever information you're filling your form with.

again,

my PDF forms are created with LibreOffice Writer and exported to PDF format.

when it contains only english characters, reopening it with LibreOffice
Draw, is OK.

when it contains some french characters ç à â ê it's not OK.

when it contains some arabic characters ئ ء ؤ إ لأ لإ it's not OK.

The problem is with handling some special characters and not all the non
english characters.

I'm using LibreOffice-3.3-RC3 with Oracle PDF Import extension on a
Ubuntu-10.10 32bits machine

Thank you for your time and good luck to you all!

Hi :slight_smile:

Most Office Suites have difficulty handling the pdf format.

It is a proprietary format rather than an Open one. The whole point of
proprietary formats is to force people into buying a product from a particular
company. On the rare occasions that such a product is given away for free it is
to increase market-share and usually has reduced functionality (such as being
able to read but not save) or for a limited trial period.

Part of our aim is to offer Open alternatives that are better and easier to
use. Partly this is achieved because of the awkwardness of using proprietary
formats but where there is market dominance people are just forced to buy the
product however bad it is.

However, there are usually a couple of work-arounds;
1. Find and use an Open equivalent. If you send the document to anyone then
give them a download link to LibreOffice, OpenOffice, KOffice, AbiWord or
anything else that can read the format so they can quickly install. It doesn't
take people long! Probably even MicroSquish Office 2007 or 2010 can read it.
If people can't install stuff on the machine they use then a link to GoogleApps
might help them.

2. Can't LibreOffice use OpenOffice plugins? I would be amazed if it can't.
So, just use whatever plugin you were using before and let us know what it was
called because it sounds useful!

3. Open the pdf with a pdf reader. Click anywhere in the document. Press CtrlA
(to select everything) then CtrlC to copy and open a new document in Libre to
paste into (CtrlV). Fill in and/or edit and "Save As .." an odt or some other
Open and editable format before Exporting as Pdf again.

Obviously option 1 would be the better long-term answer and would help people
break free from these proprietary formats.

Regards from
Tom :slight_smile:

Hi Amine,

arabic characters in pdf files are not rendered well

This is a glyph hinting problem, linked either to the fact that the
glyphs are not properly integrated into the final PDF document, either
because of licensing issues, or because neither OOo nor LibO fully
support certain types of font rendering. You might want to open up a bug
report for this.

some french characters are not rendered well

I would guess the same is true of French accented characters too,
although personally I have no problem with them.

You might need to experiment with your various fonts in order to see
which ones work best.

The PDF specification refused font embedding for certain fonts that were
not deemed acceptable by Adobe. You might also want to check whether
your fonts fall into that category.

On a Linux system, I seem to recall that libpoppler or the poppler
package is responsible for being able to edit PDF forms and save them.
There have continuously been problems with this library, and I have gone
through various phases of frustration in the past where I thought forms
had been filled in only to discover that nothing had actually been saved.

Alex

Hi

Poppler seems to only allow me to view, nt to edit, pdf on Ubuntu 10.04 but
there are a lot of libraries and packages that start with that name and possibly
one of them adds editing functionality.

I guess my question would be ... Does anyone know of an Open alternative that is
easy to use in Windows too?

Regards from
Tom :slight_smile:

Hi Tom,

Poppler seems to only allow me to view, nt to edit, pdf on Ubuntu 10.04 but
there are a lot of libraries and packages that start with that name and possibly
one of them adds editing functionality.

This is version dependent. It used to work, AFAIK, in Ubuntu 7, 8 and
9.04, then stopped working after one of the updates, and doesn't appear
to have been addressed in either 10.04 or 10.10 :-/

I guess my question would be ... Does anyone know of an Open alternative that is
easy to use in Windows too?

Off hand, no idea for Windows, sorry, it not being a platform I use very
often. PDF Creator perhaps ? However, beware, some of the freeware PDF
apps out there have a nasty habit of "phoning home" or taking over your
browser toolbar...

Alex

Hi :slight_smile:

Ooops, i was a bit unclear! I am wondering if there is an Open alternative to
the pdf format itself. When i try to "Print to file" i have a choice of ".ps"
or ".pdf" but i am not sure if ps is editable ...

Regards from
Tom :slight_smile:

PDF and PS are very similar, on Linux you can convert ps to PDF with
(obviously!) the PS2PDF command. More here:

http://linux.about.com/library/cmd/blcmdl1_ps2pdf.htm

Doesn't help you edit it though.

I realise PDF was developed as a closed source project but Adobe got it
approved as a standard years ago and disclosed the specification if not the
source code for Acrobat, so there are loads of PDF tools out there for most
platforms.

For what it's worth I use PDF tools in GnuCash, OO.org and Scribus to send PDF
files to editors without any problems.

When I receive PDFs I open them in Okular (on Kubuntu) and I can extract
images or words quite easily.

To break up a large pdf into pages I used to use a CLI tool now long forgotten
and replaced by PDF Chain. It can reverse the process too, compiling many pdf
pages into a single document.

KOffice will open PDF files for editing, but unless the layout is very simple it
messes it up. Useful if you want some of the text or images for an essentially
new document, but not good enough to edit a word or two and preserve the
layout.

That would be DjVu (pronounced like déjà vu):
http://en.wikipedia.org/wiki/DjVu

To answer Amine's initial question, in such cases I question the need to
use Acrobat forms in the first place, then I'd suggest to use Acrobat
Reader for Linux directly - unless I am missing something that should
definitely work. Of course this doesn't solve the non-free parts of PDF
(such as recent extensions and implementations, last time I checked).

Cheers,

Fabian

For Linux, you use your package managers to look for PDF software.
There are a bunch of packages that do PDF editing and such that is
not part of the normal/default document reader.

For printing documents as PDFs, I used "doPDF" PDF printer for Windows
and CUPS-PDF for Ubuntu.

The trouble with Adobe's PDF system is like all their other packages.
They are bloating their systems to where it is too much inside the file
format to be "simple" and easy to implement for non-Adobe software
companies, like LO. Their installs are almost 1 gig or more for each package.
Microsoft is the same way. 95% of Word's abilities are not used by
99% of its users, but to give users those extras caused Word and
the other parts of their office suite to make it to hard to use for the average
user. Same with Adobe's newest PDF options.

LibreOffice should be able to export to djvu,
if not by default, then, at least with a plugin/extension.

./tony

Salam,

i think that if there is an extension to LibO that permit djvu forms
edition, it'll be very pleasant to enterprises that try to stick to open
standards.

LibO+djvu will be replacing the essential of the Oracle office suite and the
adobe PDF format !

good luck to you all!

I've just been doing a bunch of googling.
I can't find ANY utility for conversion of odt, LaTeX,
.ps, .png, or other open formats to djvu that doesn't require
a step through pdf or jpg somewhere.
It almost makes it seem pointless to have this open standard.
You CAN convert scanned images to djvu without such steps.
Oh, you CAN step through netpbm to djvu for image files.
Apparently there are tools for converting netpbm files
(open image files created by scanners, largely) to djvu,
but, for some odd reason, they were not included in the
netpbm tools available on debian...weird.
It seems to me, that for djvu to be a viable open alternative to
pdf, such conversion tools would be not only desirable,
but necessary.

Salam,

i think that if there is an extension to LibO that permit djvu forms
edition, it'll be very pleasant to enterprises that try to stick to open
standards.

LibO+djvu will be replacing the essential of the Oracle office suite and
the
adobe PDF format !

good luck to you all!

I've just been doing a bunch of googling.
I can't find ANY utility for conversion of odt, LaTeX,
.ps, .png, or other open formats to djvu that doesn't require
a step through pdf or jpg somewhere.

You can also use TIFF as an intermediat format.

It almost makes it seem pointless to have this open standard.
You CAN convert scanned images to djvu without such steps.
Oh, you CAN step through netpbm to djvu for image files.
Apparently there are tools for converting netpbm files
(open image files created by scanners, largely) to djvu,
but, for some odd reason, they were not included in the
netpbm tools available on debian...weird.

It seems to me, that for djvu to be a viable open alternative to
pdf, such conversion tools would be not only desirable,
but necessary.

See this:
http://en.wikisource.org/wiki/Help:DjVu_files#Images_directly_to_DjVu

I briefly checked and in Ubuntu they're in djvulibre-bin.

Cheers,

Fabian

Salam NoOp,

but as i said in the title "Filling PDF forms with LibreOffice", i'm looking
for a solution with LibreOffice because as you certainly may know it's an
Office suite.

and GIMP is sufficient for doing that, exept that, once the pdf form has
been edited and exported to PDF, if you open it after that it will be an
image contained in a PDF and not text contained in a PDF. so it'll be very
ambarassing to refill all the form once again beacause you've made a mistake
in the name, age or whatever information you're filling your form with.

With xournal you open the PDF, fill in the form, export to PDF & it is
exported as a proper PDF. You can easily modify the form again using the
xournal file that you've saved as well :slight_smile:

again,

my PDF forms are created with LibreOffice Writer and exported to PDF format.

when it contains only english characters, reopening it with LibreOffice
Draw, is OK.

when it contains some french characters ç à â ê it's not OK.

when it contains some arabic characters ئ ء ؤ إ لأ لإ it's not OK.

The problem is with handling some special characters and not all the non
english characters.

The problem that I've found with attempting to use Draw (even in OOo)
for PDF form filling (and modification) is, even with English,
characters will go missing, entire lines will go missing if the font
isn't available, or fonts get substituted. Hence, I gave up on using the
PDF extension for any type of form filling.

That said, I'm not sure it's entirely a Draw issue, see:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/244353
[[ooo-build] OpenOffice exports PDF with arabic numerals instead of
regular numbers]

And of course even using cups-pdf & evince had/have issues:
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/381788
[[jaunty] cups-pdf no longer embeds fonts in pdf file]
https://bugs.launchpad.net/ubuntu/+source/poppler/+bug/151608/
[Evince Document Viewer 2.20.0 fails to read Arabic PDFs]

I'm using LibreOffice-3.3-RC3 with Oracle PDF Import extension on a
Ubuntu-10.10 32bits machine

When you export the forms to PDF, do you tick 'Embed standard fonts'?
Does that make a difference if you do? If it doesn't, then I'd recommend:

1. Test with OOo DEV300m97 to see if it occurs there as well. If it does
not, then file a bug & include a small test file & screen shots & note
that it works in OOo.
  Keep in mind that you are using an SUN/Oracle extension that is tuned
to OOo to import the PDF into LO Draw, so the issue may be entirely with
the extension. Read the 'Not supported':
http://extensions.services.openoffice.org/en/project/pdfimport

2. Export the form as a hybrid (Create hybrid file). That way when you
open the PDF it's back in Writer for editing. See:
<http://www.oooninja.com/2008/06/pdf-import-hybrid-odf-pdfs-extension-30.html>
[Hybrid ODF-PDF files]
Note that you still use the Oracle PDF Import Extension with this
feature as well.

3. Try xournal... you may like it :slight_smile:

Yeah, I have that stuff, imagemagick and dvjulibre.
That's great for scanning a document to .pbm and converting to .djvu
Sure.
But, that doesn't make DjVu a completely viable option as a "portable
document format"
to replace .pdf, when pdf is ubiquitous and easily generated, while tools
for converting documents, and other images,
to .djvu are either simply not available, or require roundtripping through
the proprietary pdf.
I can convert just about anything to pdf almost instantaneously, now.
Webpages, .odt docs, plain text, LaTeX, all sorts of image files.
But in order to create a DjVu file with such materials, almost universally I
HAVE to go to pdf first.
As I see it, I should be able to compile a .tex file to .djvu, export plain
text,
or .odt to .djvu, etc., without the intermediary of a proprietary format.
I discuss this more here:
http://baldwinsoftware.com/blog/?p=1329
(wherein I mention discussion on this list), and also offer a script
for converting plain text files to djvu (but, sadly, not without passing
through
pdf along the way...).

./tony

:

I discuss this more here:
http://baldwinsoftware.com/blog/?p=1329

Shameless, self-promoting plug....

:slight_smile:

I also have a bridge for sale.
Contact me off-list.

:stuck_out_tongue:
tony

Hi!

Free alternative to edit PDF?

PDF Edit - http://pdfedit.petricek.net/en/index.html - it is in APT repositories.

Also there is pdfmod - http://live.gnome.org/PdfMod - it is also in APT repositories.

For Windows there is PDF Reader - http://www.foxitsoftware.com/pdf/reader/ - which has also editing capabilities (Comments->Typewriter tools->Typewriter tool)
There is also Foxit Reader for Linux (http://www.foxitsoftware.com/pdf/desklinux/ and also http://www.foxitsoftware.com/pdf/mobile/embeddedlinux.htm) but it is outdated and probably don't have PDF editing feature.

*Online PDF editor:*

    * http://www.pdfescape.com/
    * http://www.nitropdf.com/free/hammer/index.htm

An overview of PDF software can be found here - http://en.wikipedia.org/wiki/List_of_PDF_software - there is also Inkscape, which claims to be a PDF editor.

Best Regards,
Edmund Laugasson