
Pdftoipe
========

This is Pdftoipe, a program that reads arbitrary PDF files and
generates an XML file readable by Ipe.

Nearly all these source files are from Xpdf 2.01, an open source
viewer for PDF files by Derek Noonburg.  The beauty of Xpdf is that it
provides a general framework for reading and displaying PDF files,
where different output drivers can be plugged in for rendering/saving
to other formats.  The utilities "pdftotext", "pdffonts", "pdftops",
"pdfimages" from the Xpdf distribution are implemented that way.

Pdftoipe takes advantage of this framework by providing a new output
driver, in "xmloutputdev.*".  This is my only contribution.

I have (mechanically) performed some modifications in the Xpdf
sources, mostly concerning file I/O.  These modifications were made
for integrating Xpdf into Ipe, they are no longer actually necessary
(as Ipe now has its own small PDF parser).  At some point I intend to
upgrade to the most recent version of Xpdf and use original files
again.

Before reporting a bug, check that you have the latest version, and
check that it is not yet mentioned in the FAQ on the Ipe webpage.

You can report bugs on the bug tracking system at
"http://ipe.compgeom.org/bugzilla.html".  Check the existing reports
to see whether your bug has already been reported.  Please do not send
bug reports directly to me (the first thing I would do with the report
is to enter it into the bug tracking system).

Suggestions for features, or random comments on Ipe can be sent to the
Ipe discussion mailing list at <ipe-discuss@cs.uu.nl>.  If you have
problems installing or using Ipe and cannot find a guru among your
real-life friends, the Ipe discussion mailing list would also be the
best place to ask.

You can send suggestions or comments directly to me by Email, but you
should then not expect a reply.  I cannot dedicate much time to Ipe,
and the little time I have I prefer to put into development.  I'm much
more likely to get involved in a discussion of desirable features on
the mailing list, where anyone interested can participate than by
direct Email.

	Otfried Cheong
	Div. of Computer Science
	KAIST
	Daejeon, South Korea
	Email: otfried@tclab.kaist.ac.kr
	Ipe webpage: http://ipe.compgeom.org

--------------------------------------------------------------------

Compiling
=========

I'm using qmake to create the Makefile.  There's nothing special about
the Makefile -- roll your own if you don't have qmake.

In source directory, say

qmake
make

This will create the single executable "pdftoipe".  Copy it to
whereever you like.  You may also install the man page "pdftoipe.1".

--------------------------------------------------------------------

Changes
=======

 * 2005/11/14
   Generating header correct for Ipe 6.0 preview 25.

 * 2005/09/17
   Fixed handling of transformation matrix for text objects.  (Text
   was incorrectly positioned if pages had the /Rotate flag on.)

   Added -cyberbit option to automatically insert style sheet for
   using the Cyberbit font (but of course it has to be installed
   properly to be used from Pdflatex).

   Removed silly dependency on Qt.

   Added conversion of some Unicode characters to Latex macros.

 * 2003/06/30
   Added recognition of Unicode text (results in a message to the
   user) and escaping of the special Latex characters.

   Fixed generation of incorrect XML files (unterminated <text>
   objects).  
   
 * 2003/06/18
   Added -notext option to completely ignore all text in PDF file.

   Added man page.

 * 2003/06/13
   Packaged pdftoipe separately from Ipe.

 * 2003/06/04
   Fixed handling of transformation matrix in Pdftoipe.  Pdftoipe
   is now actually considered supported.

   Added option -math to pdftoipe.  With this option, all text objects 
   are turned into math formulas. 

--------------------------------------------------------------------

Relevant parts of Xpdf's original README file follow:

Xpdf
====

The Xpdf software and documentation are
copyright 1996-2004 Glyph & Cog, LLC.

Email: derekn@foolabs.com
WWW: http://www.foolabs.com/xpdf/

The PDF data structures, operators, and specification are
copyright 1985-2003 Adobe Systems Inc.


What is Xpdf?
-------------

Xpdf is an open source viewer for Portable Document Format (PDF)
files.  (These are also sometimes also called 'Acrobat' files, from
the name of Adobe's PDF software.)  The Xpdf project also includes a
PDF text extractor, PDF-to-PostScript converter, and various other
utilities.

Xpdf runs under the X Window System on UNIX, VMS, and OS/2.  The non-X
components (pdftops, pdftotext, etc.) also run on Win32 systems and
should run on pretty much any system with a decent C++ compiler.

Xpdf is designed to be small and efficient.  It can use Type 1 or
TrueType fonts.


Distribution
------------

Xpdf is licensed under the GNU General Public License (GPL), version
2.  In my opinion, the GPL is a convoluted, confusing, ambiguous mess.
But it's also pervasive, and I'm sick of arguing.  And even if it is
confusing, the basic idea is good.

In order to cut down on the confusion a little bit, here are some
informal clarifications:

- I don't mind if you redistribute Xpdf in source and/or binary form,
  as long as you include all of the documentation: README, man pages
  (or help files), and COPYING.  (Note that the README file contains a
  pointer to a web page with the source code.)

- Selling a CD-ROM that contains Xpdf is fine with me, as long as it
  includes the documentation.  I wouldn't mind receiving a sample
  copy, but it's not necessary.

- If you make useful changes to Xpdf, please make the source code
  available -- post it on a web site, email it to me, whatever.

If you're interested in commercial licensing, please see the Glyph &
Cog web site:

    http://www.glyphandcog.com/

--------------------------------------------------------------------
