Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to produce publishing quality documentation from drawing

9 views
Skip to first unread message

chewie54

unread,
May 18, 2007, 9:44:37 AM5/18/07
to
Hello,

How would one generate publishing quality documentation outputs from a
program that draws like block diagrams using Tk?

I know you can generate postscript files but I need a solution that
can be displayed and printed from MS Word ( yuck ). The only thing I
can think of is to generate high resolution image files but I'm not
sure that is the right thing to do.

Thanks in advance.
DJF

Neil Madden

unread,
May 18, 2007, 10:10:53 AM5/18/07
to

You can run the postscript through GhostScript to convert it to a
variety of formats. Perhaps one of those will do? I'm quite surprised
that Word can't handle encapsulated postscript, though.

-- Neil

Bryan Oakley

unread,
May 18, 2007, 12:18:40 PM5/18/07
to

There is an extension called ratfink that can generate RTF. I had a
modicum of success using it quite some time ago.

There's also the commercial "pdflib" which can be used to create PDFs.
Word, though, can't read PDF (can it?). There was also something called
"trampoline!" that promised to take a canvas and convert it to PDF, but
I personally didn't have much luck with it.

Neither one is smart enough to take a canvas or text widget or whatever
and automagically create the document.

ratfink: http://www.flightlab.com/cost/ratfink/ratfink.html


--
Bryan Oakley
http://www.tclscripting.com

Stéphane A.

unread,
May 19, 2007, 1:46:57 AM5/19/07
to
> There's also the commercial "pdflib" which can be used to create PDFs.
> Word, though, can't read PDF (can it?). There was also something called
> "trampoline!" that promised to take a canvas and convert it to PDF, but
> I personally didn't have much luck with it.

Neither did I have luck with "trampoline!", but I have created charts
with "pdf4tcl": http://truckle.in-chemnitz.de/pdf4tcl/pdf4tcl.html
I had no problems with this library, which is free, open-source,
and does not require a compiler to run, as it is written in pure-tcl.

My charts were very simple, but they contain some text.
"pdf4tcl" provides basic functionalities, but it is reliable.

Good Luck
Cheers,

Stéphane A.

chewie54

unread,
May 21, 2007, 2:09:06 PM5/21/07
to

This looks like a good solution for pdf documents. Its to bad Word
doesn't display pdf graphics. That would simplify things for me.
Even postscript or encapsulated post script would be great but MS Word
doesn't seem to want to display these formats but does print
them. I did look around for graphic filters for Word but didn't find
any.

Thanks for your advice.
Dan

chewie54

unread,
May 21, 2007, 2:11:16 PM5/21/07
to


GhostScript, I didn't know that. That might be a way to get what I
want.


Thank you.
Dan

Donal K. Fellows

unread,
May 21, 2007, 6:04:59 PM5/21/07
to
chewie54 wrote:
> I did look around for graphic filters for Word but didn't find any.

I believe Visio will do the conversion. But I don't have a copy of it
so I can't confirm.

Donal.

chewie54

unread,
May 21, 2007, 7:26:54 PM5/21/07
to
On May 21, 6:04 pm, "Donal K. Fellows" <donal.k.fell...@man.ac.uk>
wrote:


But I think the problem is that Visio saves it at the display
resolution. I need to save it as a 300 or 600 DPI image so it looks
and prints like a high resolution quality picture in MS Word.
Ghostscript does all the user to change the DPI settings for the
image.

The problem I think then is that is not scalable but this is the best
you do in Word. It would be great if Word displayed and printed some
scalable vector drawing format like pdf, ps, eps.

I'm really trying to come up with a good way of technical
documentation using Word that includes lots of block and timing
diagrams for chip specifications.

All thoughts on this subject are welcome and appreciated.

Thanks,
Dan


Kevin Kenny

unread,
May 21, 2007, 11:46:51 PM5/21/07
to
chewie54 wrote:

> The problem I think then is that is not scalable but this is the best
> you do in Word. It would be great if Word displayed and printed some
> scalable vector drawing format like pdf, ps, eps.
>
> I'm really trying to come up with a good way of technical
> documentation using Word that includes lots of block and timing
> diagrams for chip specifications.
>
> All thoughts on this subject are welcome and appreciated.

It's horrible - but the best answer that I can come up with off
the top of my head is to use the wmf extension
(http://www.schwartzcomputer.com/tcl-tk/tcl-tk.html - look for
'wmf') to open a graphic context on a Windows metafile,
then use the 'gdi' extension on the same page to draw into
it.

If you wanted to get really ambitious, you could drive the
thing by walking the display list of a canvas. If you do
take that on, *please* post the code somewhere - lots of
the rest of us could use it!

--
73 de ke9tv/2, Kevin

Arjen Markus

unread,
May 23, 2007, 4:36:35 AM5/23/07
to
On 22 mei, 05:46, Kevin Kenny <kenn...@acm.org> wrote:
> chewie54 wrote:
> > The problem I think then is that is not scalable but this is the best
> > you do in Word. It would be great if Word displayed and printed some
> > scalable vector drawing format like pdf, ps, eps.
>
> > I'm really trying to come up with a good way of technical
> > documentation using Word that includes lots of block and timing
> > diagrams for chip specifications.
>
> > All thoughts on this subject are welcome and appreciated.
>
> It's horrible - but the best answer that I can come up with off
> the top of my head is to use the wmf extension
> (http://www.schwartzcomputer.com/tcl-tk/tcl-tk.html- look for

> 'wmf') to open a graphic context on a Windows metafile,
> then use the 'gdi' extension on the same page to draw into
> it.
>
> If you wanted to get really ambitious, you could drive the
> thing by walking thedisplaylistof a canvas. If you do

> take that on, *please* post the code somewhere - lots of
> the rest of us could use it!
>

An easy way to walk the display list is:

foreach item [$canvas find all] {
... get the properties of item $item ...
... do whatever is needed ...
}

[$canvas find all] returns the indices of the displayed items
from the lowest to the highest. (I do not know if this is
actually guaranteed, but in experiments it turns out to be the
case)

Regards,

Arjen

Donal K. Fellows

unread,
May 23, 2007, 8:31:37 AM5/23/07
to
Arjen Markus wrote:
> [$canvas find all] returns the indices of the displayed items
> from the lowest to the highest. (I do not know if this is
> actually guaranteed, but in experiments it turns out to be the
> case)

Actually, it's from from upper-most (in Z-order) down. Guaranteed.

Donal.

0 new messages