How can i make an basic GUI application in PostScript - user-interface

I have searched in google regards the GUI application for postscript. I was redirected to this page https://www.whoishostingthis.com/resources/postscript/
And got some tools name which is mentioned below:
1)ImageMagick-(Installed successfully,But not working)
2)Pslib- Library
3)Gnuplot- A command-line graphics and data visualization tool
4)Cairo- Library
5)GNUEnscript-Tool which is used to convert ASCII files into PostScript files
6)GNU a2ps- Any to PostScript filter
Please Guide me from here,To make an GUI application in PostScript
Thanks in advance..

There are a few options and a lot of caveats. As Ken rightly says, PostScript has a limited scope for interacting with the operating system. There are a few technologies that extended the basic PostScript environment for GUI applications, namely NeWS (from Sun) and Display PostScript (from Adobe). While these worked somewhat differently, PostScript was primarily intended to be an output-only component of a larger application using the C API.
Some options for a similar kind of setup would be running ToastScript as part of a larger Java application. Or maybe scripting ghostscript with TCL or Python.
Without a lot of extra work, you can use ghostscript for graphical output as long as the input comes from the terminal. Eg. my Mandelbrot Set program.

Related

Windows programmable virtual printer "device"

I have no idea how this windows service called or how should I tag it.
But I have seen around some software driven printing devices/configurations at windows, like Send to OneNote or Convert to PDF (from different pdf applications).
So I want to create one like this myself, lets say a virtual printer device that converts documents into PDF file.
How it called? Where I can find some information about it ?
Thank you.
A lot of these applications (on Windows) actually use the built-in Windows PostScript printer driver to produce a PostScript program from the application.
That is then sent to a virtual printer (in versions of Windows before Windows 10, a Port Monitor is used) which stores the program on disk. It then starts up a PostScript interpreter which is capable of creating a PDF file from a PostScript file. Notably these include Adobe Acrobat Distiller, the JAWS PostScript interpreter and Ghostscript. Because Ghostscript is open-source, it is probably the most widely used.
The alternative approach is to write a printer driver. This needs to accept OS native drawing operations (which differ according to the operating system) and then produce PDF equivalents for those drawing operations, and wrap the whole thing up as a PDF file.
The first solution is easiest, because it leverages the work other people (the OS vendor and the PostScript interpreter vendor) have done. The latter is, I think you'll find, much harder.
Of course, since Windows and MacOS can both now produce PDF files, it seems somewhat redundant to implement these now.

Extract pictures from a table in a PDF

I would like to write a small program, or script, to extract a set of pictures from a pdf.
I have several PDFs, they each have a table of pictures. I would link to have one picture per file. Therefore I need a way to extract them. Due to the nature of the PDF (A table/grid), it seems that it would be much easier to write a program, than do some manual method. However I have no idea what tools are available.
What libraries are available?
Preference Python, then C# or Java, then maybe some other language (My C and C++ is rusty, I have not done them for years).
I am on Debian Gnu/Linux, so have a wide choice of tools.
I went with pdfbox (an Apache project, so Free Software) it is a java library and a command line tool (the app module). I then scripted it with a bit of python to process the extracted text (yes it did that as well), and rename the image files.

Rendering Postscript data to HDC

I am working on a win32 application. In this application I want to display postscript data on the window DC.
Please, can anyone suggest how to do so?
PostScript is an interpreted programming language, so you can't 'display PostScript data'. You need to execute the program by using a PostScript interpreter.
Which PostScript interpreter you use is up to you, it will depend on whether you are prepared to pay for a commercial interpreter, or can abide by the GPL open source licence.
If you are happy to use GPL software, then I suggest Ghostscript, the simple application for Windows even uses win32 API calls to do pretty much what I think you want, so you can use it as a working example.

Creating GUI for linux CLI

I am a final year computer engineering student. As my final year project, I have decided to create a multimedia encoder for linux, possibly cross platform.
My question is: How can I create a GUI for ffmpeg (i.e. how can I pass command line arguments from the GUI)?
I am trying to use QT for cross platform development.
Tcl/Tk was designed to embed scripting into C programs and is probably the easiest of any language to do this with. It has several mechanisms for doing this embedding. The API makes it very easy to retrofit it to command-line C programs using argv as it has calls for converting native Tcl data structures to and from char**. It also has GUI toolkit called Tk that is somewhat basic but very easy to use and substantially more flexible than you might think.
In your case, the two mechanisms you would probably use in Tcl are the embedding where you just call main with the arguments passed from your Tcl program. The other is to fork the process with appropriate command line args and wait for it to complete. Both are fairly easy to accomplish with Tcl.
I'm not aware of any QT bindings for Tcl but it is very portable and Tk can be themed thesedays so it doesn't look like a 1990 vintage Motif app.
Se this posting for a more in-depth discussion of the topic.
Do you want to call ffmpeg from within your application? If so, look at QProcess. You can even capture the stdout and stderr streams from the ffmpeg process and use that information to (for example) drive a progress bar or display errors.
If you actually want to embed one GUI application inside another, that's a lot harder, especially to do in a platform independent manner.
The Red Hat folks use Python and pyGTK to write their CLI GUI's.
Blog posting: http://www.oreillynet.com/onlamp/blog/2008/02/red_hats_emerging_technology_g.html

Scripting language that can produce a small, independent, Windows EXE?

I'd like to do some light data processing - a little binary data manipulation followed by conversion to text serialization. The result is written to a file, and processed by an external program (run by my program). The data processing is more than I'd care to consider doing in batch files.
I'd prefer to use a scripting language, but not have to install the language first. The target computers are mostly older Windows boxes, which are disconnected from the network (no updates, such as PowerShell)
I'm not familiar with the various language's tools for creating EXE files. Which ones have solutions that work well and don't produce huge files? (i.e., whole interpreter package plus my script.)
For my money (its free) AutoIt 3 is exactly what your looking for. AutoIt produces relatively (250k is the standard overhead) small stand alone exes. It has a full perl like regex engine so your light data processing should be a breeze (I've written some pretty heavy data processing scripts in it myself). When downloading autoit be sure to get the full version including Scite this makes compile to exe a one click operation.
I know I might get flamed for this, but VB 6 is a viable option. Since XP SP2 (I think, possibly earlier), Windows has come with its runtimes installed. Not sure about vista.
Theres also the Windows Scripting Host that uses VBScript and JScript.
http://en.wikipedia.org/wiki/Windows_Script_Host
Lua is an excellent choice for that kind of stuff. You can integrate it in your executable or use the standalone Lua interpreter to run your scripts.
While waiting for answers I ran across Shoes, which can make Ruby .exe (I'm most familiar with Ruby) I got it mostly working, although the size of 2.4MB was a bit larger than I'd like. However, I found that it would crash when changing application focus.
I switched to a 'regular' terminal script, and found rubyscript2exe, which, after working around a problem with rubygems, seems to work, and creates a ~700kb file.
I did rather like some of the options presented, but it's not worth redeveloping at this point.
Python with py2exe. Depends on what you mean by small though.
Would using PowerShell script be something you've considered. The data processing might be richer there.
Why not knock up a .NET application? There are free editions of the IDE, and the Framework comes with Windows as a standard component (which also includes a C# compiler, as it happens.)

Resources