Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

TCL(Tool Command Language) Scripting

how to produce publishing quality documentation from drawing


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

chewie54 wrote:
> 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.

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

chewie54 wrote:
> 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

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

> 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,

Stphane A.

On May 19, 1:46 am, Stphane A. <stephanearn@yahoo.fr> wrote:

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

On May 18, 10:10 am, Neil Madden <n@cs.nott.ac.uk> wrote:

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

Thank you.
Dan

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.

On May 21, 6:04 pm, "Donal K. Fellows" <donal.k.fell@man.ac.uk>
wrote:

> 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.

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

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

On 22 mei, 05:46, Kevin Kenny <kenn@acm.org> wrote:

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

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.

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc