From: Benjamin DeMora (Benjamin.DeMora@vivista.sungard.com)
Date: Thu Jul 06 2006 - 07:22:05 EDT
OK - converting PDF files to ascii text files within Solaris...
This can easily be done using pdftotext, which ships as part of the xpdf
static linked precompiled binary available from
http://www.foolabs.com/xpdf/
One thing to note - this conversion program can produce a large number
of additional whitespace characters in the resulting file. These can be
cleaned up and removed by compiling and running a quick C program:
-------------begin space.c-------------------
#include <stdio.h>
int main(int argc, char *argv[]) {
FILE *fp;
int c;
int spaceOn=0;
if (argc < 2)
exit(1);
fp=fopen(argv[1], "r");
if (!fp)
exit(1);
while ((c=getc(fp)) != EOF) {
if (c != ' ') {
printf("%c", c);
spaceOn=0;
}
else {
if (spaceOn == 0) {
printf("%c", c);
spaceOn=1;
}
}
}
}
----------end space.c------------------
-----------
Benjamin J de Mora
UNIX Systems Engineer
Systems Management
SunGard Vivista
This message has been checked for all known viruses on behalf of SunGard
Vivista by MessageLabs.
http://www.messagelabs.com or Email: mailsweeper.info@vivista.sungard.com
For further information http://www.sungard.com/vivista
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:40:20 EDT