Home > Archive > Tcl > May 2007 > how to produce publishing quality documentation from drawing
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
how to produce publishing quality documentation from drawing
|
|
| chewie54 2007-05-18, 7:09 pm |
| 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 2007-05-18, 7:09 pm |
| 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
| |
| Bryan Oakley 2007-05-18, 7:09 pm |
| 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
| |
| Stéphane A. 2007-05-19, 8:06 am |
| > 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=E9phane A.
| |
| Donal K. Fellows 2007-05-21, 10:09 pm |
| 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 2007-05-21, 10:09 pm |
| On May 21, 6:04 pm, "Donal K. Fellows" <donal.k.fell...@man.ac.uk>
wrote:
> chewie54 wrote:
>
> 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
| |
| Kevin Kenny 2007-05-22, 8:08 am |
| 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 2007-05-23, 4:27 am |
| On 22 mei, 05:46, Kevin Kenny <kenn...@acm.org> wrote:
> chewie54 wrote:
>
>
>
> 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 2007-05-23, 8:08 am |
| 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.
|
|
|
|
|