BiGGA's

2006-Aug-17 - Output anything to Encapsulated Post Script (.EPS)

What a relief!
At last I can export my Visio drawings to EPS.
I have to write this blog before I forgot how to do it.

Since MS remove export to EPS feature from Visio 2003 (it was there in earlier versions), I had to look for a way to get my drawings out of it.
Apparently Visio is the easiest program to draw diagrams.
You can try Inskcape which natively save in SVG and can export to EPS but it is a little clumsy to me.
Especially when you can only export to EPS but cannot open it. -__-

Anyway, since EPS is basically PostScript file which is a prinitng language.
You can simply "print" to EPS file using appropriate printer.
(Yes, just like print-to-file option, but now you got a concrete printing file format.)

So the basic idea is that you draw your illustrations, images or whatsoever in ANY program, then print it out into EPS file.
As simple as that. You need to do a little complicated setup though but dont worry, it is already here.
See the followings..

Install Printer Driver

If you have MS Office installed, follow these procedures.
It will be easy and you will get rather nice output.
  1. On the Start menu, click Printers and Faxes.
  2. Under Printer Tasks, click Add a Printer.
  3. Follow the instructions in the Add Printer Wizard.
  4. Under Local or Network Printer, select Local printer attached to this computer, and then make sure that Automatically detect and install my Plug and Play printer is cleared.
  5. Under Install Printer Software, click Have Disk.
  6. In the Install From Disk dialog box, click Browse, and then navigate to Program FilesMicrosoft OfficeOFFICE11 on the drive where you have installed Microsoft Office.
  7. Select the file MSCOL11.INF, and then click Open, and then click OK.

Windows XP will install the printer driver Generic Color PS for Commercial Printing.

(Above procedures I took from http://office.microsoft.com/en-ca/assistance/HP062079971033.aspx, in case they wanna sue me from stealing their contents.)

We will get to further instruction later.

If you dont have Office installed, you gotta download the driver from Adobe.
(Dude, you are really an Open-Source freak, huh? Then you might be able to help yourself already.)
Anyway, you can download the driver here: http://www.adobe.com/support/downloads/pdrvwin.htm
Run the installation file and you will get you printer driver.

Adobe driver looks jaggy and pixelic so I prefer MS driver over Adobe though.

Setup the Printer Driver

Printer driver is set to print to "Optimized for Speed" PostScript file by default.
This is not what you want.
You wanna output it to EPS.

You can change this by going to Printers and Faxes then select your printer properties.
Then in the properties, click Advanced..
Then go to Document Options -> PostScript Options -> PostScript Output Option.
Select Encapsulated PostScript (EPS).
Done.
You can setup the property before you print as well.
(You know, click Print.. in your program then Properties.)
But if you do that, you will have to do the setting everytime.
To make the EPS default, you gotta go to Printers and Faxes option in Control Panel.
Furthermore, you gotta do this setting in both MS or Adboe driver.

Up to this point you can print to your file now.
When you select your PS printer, and print with it, you will see a little dialog asking you where to print to.
Here you write down the file name with full path to it.
Thats it, you got your EPS file!

Setting Up EPS Image Dimension

No, it is not over yet, at least not for LaTeX user.
The printed file does not contain correct printing size or image dimension.
See, every EPS file contains this "size" field suggesting how large the image is.
When you simply print with your program, Visio for instance, this size will be set (I think) to the page size.
What you need is the size of your drawing, not the whole page.
Otherwise you will get large picture with edge as large as A4 and it will be conflict your PS document.

To get the correct size automatically, you can use OLETex package.
Download it here: http://sourceforge.net/project/showfiles.php?group_id=41393.
Unpack the downloaded file into your preferred directory and run the OTEditor.exe

To use, simply copy the objects in your drawing program and paste them into OTEditor.
The program will ask for the size, you can leave everything as it is.
Simply set the name of the image because it will be your EPS file later
And from OLETex, in the menu OLETeX, select Convert Current.
Thats it, you got your EPS file. Now with correct dimension.
Oh, where is your file? You can set the directory where it should save the file at Option->Conversion Setting.

Mind that you need to draw the picture with correct size at the first place.
Otherwise it will not work. There is no "fit-to-page" option here.

Alright. I hope you enjoy your EPS now.
Mail me if you have any question.


Further readings (you dont have to read them though, I sum it all up already.)
http://www.synergy.com/exporteps.htm
http://office.microsoft.com/en-ca/assistance/HP062079971033.aspx
http://wiki.lyx.org/Windows/WinGraphics

Required Files
MS Printer Driver: It is in your Office directory, dude.
Adobe Printer Driver:
http://www.adobe.com/support/downloads/pdrvwin.htm
OLETex:
http://sourceforge.net/project/showfiles.php?group_id=41393
Comments (0) :: Permanent Link

2006-Jul-17 - Doctor Thesis

Two weeks ago my prof wanted me to get him my first thesis draft.
It should contain the thesis struture (e.g. table of contents), problem statements and potential solutions and indeed current state-of-the-art.
Well, I wish I have everything at hand but I dont.
Especially the state-of-the-art. One needs to review current solutions to the problems and, dude, there are lots of them.
I need to read and summarize them in my thesis.
That would be really painful.

Petr's professor, Prof. Brügge at TU-München, said
'When you complete Abitur (i.e. German high school thing), you might think you know everything.
When you complete your Dimplom, i.e. Master, you would think you know nothing.
But by the time you finish your Ph.D., you will think others know nothing!'
That is, you need to see what others do and disect them.
See what they are doing and recognize their pontentials and of course, weak points.
Then, they will call you doctor, the expert in your tiny research universe.

Anyway, while I have several papers to read, I also need to relearn LaTeX and BibTeX.
It would be much much easier than to write with the famous MS Word.
However, I dont have (legal) version of EndNote and document structuring in MS Word is clumsy.
So, LaTex would be it.

If you wanna use LaTex which I suggest you should, especially when you wanna write your Master Thesis, I suggest the book "LaTeX: A Document Preparation System (2nd Edition)"
http://www.amazon.com/gp/product/0201529831/sr=8-1/qid=1153138640/ref=pd_bbs_1/002-4440043-8089667?ie=UTF8
It is short and compact and get you ideas how to write in LaTex - quickly.
It also includes LaTeX and BibTeX references which I find it useful.

Here are some nice short and useful BibTeX site:
http://web.reed.edu/cis/Help/BibTeX.html
http://www.ecst.csuchico.edu/~jacobsd/bib/formats/bibtex.html

By the way, for those who dont know what I am talking about BibTeX is a Bibliography database system.
It works perfectly well with LaTeX. You will be able to generate nice bibliography on the back of your document and nice references to the items in your bibliography from your text.
The reference will be taken care of by both LaTeX and BibTeX.
Read the site above for more details!

Now I gotta get back to the papers in front of me.
Comments (0) :: Permanent Link

2006-Mar-9 - _WSPIAPI_COUNTOF

I tried so many times to compile WinPcap with the classical VC++ 6.0
At last, I can manage to get it through...with lots of effort.

Somehow compiling WinPcap raised a conflict in wspiapi.h (which of course released by MS).
According to a website or mailing list, these preprocessor definitions must be added into the project preperties: _WSPIAPI_COUNTOF and WPCAP.

Everything was fine until I migrate to MS Visual Studio 2005.

That _WSPIAPI_COUNTOF option has to be taken off!!

Why? How the hell could I know? I don't even know what it is.
All I know is that not Pcap library nor my code has anything to do with it.
MicroSuck did everything and create their own problems.
Correct me if I am wrong here. I really wanna know what the hell is this _WSPIAPI_COUNTOF
thing.

This migration is relatively easy though.
I manage to compile the code without huge problems except the deprecation warnings.
The old classical (and problematic) C functions such as strcpy, strtok, fopen, etc. has to be changed to newer functions. Most of the time they have the same name as their descendant with "_s" behind.
To my understanding, the original C string type which is nothing more than array of character with "" is the source of virtually all these buffer and stack overflow problems.
Well they should, why the hell do we need null-termination anyway.
Such a nonsense design.

There are still some problems. Let's see if I can get through.
Comments (1) :: Permanent Link

2005-Nov-8 - Swimming in a Sh!t Pool

Sh!t Pool is a place where you find sh!t.
Swimming in there means no matter which way you go, you see sh!t.
Sh!t all over.

They hire me to clean up this mess.
To solve the problem no one ever solve before.
And they call it Ph.D.

Well, it is fine with me though.
Solving problem? Fine, I like it.
After a while I realized sth:
The real problem of solving problem is I dont know how to solve it.

Furthermore, one problem you solve, you face new ones.
Hence, sh!t pool.
No matter which way you swim, you see sh!t.
Ultimate, solve-them-all solution is yet to be found.
Long way to be found.

My supervisor call it Padora's box.
The box which Pandora has opened and all the evil, pain and suffer came out.
The last which came out after suffering is hope.
The Greek said men know hope after they suffered.
Well, why do you hope if you do not suffer from the pain?
Comments (1) :: Permanent Link

About Me

Hi, this is BiGGA. I am now doing Ph.D. in Munich Germany with the falling BenQ Mobile GmbH. This blog I plan to talk mostly about my work and how I am doing it. (Indeed, including my complaints about how stupid it is.) So it would be mostly technical solutions to some stupid problems I see along the way to solve bigger problems. The bigger problems themselves I am not allowed to post here though. All those "company's secrets", you know.

«  January 2009  »
MonTueWedThuFriSatSun
 1234
567891011
12131415161718
19202122232425
262728293031 

Friends




Power By : BlogKa.com - Free Blog Hosting