Browsed by
Month: August 2013

Xml to Pdf in java using iText Sample code

Xml to Pdf in java using iText Sample code

Xml to Pdf: We can convert any xml file to pdf in java using iText lib. Required Jar Files: Xml to Pdf Required Jars Xml File: <?xml version="1.0"?> <XMLtoPDF> <Friend> <FriendName>Hemakumar</FriendName> <FriendPlace>Arcot</FriendPlace> </Friend> <Friend> <FriendName>Chudar</FriendName> <FriendPlace>Vellore</FriendPlace> </Friend> <Friend> <FriendName>Selva kumar</FriendName> <FriendPlace>Arcot</FriendPlace> </Friend> </XMLtoPDF> Xsl File (stylesheet for the above xml): <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/> <xsl:template match="/"> <html> <body> <h2>Xml 2 Pdf in Java Using iText</h2> <table border="1"> <tr bgcolor="skyblue"> <th align="left">Friend's Name</th> <th…

Read More Read More

6,627 total views, 2 views today

Train Route Java Program

Train Route Java Program

Now you can get the train route information by simply inputting train number to the below program, Requirement: Jsoup jar Train Route Java Program: package in.javadomain; import java.io.IOException; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; public class TrainRoute { public static void main(String[] args) { TrainRoute tr = new TrainRoute(); System.out.println(tr.getTrainSchedule("12635")); } private String getTrainSchedule(String trainNumber) { String trainRoute = null; String trainUrl = "http://www.indianrail.gov.in/cgi_bin/inet_trnnum_cgi.cgi"; try { Document trainRouteDetails = Jsoup.connect(trainUrl).timeout(0) .data("lccp_trnname", trainNumber).post(); String parsedTrainNumber = "Train No:" + trainRouteDetails.select("table.table_border_both") .select("tbody").select("tr").get(1).select("td") .get(0).text() +…

Read More Read More

1,055 total views, no views today

Domain availability Java program

Domain availability Java program

Requirement: Register in the Freedomainapi.com for api key, of course its free. Once you got the apikey replace in the below program and run. Requied Jar file: Java Json Jar Domain Availability Java program: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import org.json.JSONException; import org.json.JSONObject; public class DomainCheck { public static void main(String[] args) { DomainCheck dc = new DomainCheck(); String apikey = "XXXXXXXXXX"; String isEnteredDomainAvailable = dc.getDomainAvailable("fforfriends.com",apikey); System.out.println(isEnteredDomainAvailable); } private String getDomainAvailable(String domainName,String apiKey) { String…

Read More Read More

644 total views, 1 views today

Mtc Bus Route java program

Mtc Bus Route java program

Mtc Bus Route Java program: Input – Bus Number. Eg: Input – 27B. Java program: import java.io.IOException; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; public class mtcRoutes { public static void main(String[] args) { mtcRoutes mr = new mtcRoutes(); String mtcBusDetails; try { mtcBusDetails = mr.getMtcRouteInfo("15B"); System.out.println(mtcBusDetails); } catch (IOException e) { System.out.println("Server may be down or busy"); } } public String getMtcRouteInfo(String busNumber) throws IOException { String routeInfo = null; String mtcRouteUrl = "http://www.mtcbus.org/Routes.asp?cboRouteCode=" + busNumber + "&submit=Search";…

Read More Read More

994 total views, no views today

Wallscript 6.0 for free

Wallscript 6.0 for free

Hello All, If you want wallscript 6.0 kindly contact me and I will send to your email Id. What is Wallscript 6.0 ? Wallscript is a web application which is similar to facebook. If you are planning to host a site like facebook or twitter then wallscript will be your solution. Can I host this directly ? Yes, once I receive your mail, I will send you the zip file, then you can host it directly by simply doing some…

Read More Read More

1,994 total views, no views today

javax.xml.transform.transformerconfigurationexception could not compile stylesheet java

javax.xml.transform.transformerconfigurationexception could not compile stylesheet java

Error: javax.xml.transform.transformerconfigurationexception could not compile stylesheet java solution workded for me is, previously, [plain gutter=”0″] <xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> [/plain] but it has to be, [plain gutter=”0″] <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> [/plain] 652 total views, no views today

652 total views, no views today

Html to Pdf in Java using iText

Html to Pdf in Java using iText

Required Jar filess: Html to Pdf Required Jar Files Program: package in.javadomain; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import org.xhtmlrenderer.pdf.ITextRenderer; import com.lowagie.text.DocumentException; public class Html2Pdf { public static void main(String[] args) throws IOException, DocumentException { // Specify the input html file location String htmlInputFileUrl = "D:\\javadomain.html"; String url = new File(htmlInputFileUrl).toURI().toURL().toString(); // specify the output pdf file location String htmlToPdf = "D:\\Javadomain.pdf"; System.out.println("Pdf file created successfully in "+url); OutputStream os = new FileOutputStream(htmlToPdf); ITextRenderer renderer = new ITextRenderer();…

Read More Read More

953 total views, no views today

Domain name suggestions for social networking website

Domain name suggestions for social networking website

Hi Herewith you can find many domain name suggestions for social networking website and all the domains mentioned here are at available stats as on 14th Aug 2013, [plain gutter=”false”] chatzchen.com kerkuts.com facemand.com fogbook.com subfaces.com facetray.com facetace.com facetata.com facetice.com gilfaces.com facewel.com facemeal.com facerday.com facedone.com facetrim.com facetric.com fundians.com cfacebook.com infarewell.com ninethbook.com ninthbook.com lazyhunt.com mochahunt.com justtwit.com twitlazy.com jovialbook.com pleasantbook.com funstromers.com inaipu.com friendsgalli.com tweetsplanet.com tweetsgalli.com logiclazy.com logicfaces.com twitsaga.com rallyjoy.com funlazy.com friendsurl.com fireoffriends.com friendsoffire.com friendsrecall.COM bookoffriend.COM a2zfriends.COM atozfriend.COM a2zfriend.COM boundingfriends.com friendsoverlfow.com hopefriend.com addnewfriend.com macofriends.com…

Read More Read More

754 total views, no views today

Javadomain Released Free Mobile Operator API

Javadomain Released Free Mobile Operator API

Hello All, As requested by many users/subscribers/followers/fans Javadomain finally released the beta version of Mobile Operator API. Mobile Operator API URL: http://agnmobileapiu.appspot.com/mobileoperatorapi?mobile=9943 Output: TAMILNADU – VODAFONE (HUTCH) App By Javadomain.in What is not there ? As the request having only first 4 digits we are not able to provide the MNP (mobile number portability) numbers operator correctly. Is is Free ? Yes, Its free and you can use it for personal/commercial use. Do you need any customized output ? If…

Read More Read More

683 total views, 1 views today

How to create a mobile recharge website ?

How to create a mobile recharge website ?

How to create a mobile recharge website ? Hi All, After lot of browsing, surfing and googling I have found the way to create the online recharge website. I have also created a readymade recharge script to help anyone to start their online recharge business like paytm and freecharge without any of these below steps.   Few of our recent online recharge script customers: Payfaa Recharge Earning RechargeVilla Payushop One Hublead Fill My Bill   Here are the steps, 1….

Read More Read More

8,648 total views, 2 views today