comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL 8.2.2 direct graphics output to PDF?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
IDL 8.2.2 direct graphics output to PDF? [message #85044] Wed, 26 June 2013 09:00 Go to next message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
Hi all,

In the past I wrote my IDL graphical output to eps files and converted to pdf using the epstopdf software. It mangles the output somewhat but there was some magic combination of keywords (dependent on which version of epstopdf was installed) which made things look nice.

For various reasons, today I am working on a different computer without epstopdf (and I can't get the same version installed), and using IDL 8.2.2. I have to get some plots as .pdf output without this mangling.

This brochure suggests that I can get direct PDF output in IDL 8: http://www.exelisvis.com/portals/0/pdfs/idl/Slick_IDL_Overvi ew.pdf

However, I'm not sure how to actually *do* it. I am using 'old' (direct) graphics, and again, it's inherited custom plotting/mapping routines that I can't easily make use 'new' (function) graphics (or change to use Coyote Graphics, for that matter). I couldn't find much in the IDL online help. Trying set_plot,'pdf' (as before I would use set_plot,'ps') did not help, throwing an error message saying that device was unsupported.

So... can anyone tell me how to write to PDF directly in IDL 8? Or is it only available via 'new graphics'?

Thanks,

Andy
Re: IDL 8.2.2 direct graphics output to PDF? [message #85045 is a reply to message #85044] Wed, 26 June 2013 09:14 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
AMS writes:

> So... can anyone tell me how to write to PDF directly in IDL 8? Or is it only available via 'new graphics'?

If you want to use direct graphics, I would suggest Coyote Graphics:

http://www.idlcoyote.com/cg_tips/cgoutput.php

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL 8.2.2 direct graphics output to PDF? [message #85046 is a reply to message #85045] Wed, 26 June 2013 09:20 Go to previous messageGo to next message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
The plotting routines we're using are heavily customised and can't easily be replaced with Coyote Graphics equivalents. So I can't use Coyote Graphics for this purpose.

I did try writing to eps and then using cgps2pdf on the output but that did the similar mangling of the plots (probably because it was using the same converter in the innards).

Thanks,

Andy

On Wednesday, June 26, 2013 12:14:04 PM UTC-4, David Fanning wrote:
> AMS writes:
>
>
>
>> So... can anyone tell me how to write to PDF directly in IDL 8? Or is it only available via 'new graphics'?
>
>
>
> If you want to use direct graphics, I would suggest Coyote Graphics:
>
>
>
> http://www.idlcoyote.com/cg_tips/cgoutput.php
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL 8.2.2 direct graphics output to PDF? [message #85047 is a reply to message #85046] Wed, 26 June 2013 09:25 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
AMS writes:

> The plotting routines we're using are heavily customised and can't easily be replaced with Coyote Graphics equivalents. So I can't use Coyote Graphics for this purpose.

Humm. This sounds like...well, nonsense to me. :-)

> I did try writing to eps and then using cgps2pdf on the output but that did the similar mangling of the plots (probably because it was using the same converter in the innards).

The mangling was probably done by the encapsulated PostScript format.
What happens if you just use PostScript output?

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL 8.2.2 direct graphics output to PDF? [message #85048 is a reply to message #85047] Wed, 26 June 2013 09:33 Go to previous messageGo to next message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
Well, when I say "can't easily be replaced" I also have an implicit "within the timeframe I have to accomplish this task"--if only I could go back to the regular machine I use today, where it Just Works. Unfortunately the older I get the more nonsense I realise there is we have to deal with.

Writing output to ps rather than eps (and then converting either with epstopdf or ps2pdf) give the same problem.

The exact same code, with IDL 7.1 and a different version of epstopdf on a different computer, works perfectly. It is just this system that I am stuck with right now where it doesn't. So I am looking for an alternative way to programmatically do this conversion (it's also not just one file but a whole bunch).

Thanks,

Andy

On Wednesday, June 26, 2013 12:25:25 PM UTC-4, David Fanning wrote:
> AMS writes:
>
>
>
>> The plotting routines we're using are heavily customised and can't easily be replaced with Coyote Graphics equivalents. So I can't use Coyote Graphics for this purpose.
>
>
>
> Humm. This sounds like...well, nonsense to me. :-)
>
>
>
>> I did try writing to eps and then using cgps2pdf on the output but that did the similar mangling of the plots (probably because it was using the same converter in the innards).
>
>
>
> The mangling was probably done by the encapsulated PostScript format.
>
> What happens if you just use PostScript output?
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL 8.2.2 direct graphics output to PDF? [message #85049 is a reply to message #85048] Wed, 26 June 2013 09:58 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
AMS writes:

> The exact same code, with IDL 7.1 and a different version of epstopdf on a different computer, works perfectly. It is just this system that I am stuck with right now where it doesn't. So I am looking for an alternative way to programmatically do this conversion (it's also not just one file but a whole bunch).

Well, honestly, this doesn't make any sense at all to me. Nothing
changed in IDL PostScript output. I'm sure epstopdf and pstopdf and
cgPS2PDF are all using GhostScript to do the conversion. There are
certainly version changes in ImageMagick and GhostScript. Perhaps you
were using old, obsolete features in the previous version. Or, perhaps,
you need to update these to more recent versions on the machine you are
using now. ;-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL 8.2.2 direct graphics output to PDF? [message #85050 is a reply to message #85049] Wed, 26 June 2013 10:02 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Well, honestly, this doesn't make any sense at all to me. Nothing
> changed in IDL PostScript output. I'm sure epstopdf and pstopdf and
> cgPS2PDF are all using GhostScript to do the conversion

I really do suspect user error in this case, but if you want to e-mail
the PostScript file to me, I'll have a quick look

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL 8.2.2 direct graphics output to PDF? [message #85051 is a reply to message #85050] Wed, 26 June 2013 10:33 Go to previous messageGo to next message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
Hi David,

Unfortunately, as I posted before, I don't have control over which software versions are installed on the machine I am using today. Would love to go back and use the machines I normally do, but can't right now.

And I agree that it is probably not an IDL issue--but as the IDL 8 brochure I linked advertises pdf output, I thought I should see if there were a way to create my pdf directly from IDL rather than eps->pdf, which may not suffer from this problem.

Thanks,

Andy

On Wednesday, June 26, 2013 1:02:32 PM UTC-4, David Fanning wrote:
> David Fanning writes:
>
>
>
>> Well, honestly, this doesn't make any sense at all to me. Nothing
>
>> changed in IDL PostScript output. I'm sure epstopdf and pstopdf and
>
>> cgPS2PDF are all using GhostScript to do the conversion
>
>
>
> I really do suspect user error in this case, but if you want to e-mail
>
> the PostScript file to me, I'll have a quick look
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL 8.2.2 direct graphics output to PDF? [message #85052 is a reply to message #85051] Wed, 26 June 2013 10:37 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
AMS writes:

> And I agree that it is probably not an IDL issue--but as the IDL 8 brochure I linked advertises pdf output, I thought I should see if there were a way to create my pdf directly from IDL rather than eps->pdf, which may not suffer from this problem.

Yeah, I don't know how they are doing it, but nearly everyone (as far as
I know, eventually gets around to using Ghostscript). I do note that the
function graphics file output is usually a little larger than the
comparable Coyote Graphics output for the same "resolution". I still
don't know how to account for the difference:

http://www.idlcoyote.com/cg_tips/cgwfg.php

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: USGS DEM file geolocation questions
Next Topic: Modify txt file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:45:52 PDT 2025

Total time taken to generate the page: 0.00560 seconds