tremak
asked on
View PDFs in a Unix System?
Is it possible to view .pdf files in a Unix system? The PDFs files are created with COBOL and an enscript script.
For example, here's a COBOL program that creates a PDF for a payroll program.
For example, here's a COBOL program that creates a PDF for a payroll program.
229 1499ca 01 wk-copy-cmd.
230 03 filler pic x(18) value
231 "cp ../data/extr10.".
232 03 copy-ws pic x(8).
233 03 filler pic x value space.
234 03 copy-file-name pic x(22) value
235 "../data/check_register".
236 03 copy-co pic xx.
237 03 filler pic x value "_".
238 03 copy-yyyy.
239 05 copy-era pic 99.
240 05 copy-yy pic 99.
241 03 filler pic x value "_".
242 03 copy-mm pic 99.
243 03 filler pic x value "_".
244 03 copy-dd pic 99.
245 03 filler pic x(4) value ".txt".
246 1499ca 01 wk-enscript-cmd.
247 * 03 filler pic x(31) value
248 * "enscript -r -B -fCourier9.5 -p ".
249 03 filler pic x(28) value
250 "enscript -B -fCourier6.5 -p ".
251 03 filler pic x(22) value
252 "../data/check_register".
253 03 enscript-ps-co pic xx.
254 03 filler pic x value "_".
255 03 enscript-yyyy.
256 05 enscript-era pic 99.
257 05 enscript-yy pic 99.
258 03 filler pic x value "_".
259 03 enscript-mm pic 99.
260 03 filler pic x value "_".
261 03 enscript-dd pic 99.
262 03 filler pic x(4) value ".ps ".
263 03 filler pic x(22) value
264 "../data/check_register".
265 03 enscript-txt-co pic xx.
266 03 filler pic x value "_".
267 03 enscript-txt-yyyy.
268 05 enscript-txt-era pic 99.
269 05 enscript-txt-yy pic 99.
270 03 filler pic x value "_".
271 03 enscript-txt-mm pic 99.
272 03 filler pic x value "_".
273 03 enscript-txt-dd pic 99.
274 03 filler pic x(5) value ".txt ".
275 1499ca 01 wk-ps2pdf-cmd.
276 03 filler pic x(31) value
277 "ps2pdf13 ../data/check_register". 278 03 ps2ps-co pic xx.
279 03 filler pic x value "_".
280 03 ps2ps-yyyy.
281 05 ps2ps-era pic 99.
282 05 ps2ps-yy pic 99.
283 03 filler pic x value "_".
284 03 ps2ps-mm pic 99.
285 03 filler pic x value "_".
286 03 ps2ps-dd pic 99.
287 03 filler pic x(4) value ".ps ".
288 03 wk-pdf-file-name.
289 05 filler pic x(22) value
290 "../data/check_register".
291 05 ps2pdf-co pic xx.
292 05 filler pic x value "_".
293 05 ps2pdf-yyyy.
294 07 ps2pdf-era pic 99.
295 07 ps2pdf-yy pic 99.
296 05 filler pic x value "_".
297 05 ps2pdf-mm pic 99.
298 05 filler pic x value "_".
299 05 ps2pdf-dd pic 99.
300 05 filler pic x(5) value ".pdf ".
..........................................................................
627 call "system" using wk-copy-cmd.
628 call "system" using wk-enscript-cmd.
629 call "system" using wk-ps2pdf-cmd.
You can use evince / poppler to display your pdf files
You don't mention which version of Unix you're using, but Adobe do have Solaris and Linux listed on their Acrobat Reader download page here
http://get.adobe.com/uk/reader/otherversions/
http://get.adobe.com/uk/reader/otherversions/
ASKER
imanassypov: Does evince/poppler work with Unix at all? Can you specify a little more on what this is?
are you in a graphical environment where adobe reader could be installed, or do you need the info displayed in a terminal window? enscript is likely one approach to convert a PDF file to a text format.
There are other tools i.e. convert pdf to ps to ps or use ghostscript.
pdf2txt might be another option to consider.
There are other tools i.e. convert pdf to ps to ps or use ghostscript.
pdf2txt might be another option to consider.
ASKER
We want something where the user can select from a Unix System menu which PDF file they want to look at. We want to be able to display the PDF file.
Are they in a graphical interface (Gnome, KDE, etc.) or are they in a terminal ascii mode display?
xpdf is a PDF file viewer for X windows system.
You need to provide more information, e.g. flavour/variant of Unix, presentation style (telnet,XWin,etc)
ASKER
We use a Unix system that is viewed through .ZOC terminal windows. The reports are written in COBOL.
There are a pdftohtml, pdf2ps, and pdftotext tools. Do you have those on your system?
These tools are part of the xpdf http://www.foolabs.com/xpdf/download.html.
Not the cleanest translation, but it make it readable when you skip the formating directives, etc..
These tools are part of the xpdf http://www.foolabs.com/xpdf/download.html.
Not the cleanest translation, but it make it readable when you skip the formating directives, etc..
Here is a link that lists everything regarding PDF per Unix / Linux flavor
http://en.wikipedia.org/wiki/List_of_PDF_software#Unix_.2F_Linux
Depending on which graphical front end you are running, you can see which viewer comes by default.
Out of all of them, XPDF is the most generic.
Go to this site, select your unix flavour on the right hand side and get the XPDF package:
http://www.sunfreeware.com
http://en.wikipedia.org/wiki/List_of_PDF_software#Unix_.2F_Linux
Depending on which graphical front end you are running, you can see which viewer comes by default.
Out of all of them, XPDF is the most generic.
Go to this site, select your unix flavour on the right hand side and get the XPDF package:
http://www.sunfreeware.com
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
While the idea/implementation is on the back burner. The experts here contributed to answering your question when and if this project comes to life or is implemented.
Presumably you want the data within the PDF and not so much the formating/layout where pdftotext might be an option to convert the PDF to plain text and have the contents accessible/viewable.
Presumably you want the data within the PDF and not so much the formating/layout where pdftotext might be an option to convert the PDF to plain text and have the contents accessible/viewable.
ASKER
We're putting this issue on the back burner for a while.