Thread View: adobe.postscript.programming
9 messages
9 total messages
Started by gplqy98
Thu, 05 Feb 2009 12:43
How to extract text and image information from postscript file
Author: gplqy98
Date: Thu, 05 Feb 2009 12:43
Date: Thu, 05 Feb 2009 12:43
3 lines
705 bytes
705 bytes
I want to write a programe,and extract text and image information from postscript file using Java.Is it possible? How to extract ? Thank!
Re: How to extract text and image information from postscript file
Author: Helge_Blischke
Date: Thu, 05 Feb 2009 13:33
Date: Thu, 05 Feb 2009 13:33
3 lines
801 bytes
801 bytes
I'd rather use a PostScript interpreter to do this. Ghostscript is a good choice, and look into the pstoascii script that comes with ghostscript how to do things like that. Helge
Re: How to extract text and image information from postscript file
Author: Dov Isaacs
Date: Thu, 05 Feb 2009 22:18
Date: Thu, 05 Feb 2009 22:18
3 lines
1174 bytes
1174 bytes
PostScript itself is a programming language. Although there are operators to express text, vector graphics, and raster images, most PostScript streams provide procedures with these functions embedded and as such, you cannot actually determine such data by simply scanning the PostScript file. You need to fully interpret the PostScript file or add procedures to such a PostScript file to isolate such text and graphics data when the PostScript program is run. - Dov
Re: How to extract text and image information from postscript file
Author: gplqy98
Date: Fri, 06 Feb 2009 14:04
Date: Fri, 06 Feb 2009 14:04
1 lines
1140 bytes
1140 bytes
Thank you very much!This is my first to deal with postscript file,I still have some question. At first,I open the postscript file as txt file,so, I intend to scan the txt file to extract text and graphics information according with the rules of postscript language, but I'm not sure that it can work.You say that postscript streams provide procedures with these function, could you talk about it detail? And is my thought about scanning the txt file according with ps's rule right?
Re: How to extract text and image information from postscript file
Author: gplqy98
Date: Fri, 06 Feb 2009 14:17
Date: Fri, 06 Feb 2009 14:17
1 lines
777 bytes
777 bytes
To Helge:Thank you very much!I also want to know ghostscript how to do these things, are there any files to provide the ghostscript's internal method and principle?
Re: How to extract text and image information from postscript file
Author: Dov Isaacs
Date: Fri, 06 Feb 2009 19:05
Date: Fri, 06 Feb 2009 19:05
3 lines
1227 bytes
1227 bytes
First of all, PostScript is not a "text" file. It can and often does contain binary data. Since PostScript streams often contain nested procedures, unless you process the procedure definitions and can "execute" them, you cannot simply "scan" a file to get what you want. No, I can't talk about this in detail since it is quite complex. But Adobe does have the PostScript Language Reference Manual on-line for download at <http://www.adobe.com/devnet/postscript/pdfs/PLRM.pdf>. Look that over and you will have a fairly healthy respect as to the task involved. - Dov
Re: How to extract text and image information from postscript file
Author: Paperino
Date: Sat, 07 Feb 2009 00:09
Date: Sat, 07 Feb 2009 00:09
18 lines
2242 bytes
2242 bytes
"Dov Isaacs" ha scritto > First of all, PostScript is not a "text" file. It can and often does > contain binary data. Since PostScript streams often contain > nested procedures, unless you process the procedure definitions > and can "execute" them, you cannot simply "scan" a file to get > what you want. No, I can't talk about this in detail since it is quite > complex. > [PLRM] Look that over and you will have a fairly healthy respect > as to the task involved. Moreover, there can be text that is perfectly readable for an human being but very, *very* difficult to extract as such, if it's possible at all: if you do a "convert text to curves" in any graphics program you'd understand what i'm talking of. In those cases, the only way to *try* to read some text would be to convert the PS to a raster image and pass it to an OCR. Bye, G.
Re: How to extract text and image information from postscript file
Author: gplqy98
Date: Sat, 07 Feb 2009 00:44
Date: Sat, 07 Feb 2009 00:44
1 lines
684 bytes
684 bytes
To Dov: Thank you very much, I will read the pdf file detail!Thank you!
Re: How to extract text and image information from postscript file
Author: Paperino
Date: Sat, 07 Feb 2009 13:33
Date: Sat, 07 Feb 2009 13:33
7 lines
1599 bytes
1599 bytes
"Paperino" ha scritto > if you do a "convert text to curves" in any graphics program you'd > understand what i'm talking of. Hmmmm... of course, "you" = "OP" :-) Bye, G.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads