#!/bin/sh
pod2man "$0" > "$(basename "$0" .pod)".man
man ./"$(basename "$0" .pod)".man
: <<=cut
=pod
=head1 NAME
pdf2odt - Convert a PDF file into an ODT file
=head1 SYNOPSIS
B<pdf2odt> [--ocr] [--language I<lang>] [--resolution I<res>]
B<pdf2odt> [options] I<example.pdf>
B<pdf2odt> [options] < I<example.pdf> > I<example.odt>
B<pdf2odt> [options] I<example.pdf> - > I<example.odt>
=head1 OPTIONS
=over 7
=item B<--ocr>
Run OCR on the pages.
=item B<--language> I<lang>
Use I<lang> as language for B<--ocr>. Default: en.
=item B<--resolution> I<res>
Use B<res> as DPI resolution for PNG conversion. Default: 300.
=back
=head1 DESCRIPTION
B<pdf2odt> converts a PDF file into PNG images. These are optionally
OCR'ed using B<tesseract> before they are combined into a single ODT file.
=head1 EXAMPLES
Convert example.pdf to example.odt:
pdf2odt example.pdf
Convert example.pdf to example.odt, enable OCR and use Spanish as language:
pdf2odt --ocr --language es example.pdf
Convert example.pdf to mydoc.odt:
pdf2odt example.pdf - > mydoc.odt
Convert example.pdf to mydoc.odt:
cat example.pdf | pdf2odt > mydoc.odt
=head1 AUTHOR
Copyright (C) 2019-2023 turulomio@yahoo.es
Documentation Copyright (C) 2023 Ole Tange,
http://ole.tange.dk and Free Software Foundation, Inc.
=head1 LICENSE
Copyright (C) 2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
at your option any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
=head1 DEPENDENCIES
B<pdf2odt> uses B<pdfinfo>, B<pdftoppm> and B<tesseract>.
=head1 SEE ALSO
B<loffice>
=cut