Thursday, August 30, 2007

Text to Postscript in JAVA

Refference from http://www.java2s.com/Code/Java/2D-Graphics-GUI/TexttoPostscript.htm
this is an example code that write in JAVA to canvert from string to PostScript format.

Monday, August 27, 2007

Wednesday, August 22, 2007

Virtual hosting with IIS on Windows Server versions

The method to create virtual host for IIS follows link below
http://www.simpledns.com/kb.aspx?kbid=1149

Install ASP.NET to IIS

After you install IIS and .NET Framwork
you must do this
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -i
After that you can run aspx page on your server.

Tuesday, August 21, 2007

Virtual Host for Apache

file httpd.conf

NameVirtualHost 127.0.0.1

DocumentRoot C:/AppServ/www
ServerName test1.com

allow from all
Options +Indexes



site name is test1.com

edit file host in
C:\WINDOWS\system32\drivers\etc\
add your site name such as
127.0.0.1 test1.com

Wednesday, August 1, 2007

JAVA Printer vs Customize Paper Size

How to printing in my paper size?
If you want to print to your custom paper size, you can custom in your java code(Paper Class or findMediaSize() method), but if the custom size does not in the standard paper sizes, Printer API will select the nearly paper size from standard sets(height must more than width forever).
According above, it can't completely when your paper isn't in standard size sets. You can do this to add your paper size to standard sets
in this case my OS is Windows XP
goto -> Printers and Faxes -> File -> Server Properties (in this dialog you can add your paper)

After you do that, the Printer API will see your paper in standard sets but paper height must more than width forever.