gettinig PDF form field names

If you have a PDF and want to fill the pdf programmatic-ally, You can but you need those pdf’s form fields.

Here’s a simple Java Class which can help you. I am using iText as my PDF library.

import java.util.HashMap;
import java.util.Iterator;
import com.lowagie.text.pdf.*;

public class iTextSample {
public static void main(String[] args) throws Exception{
PdfReader reader = new PdfReader(“/Users/Admin/Public/jars/a.pdf”);
boolean test = reader.isEncrypted();

System.out.println(test);

AcroFields form = reader.getAcroFields();
HashMap fields = form.getFields();
System.out.println(“Total Fields: ” + fields.size());
String key;
for (Iterator i = fields.keySet().iterator(); i.hasNext(); ) {
key = (String) i.next();
switch(form.getFieldType(key)) {

case AcroFields.FIELD_TYPE_TEXT:
{
System.out.print(key + “: “);
System.out.print(“Text”);
System.out.print(“, At Page:” + form.getFieldItem(key).getPage(0));
System.out.println(“, at tab:” + form.getFieldItem(key).getTabOrder(0));
}
break;

}
}
}
}

Does outsourcing reduce quality? A self observed study

This year I sat for my UK and US visa both from the same city i.e Kolkata(Calcutta). From a general management perspective, there are some points I observed between the processes each country’s consulate has adopted which I’d like to share and ask you a question in the end.

  • Both countries have outsourced their visa application processes to a company called VFS Global. VFS Global is a commercial company, working in partnership with the border agency & high commission of UK and US to provide Visa services. This company handles Human Resource, paper work.
  • UK had outsourced almost 90% of its visa processing whereas US has outsourced around 45%.
  • The fee is collected in Indian Rs and most highest price of the exchange rate is taken into account.
  • Fee collection is via banks. VSF UK visa has collaboration with a few banks but only some branches. VFS-US-Visa has collaborated with HDFC bank only at many branches throughout the country. Banks charge their own service fees and tax.
  • US has their own infrastructure for the Interview inside the consulate office premises but for UK its not. In Calcutta , they have purchased some office and handed over to VFS Global.
  • UK biometric takes fingerprints and retina scan.US biometric takes only fingerprints.
  • UK visa may have a personal interview but for tourist etc. its not needed if the documents are satisfactory. US visa has a personal interview mandatory for all visa application.
  • VFS Global has more control over UK visa. Their interview center has a security check but things like mobiles etc are allowed. For US, no electronics are allowed and no sealed envelops.
  • UK visa can provide Photograph on Demand, Photocopies on Demand all good facilities for the applicant. NO such things available in US visa office.
  • UK visa center is quite commercial with people selling matrix calling cards and study loans etc. Full of banners everywhere. Nothing allowed at US visa office.

Overall, from my point of view. UK had something extra and missing than US and vice-versa.

Does outsourcing reduce quality? I leave it upto my readers to decide!

Don’t BUY HP LAPTOPS In INDIA. PERIOD.

EDIT: I found this most suitable.

Some years ago I got a laptop from HP. The irony is that my laptop was used by HP service center more than me!

The following email screens will explain what kind of Customer Help is provided by the so called MNC Hewlett-Packard!

Picture 4

So I didn’t receive any reply, No calls! After 8 days, I wrote another email to them!

Picture 5

As soon as I sent this email, I got a call from the service center!

Picture 6

And so I went the to the service center and collected my laptop. But I made sure if the Director Mr. Chintamani Lele knew this. So I wrote this email to him

Picture 7

Immediately Mr. Chintamani Lele from Vintech replied !!

Picture 8

And so the HP guys take it from here and NO one replied for 13 days! Which made me send them another email as below:

Picture 9

After 4 days from the email above, I got a reply from Sanjay Kumar, HP India Sales saying the below:

Picture 10

Immediately I asked him and ETA to which he replied Next Monday!

Picture 11

But its already passed Monday! And no reply yet. So I shoot out another email!

Picture 12

And on 23rd Sept, I get this in reply! Should I laugh or cry?! The guy was on leave until 21st and still on leave on 23rd! Wow HP!

Picture 1

Chinese People

There is a strange yet fascinating feeling whenever I come across Chinese people. Their overall personality, aroma, the way they carry themselves , the hard work they do, their laziness — Almost everything!

Kolkata, my hometown has been a home for the Chinese since long ago. Its the only city in India to have a Chinatown and I have good Chinese friends too! Even my sister has a best friend who is Chinese! I just love Chinese food so much!

My dad deals with China day-in day-out with his import/export business. Moreover I went ahead and did a Chinese crash course! I even visited China in April 2009!

Chinese people are very fragile and delicate in looks but too strong mentally. They are workaholic(most of them) and hardworking. May be this is the reason why China is the GOD of manufacturing. While I was in China , I found products which were so cheap no Indian company could afford to make. The high availability of manpower and poverty has made China a hub of manufacturing!

I was once in an Autobus in Kolkata where I came across a chinese girl who worked at a call center. She was highly sophisticated and resembled the actual people in China. Too fashionable! From head to feet. Colored hair, imitation jewelery, state of the art footwear and what not!! Chinese people love fashion, they get bored with old ones too quickly and want new things coming up as soon as they can! When you go and buy a chinese product, the quality will be too low but it will be a unique and stylish one. Take for example Chinese mini f ans or Chinese watches or mobile phone or rather many plastic products from China. They are quite fashionable but fragile.

Not to forget I got myself an IPHONE Clone phone. It looks exactly same! I got it for US$80 only. Its a usable phone with 2 batteries, charger, earphones and iphone(designed in california) box! It was just so tempting I took it!

In India, Chinese community is treated very separately. A friend of mine was not allowed to even attend Indian IDOL audition as he was Chinese. No reasons specified! They mostly adopt Christianity but rarely go to Church(correct me if I’m wrong!) , they visit Chinese & Buddhist temples and celebrate Chinese new year as their main festival. The elder generation Chinese in India have shops of Shoes Manufacturing , Restaurants and Beauty parlors.  One of my very good friend’s family is associated with all three. But the younger generation is job oriented. They prefer instantly high paying jobs than good old business.  Some move out of India to Taiwan , Canada and Australia but not to Mainland China.

They have very well accepted Indian culture. Indian communities have a mix bag of relations. Some accept them, some treat them as aliens. But one must remember, even though they look different, I know they are all Indians by heart..

J2ME : Virtually end of life

J2ME has virtually reached its end of life. Not because there are no projects in the market. There are still projects even for vb6(1998 release) but the mobile software development has almost changed all software development paradigms.

There are many factors why J2ME is not as popular as Iphone apps. I learned J2ME first(year 2000), then Java SE and then Java EE. J2ME was very easy and didn’t need much java knowledge as it was the most simplest forms of applications one could have. So why’s it dying. Because of its simplicity.

Here are some reasons why Java Mobile Edition is dying out.

1. Simplicity: J2ME was too good for apps having 128KB of memory. As years passed by, memory became cheaper by the day but J2ME feature list didn’t grow up well. I believe that at some point of time, if resource availability is more then we could enhance some good features. But nah! J2ME kept doing little enhancements while hardware jumped faster.

2. Limited availability: Even though it was Java, the component set it provided were too simple. With just a dozen component set and a few layouts one cannot keep up. There are still a few options for providing more components via J2ME Polish, but Polish is a 3rd party tool.

3. Change: J2ME didn’t change or addin more features. Rather I would say the community was really slow in developing more components. Most experts were busy in developing enterprise solutions. Custom components were made but not released as open source. Sun & J2ME polish were the only one who were publicizing WTK. Blackberry’s RIM (Research in Motion) may be doing it indirectly to promote their handsets. But they themselves included a lot of API which were through J2ME but native to Blackberry handsets only — Smart! But I feel they were caught up with this technology and now they cannot get rid of it. But what can I say, RIM was a new company trying to make its mark in the market so they had a good choice of adapting an existing technology rather than creating and SDK for their own apps. Remember RIM is not Apple..!

4. Integration: J2ME had a great IDE with Netbeans only. Larger audience who uses eclipse didn’t have the best IDE which netbeans has. Drag n Drop etc were available much later and still with limited functionality. In fact I would say the flow designer of Netbeans is much much powerful and can give a good competition to Iphone SDK in terms of mobile app flow.

5. New replaces the old: Windows Mobile came in as all smart phone which took a lot of enterprise market. It had easy drag n drop VB6 style programming which made it easy. Years 2002-2006 enterprise market was ruled by smartphones having windows mobile or CE etc. Even now many shipping company, restaurants etc prefer windows based solution. Remember Blackberry was famous in the industry as a personal usage smartphone for its business services and not for its 3rd party application. Now when Iphone has come in, the market is flourishing with projects on iphone!

6. Android bug: Lastly most J2ME developers knowing Java are migrating to Android platform which is completely java based. Even the new ones. They want to build up a career in Android and not in J2ME!

So if someone asks me what’s the future of J2ME? I would say its a ship with a torn sail! The technology needs a complete revamp. Polish should be integrated as a native support. Better IDE which competes with other products’ IDE. It definitely needs much better SDK support.

And whose going to do it? Let the community decide!

Joining a startup?

There are two types of people in the world. One who can only do a job whole life. Others who can never tolerate a job. I am the latter. Where do you belong?

Most people don’t join a start up because of a very basic reason. The risk factor.

In the beginning its all very exciting and fascinating to call yourself a CEO or Management level post. Not necessary that you’re qualified for that!

But joining a start up isn’t something alien. The following are some points which I will share out of my experiences.

The Fear Factor: Have a mentality to convince dependents. Most Indian middle class families are job oriented. Parents prefer their children to secure a good if not high paying job and a good life than themselves. Government job in India is most secure and most boring. So where’s the challenge and excitement? NONE!

The Indian society is divided into two main sections. Families and social network which has very high regard towards a job. In most bengali families if a groom is a businessman they will think twice or even thrice before giving their daughter for marriage. They will invest money in education so that he can secure a good job. But a job after all. On the contrary, the Gujarati or Marwari family will always try to settle their son with some business by giving them some initial capital. Some families strongly believe that education up to high school is enough for the child to join his father’s business!

When joining a start up one should be ready to convince the social network around that “Hey I’m doing a start up, the boat is gonna be rocking but I’m up for it…”

And once you say you up for it, be ready to pickup any job that comes to you. It can be just anything! From serving tea to cleaning desks. If you’re not comfortable in that you shouldn’t even be reading this blog!

Treat your start up like a child. Feel motherly pride in doing anything for it.

Failure: Some people fail. Don’t give up. Understand that its a business after all. There will be times when you’re amazingly happy about winning a project or cracking a deal and other times when you’re almost down and nothing works your way! Be ready to face it. Be ready to accept it. Consider the two ends of a pendulum and imagine that on one side there is joy, happiness and on the other side there is disappointment, sadness. Your journey in life is like a pendulum. It never stays happy forever and never stays disappointing always!

Financial crisis: Most people have family pressures, bank loan, EMI to pay. They will never think of starting a startup. A secure job makes you a man-eating tiger. Once a tiger has tasted the blood of a man, he will never go back to other animals. From one man to other he will prey. Similarly job seekers will seek jobs. From one company to another and another. But one must understand, the person who is putting you on a job is a businessman after all.

Problem with start ups: We all know start ups have low funds, poor infrastructure and blah blah and everything you may have read elsewhere. But a practical lesson comes when your team members have difference in opinion. Who is right and who is wrong? Mis-communication , less communication, self respect , ego all put more oil in the fire. The team breaks. A divorce happens and the child suffers.

Strategy: Have a long lasting strategy but flexible one. A start up should like water. Should take the shape in anything which holds it. If it doesn’t it becomes too rigid and breaks when strong winds blow. A start up is more client oriented. Its really crucial to have a balance in concentrating between what you DO and how you Sell. Teams of B-techs and MBAs do a good start up but you don’t have to be a MBA or a Btech to do a start up!

Be a real tiger, not a man-eater. Feel free to put your points!

jQuery Online Training

I will be conducting an online training for jQuery enthusiasts in association with ITVidya.com More details can be found here: http://twrl.in/nvdm

Learn how to create dynamic, visually-appealing web applications from two experienced JQuery developers in this 8 weeks online training with practical project

Learn how to use the jquery and how they all fit together, to develop web applications like the pros.
Get hands-on coding experience and answers to your questions so you can start creating your own JQuery application with confidence.
Save time and frustration by focusing exclusively on jQuery development for 8 Weeks with expert guidance.
All Online!
Live weekly webinars