Re: Inserting pdf file as help in Dislin Widget

94 views
Skip to first unread message

"Armin Rauthe-Schöch"

unread,
Apr 9, 2013, 11:31:49 AM4/9/13
to dislin...@googlegroups.com
Hi Hitesh,

I don't think DISLIN has direct support for displaying PDF files.

One idea would be to create a DISLIN Widget and then use Ghostscript to do the actual rendering of the PDF. You would have to provide PageUp/PageDown buttons in your widget and then use something like:

gs -sDEVICE=x11 -gWidthxHeight --dFirstPage=PageNumber -dLastPage=PageNumber -dNOPAUSE -dQUIET -c quit

where you can get the correct widget ID from getxid().

For Windows the call would be:

gswin32c -sDEVICE=display ....

(see Ghostscript documentation: Use.htm & Devices.htm)


I'm not sure about the correct syntax for the Ghostscript call. In principle your Help widget would to the same as the GhostView & gv clients for displaying Postscript or PDF files.


Good luck and please report back when and how you have solved your problem,

Armin


On 04/06/2013 04:13 AM, Hitesh wrote:
> Is it possible to include *pdf document* in*Dislin Help Widget* or by creating 'HELP' button widget?
>
> If yes, please provide me a part program as an example for the same.
>
> Thanks
> Hitesh
>
> --
> You received this message because you are subscribed to the Google Groups "dislin-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dislin-users...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
Dr. Armin Rauthe-Schöch
Max Planck Institute for Chemistry
Department of Atmospheric Chemistry
Hahn-Meitner-Weg 1
D-55128 Mainz / GERMANY
Tel. +49-6131-305-4123
Fax. +49-6131-305-4009
Email: armin.raut...@mpic.de

Hitesh Priyani

unread,
Apr 9, 2013, 10:07:38 PM4/9/13
to dislin...@googlegroups.com
Thanks bro!!! :-)
if not pdf, I am sure, I can include jpeg or bmp file(having my help content)?
 
Please do me favour of providing an example program for the same, if possible.
 
 

"Armin Rauthe-Schöch"

unread,
Apr 10, 2013, 2:38:02 AM4/10/13
to dislin...@googlegroups.com
Hi,

have a look at this recent thread on this mailing list:
https://groups.google.com/forum/?fromgroups=#!topic/dislin-users/dIbA3F_vKhI

Cheers,
Armin


On 04/10/2013 02:07 AM, Hitesh Priyani wrote:
> Thanks bro!!! :-)
> if not pdf, I am sure, I can include jpeg or bmp file(having my help content)?
>
> Please do me favour of providing an example program for the same, if possible.
>
>
>
>
> On Tue, Apr 9, 2013 at 9:01 PM, "Armin Rauthe-Schöch" <armin.raut...@mpic.de <mailto:armin.raut...@mpic.de>> wrote:
>
> Hi Hitesh,
>
> I don't think DISLIN has direct support for displaying PDF files.
>
> One idea would be to create a DISLIN Widget and then use Ghostscript to do the actual rendering of the PDF. You would have to provide PageUp/PageDown buttons in your widget and then use something like:
>
> gs -sDEVICE=x11 -gWidthxHeight --dFirstPage=PageNumber -dLastPage=PageNumber -dNOPAUSE -dQUIET -c quit
>
> where you can get the correct widget ID from getxid().
>
> For Windows the call would be:
>
> gswin32c -sDEVICE=display ....
>
> (see Ghostscript documentation: Use.htm & Devices.htm)
>
>
> I'm not sure about the correct syntax for the Ghostscript call. In principle your Help widget would to the same as the GhostView & gv clients for displaying Postscript or PDF files.
>
>
> Good luck and please report back when and how you have solved your problem,
>
> Armin
>
>
> On 04/06/2013 04:13 AM, Hitesh wrote:
> > Is it possible to include *pdf document* in*Dislin Help Widget* or by creating 'HELP' button widget?
> >
> > If yes, please provide me a part program as an example for the same.
> >
> > Thanks
> > Hitesh
> >
> > --
> > You received this message because you are subscribed to the Google Groups "dislin-users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to dislin-users...@googlegroups.com <mailto:dislin-users%2Bunsu...@googlegroups.com>.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
> --
> Dr. Armin Rauthe-Schöch
> Max Planck Institute for Chemistry
> Department of Atmospheric Chemistry
> Hahn-Meitner-Weg 1
> D-55128 Mainz / GERMANY
> Tel. +49-6131-305-4123
> Fax. +49-6131-305-4009
> Email: armin.raut...@mpic.de <mailto:armin.raut...@mpic.de>
>
> --
> You received this message because you are subscribed to the Google Groups "dislin-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dislin-users...@googlegroups.com <mailto:dislin-users%2Bunsu...@googlegroups.com>.

Hitesh Priyani

unread,
Apr 10, 2013, 7:34:44 AM4/10/13
to dislin...@googlegroups.com
That's thread created by me itself...
I guess you didn't get my question....
il reframe it... I want use img file(help document) with SWGHLP...
if you can help me  i would be grateful to you.

Armin Rauthe-Schöch

unread,
Apr 10, 2013, 7:47:01 AM4/10/13
to dislin...@googlegroups.com
Hi,

the DISLIN documentation says that "swghlp" can change the TEXT string displayed when activating the "Help" menu entry.

Helmut, is there a way to change the callback routine for the "Help" menu entry to point to a user defined (widget) routine which could then display image files ?


Cheers,
Armin
-- 
Dr. Armin Rauthe-Schöch
Max Planck Institute for Chemistry
Air Chemistry
Hahn-Meitner-Weg 1
D-55128 Mainz / GERMANY
Tel. +49-(0)6131-305-4123
Fax +49-(0)6131-305-4009
Email: armin.raut...@mpic.de

Helmut Michels

unread,
Apr 10, 2013, 7:53:21 AM4/10/13
to dislin...@googlegroups.com
Hi,


Am Mittwoch, 10. April 2013 13:47:01 UTC+2 schrieb Armin:
Hi,

the DISLIN documentation says that "swghlp" can change the TEXT string displayed when activating the "Help" menu entry.

Helmut, is there a way to change the callback routine for the "Help" menu entry to point to a user defined (widget) routine which could then display image files ?


no, the help widget can only display text defined with swghlp, but not an image file.

Best regards,

Helmut
 

Clive Jones

unread,
Apr 10, 2013, 12:14:33 PM4/10/13
to dislin...@googlegroups.com

I too wanted to insert help pages into an application that I developed and this is the solution I came up with (on a windows platform in a Fortran program).

 

Develop help pages as html files and then create a .chm using Microsoft Help Workshop (which is free).

 

On the GUI I added ‘User Guide’ as a menu item along the top bar which when selected calls a callback routine that calls systemqq (in IFPORT) to display the .chm file using the command hh (which is a standard windows exec).

 

Instead of using a drop down menu item an alternative would be to use WGCMD to create a push button to execute the hh command directly.

 

On non-windows systems one could write a simple routine (or use WGCMD) to display the html file directly using Firefox (or your favourite browser).

 

Clive

--

You received this message because you are subscribed to the Google Groups "dislin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dislin-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

This message may contain confidential information and is intended only for the individual named; no part of this email may be reproduced or distributed in any manner without the written permission of Nymad Limited. If you have received this email by mistake please notify the sender immediately and delete this email from your system.
Email transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of this e-mail transmission.

Hitesh Priyani

unread,
Apr 11, 2013, 2:39:49 PM4/11/13
to dislin...@googlegroups.com
Bravo!!!! I hope this works...thanks anyway, dude.....:-)
Reply all
Reply to author
Forward
0 new messages