IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Pity you? Hah! Pity me!
I've just been assigned something very close.
End user downloads an MS-Word template.
They edit it.
Upload it to IIS.
And then my task starts.
Take that file and print it to another file using MS-Word along with SoftCopy print driver.
And then take that output and munge it with a Photoshop macro.
And then take that output and munge it with a typesetting program.
And then hand the file back.
All done on the windows web server box.

So, to start off with, how do I do the Word piece?
I know I can launch word and launch a macro.
But the macro-recorder did not pickup and of the softcopy piece, so I'm kinda clueless.
Got a pointer for me?
New Come up with a new job title that doesn't include that duty
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
New LOL!
--
Steve
[link|http://www.ubuntulinux.org|Ubuntu]
New Shun!
A cola-through-the-nose moment. A fine way to end a Friday!





Damn you, Yendor!
jb4
shrub●bish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

New ACK! I gotta write a dll
[link|http://www.dobysoft.com/products/softcopy/help/index.html|http://www.dobysoft....y/help/index.html]
New That shouldn't be horribly bad
The API is not very extensive. Not only that, it looks like you can use the dll to trigger the photoshop and typesetting stuff using the void scEndOfJob(SCFILEINFO*) function. It looks like something you could hack out in C or C++ in a couple of hours, though that might depend on how the photoshop macro works. I'm not particularly knowledgeable about how photoshop can be automated, so I can't comment on what would be involved in getting that fired up.

Is the typesetting program TeX based?
--\n-------------------------------------------------------------------\n* Jack Troughton                            jake at consultron.ca *\n* [link|http://consultron.ca|http://consultron.ca]                   [link|irc://irc.ecomstation.ca|irc://irc.ecomstation.ca] *\n* Kingston Ontario Canada               [link|news://news.consultron.ca|news://news.consultron.ca] *\n-------------------------------------------------------------------
New Photoshop piece is already taken care of
And I've already done enough the the typesetting piece (not LaTex) to be sure it is doable. I just need to work through the Softcopy automation.
New have you looked at openOffice 2.1 automation?
have no idea but if its open it might be easier to automate.
thanx,
bill
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 50 years. meep
New Nope
We've proven that the MS Word based templating will give us exactly what we want, from an appearance perspective. Which is the primary focus. So everything follows that, and ther other people who have already proven it out cannot be tasked with redoing it. Especially if it meant we would try to force the client to install OO.
New oops, thought OpenOffice could translate $MS word
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 50 years. meep
New Not well enough for me
New Oh too bad
you don't use [link|http://www.apple.com/macosx/features/automator/|macs] as support for this kind of thing is [link|http://www.eweek.com/article2/0,1895,1837625,00.asp|baked] [link|http://www.pdfzone.com/article2/0,1895,1858122,00.asp|in].



"Whenever you find you are on the side of the majority, it is time to pause and reflect"   --Mark Twain

"The significant problems we face cannot be solved at the same level of thinking we were at when we created them."   --Albert Einstein

"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses."   --George W. Bush
New Grrrr
New You got me
I thought what we where doing was fairly painful. What you are going to do is nightmare material.

Jay
New Never
I won't pity you for your pain because I strongly suspect that you like it. :-P

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New OK, I've done SOMETHING like this...
With IE. About 5 years ago. To translate highly IE-specific web pages to pdfs. The same approach might work for you.

I jury-rigged it. Badly.

What I did is had a machine specifically set up for this job. (Careful. Do not touch. Scaffolding may fall down...) By hand I installed the appropriate printer drivers and configured IE to print to a default file using the driver that I wanted. (If anybody chose to print anywhere else, everything would break. I believe that some idiot did this. Once. And was told very sternly never to do that again.) This part was done by hand and was the bit that couldn't be touched without breaking everything. This was because, like you, I couldn't figure out how to get IE to print with the driver I wanted to the file I wanted. But I could configure it to do what I wanted by hand.

I then wrote a Perl server that opened IE, made sure there was no file where it wanted to print, and listened on a port. Every time it received a request it used Win32::OLE to navigate IE to that page. It then used Win32::OLE to tell the page to print. Which meant that it went to that file. The program then collected that file, sent it back over the socket, cleaned up the file, then went listening for another request.

This server tried to start every few minutes. So if something killed it, it would come back up.

Unlike your situation I could make this a batch process. Once a day I figured out which pdfs needed to be re-created, and created them. Then shipped them to the webservers.

Believe it or not, this worked. About 8 months later the idiot developer who wrote the IE-specific HTML in the first place (see my comments elsewhere about "destructive productivity") was finally convinced to rewrite the HTML to be more generic so that we could just run his HTML through the html2pdf utility. (This allowed us to make his code interactive. He took some convincing and there was plenty of grumbling that I should just let the webservers talk live to my jury-rigged box...) I gleefully killed that machine and threw away the code to dissuade people from asking me to do something that stupid again.

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New Need more info.
I've downloaded the word2xxx.pl OLE automation example, which does launch Word and control it a bit.
Where do I find a list of things I can do so I know how to call the proper functions?
New I'm the wrong person to ask about that
You can find some (all?) of it in Word's documentation if you've installed the Visual Basic reference guide.

I remember wandering through some guide on MSDN looking for likely functions. I think I found it by asking a VB programmer where to look. This was 5 years ago, I wouldn't have any hope of finding it again now.

Perhaps some VB people know the answer?

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New OK, done this piece
They had a sample DLL that writes to a specific dir.
I can pickup the new file from there since I can serialize the workflow.
So I execute word with a macro argument to print to the driver and then exit.

     Pity you? Hah! Pity me! - (broomberg) - (18)
         Come up with a new job title that doesn't include that duty -NT - (Yendor) - (2)
             LOL! -NT - (Steve Lowe) - (1)
                 Shun! - (jb4)
         ACK! I gotta write a dll - (broomberg) - (6)
             That shouldn't be horribly bad - (jake123) - (1)
                 Photoshop piece is already taken care of - (broomberg)
             have you looked at openOffice 2.1 automation? - (boxley) - (3)
                 Nope - (broomberg) - (2)
                     oops, thought OpenOffice could translate $MS word -NT - (boxley) - (1)
                         Not well enough for me -NT - (broomberg)
         Oh too bad - (tuberculosis) - (1)
             Grrrr -NT - (broomberg)
         You got me - (JayMehaffey)
         Never - (ben_tilly)
         OK, I've done SOMETHING like this... - (ben_tilly) - (3)
             Need more info. - (broomberg) - (2)
                 I'm the wrong person to ask about that - (ben_tilly) - (1)
                     OK, done this piece - (broomberg)

LRPDman! LRPDman! Does whatever a LRPD can!
112 ms