LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   octave: printing figures as postscript text and blank pages (https://www.linuxquestions.org/questions/linux-software-2/octave-printing-figures-as-postscript-text-and-blank-pages-4175558327/)

adrianmariano 11-08-2015 11:36 AM

octave: printing figures as postscript text and blank pages
 
I'm trying to print a figure from Octave 4.0.0 and when I issue the command "print" my printer prints a postscript header and then starts spewing blank pages.

If I print to a file (e.g. with "print('test.pdf')" and then print the resulting pdf file with "lpr test.pdf" from the command line then it works fine. I also tried "print('test.ps')" followed by lpr from the command line, and that works too.

So what is octave doing to force the postscript to be misinterpreted and how can I fix it?

Printing is being handled by cups as normal, and I have an HP Inkjet (8610) printer.

bigrigdriver 11-09-2015 09:31 AM

Using the famous (infamous?) WAG method (Wild Assed Guess) of problem resolution, I came up with this:
a. your printer doesn't have a PostScript interpreter for printing PostScript files.
b. you need to usa a work-around to print the file. You have already discovered one such; convert to pdf then print. Pleas see http://www.tldp.org/HOWTO/Printing-Usage-HOWTO-3.html, section 3.2 for more information on using GhostScript to translate PostScript for printing on most printers.

I hope this works for you.

adrianmariano 11-09-2015 09:44 AM

Printing postscript works fine from the command line for me in general. I've been doing it with various other postscript sources. Also if I print from Octave as postscript and send the postscript file to the printer it prints correctly. In other words, it's not the use of PDF that fixed things but the separate transmission to the printer from the command line. I did also try "print -dpdf" from Octave and it sends something to the printer (the printer makes noises) but nothing prints. So it doesn't seem that switching to pdf is the magic answer.

My WAG would be that somehow Octave is bypassing the mechanism that causes the print service to properly translate the data from the incoming format to a form understood by the printer.


All times are GMT -5. The time now is 12:58 AM.