Sunday, June 24, 2012

In the fond Memory of my Father

Parents are like idol whom we like to follow.While most of them will be remembered when gone,some will leave a mark on your life which is hard to erase.

My father was an optimist by nature and looked at life in the most modern way possible.Given the zero family background from which he emerged to succeed in life,it would be difficult to find a thing that this man was not capable of.With no money and no family backup he created a world for 3 most precious people he loved and always will,my mom,my elder brother and me.We will always remember him.

My father was fun person i always enjoyed his company.He was never compatible with the Indian railways and sometimes feared to travel.There was a time when i was preparing for a competitive exams when i needed to purchase few books from College Street.We had purchased a lot of books and were out of cash.We headed to Sealdah station and got caught by the ticket checker.We were in the soup for few minutes but somehow my dad managed the event well and the crowd of people who were watching this event cheered at us.

While traveling to and from the hills (where my brother and i did schooling) we mostly took Darjeeling Mail train.But sometimes when only we guys(dad,bro and me) traveled we got RAC tickets in which the tickets would never get confirmed.Fortunately when my mother traveled along,her luck saved the day several times.
 
I had seen my dad's earlier photos and discovered that he was athletic before his marriage.His old photographs remind me of some Hollywood actors in black and white.But before me i always saw a family man.There was a lot of transformation between what i saw in photos and what stood before me.Maybe it was because of the much struggling that he underwent to stand as a calm and composed man before the family.But the composure was not only because of the happiness in the family but because he kept himself fit at all times by doing morning yoga and regular exercises.

He was a very creative person and have enabled a lot of people fend for themselves and run their family.People from neighborhood always filled our house for taking advice from my dad.He has created a lot of jobs and business opportunities for several people.

The fondest memories of my father are those in which he and i are sitting on some chairs on our verandah.He is the listener and i am the teller.I speak to him give him advice and he says its a good plan/strategy.I always felt happy whenever he took my advice.It made me feel important.

My father loved people and company.We,like normal Bengali household participate in all the festivities and invited people to our home.We celebrated birthdays like none other.My Dad's birthday is worth remembering.The last time he had cut his birthday cake he was really very happy to do it.

I have faced a lot of problems in life.So did my brother.But both of us always found a hero who rescued us each and every single time.Be it parent call from school or getting into a fit of sickness or injury.He was like first aid before mother was able to comfort us with her pleasant smile.

My dad had a passion for bikes and cars.So he liked spending time or investing in the transport sector.He had some splendid bikes about which i came to know from mother.

I have achieved a lot and lost a lot.All that i have achieved would not be possible if a man like my man did not stand up for me.He saved a lot of money and spend them wisely on my brother and my education.Had he not done so,we would be now in a small time pan shop or a shady restaurant.We stayed in a remote area where education sector was not a much explored field.My father saved many a days working two shifts a day so that we could get proper education and be successful in life.

My brother is a successful Doctor and i am a successful Engineer now.All the efforts that i have put in to make a sound career for myself is not worth if my dad had not been by my side supporting me every single day,financially and emotionally.I always felt safe when he was there.

I was working in Mumbai when i got a call from my mother in the early morning.Everything seemed normal except for the fact that i heard a very tensed mother speaking from the other side.It made me tense too.She just inquired how was my everyday life going on and how i was in terms of health.

It felt strange.Also the words that she spoke had absolute no double meaning.I felt worried and thought i needed to call back.The moment i called back i heard a different form in my mother.Now she was crying and asking me if i could come back to Kolkata.

I asked her if anything was serious.She said that my dad was in hospital due to a minor heart attack.He has recovered and that the operation was still under process.I felt the urge to grab the next flight to Kolkata immediately.

When i arrived my brother greeted me and smiled.Apollo hospital was filled with a lot of people that i knew.There was neighbors and there were a dozen relatives.i was wondering if they came for a visit just like i did.When i took lift and arrived on the 3rd floor,my mom's eyes puzzled me.It had reddened and looked like blood-soaked eyes.

I still did not have a clue and was optimist that the operation was still undergoing.No one spoke to me for 5 minutes.I almost had a nervous breakdown.And finally my grandmother broke out a news that i was thinking of a practical joke.

It felt funny for a while when she said my dad is no longer alive.This feeling instantly got mixed into a fit of anxiety and stress.I could not believe what was going on.I got aggressive and started to shout "get out" to all the people that surrounded me.

I searched for dad and found a body instead.The world seemed flat around me.I burst out in tears.My dad was no more and i regret i was unable to talk to him before his death.

Saturday, November 12, 2011

Automating PDF Using QTP

Well i am working on a QTP project and had this task of automating PDF using QTP.

I have had no experiences in automating pdfs before but after some survey i find that there are so many ways in which we can do so.I found some guidelines here and there but most of them were misguides and asking me to purchase software/licences.

In this blog post i am sharing some insight on the different techniques.
For basic QTP users i must first explain what is an object creation.This would enable to understand the below with ease.

When you want to add objects in the object repository you just open the repository and click on the + sign.But now you can improvise by creating objects.For that you must know the name of the appropriate application.
Lets explain with an example of opening internet explorer.

SystemUtil.Run ( FileName, Parameters, Path, Operation ) OR InvokeApplication "C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.google.com"

Now if you can create an object of internet explorer then we can view a lot of options as dropdown.Here is the syntax:  createobject(Servername.typename) where Servername would be the application providing the object and typename would be the type or the class to create object for.
Set NewOBj = createobject("InternetExplorer.Application")
NewOBj .visible=true
NewOBj .navigate"http:\\www.google.com" 
When you type .(dot) after  NewOBj you will find a lot of options to choose from.

When you have created an object of an application you can get a lot of options to choose from.

Coming back to our case with PDF automation,we can automate PDF in the below mentioned ways based on our requirement.

---------------------------------------ADOBE READER-------------------------------
1.If Adobe Reader is installed in the machine
Then we can use Set NewOBj = createobject("AcroPDF.PDF").
Example: To Print a pdf file
Set objAcroPDF = CreateObject("AcroPDF.PDF")
objAcroPDF.LoadFile("C:\D2\Scanner\test.pdf")
objAcroPDF.PrintAll
Set objAcroPDF = Nothing
This technique is limited and contains only a very few options and can be used for purposes like printing the pdf file.Haven't noticed anything significant about this. 

----------------------------------------ADOBE ACROBAT------------------------------

2  .If Adobe Acrobat is installed in the machine
Then we can use  
  a)  Set oPDFDoc = CreateObject( "AcroExch.PDDoc" )
Example To get the number of pages of a pdf file
 Set oPDFDoc = CreateObject( "AcroExch.PDDoc" )
    If oPDFDoc.Open( FileName ) Then
        GetNumPagesInPDF = oPDFDoc.GetNumPages()
        Set oPDFDoc = Nothing
    Else
        GetNumPagesInPDF = -1
    End If

   b)  Set PdfForm = CreateObject("AFormAut.App")--to manipulate from pdf forms
   c)  Set objAcrApp = CreateObject("AcroExch.App")--creating acrobat application object
   d)  Set objAVDoc = CreateObject("AcroExch.AVDoc")--we have to create one avdoc object per displayed document.
    
 Example: To open a pdf file display it for sometime and then close it.
Set objAcrApp = CreateObject("AcroExch.App")
objAcrApp.Show()
Set objAVDoc = CreateObject("AcroExch.AVDoc")
objAVDoc.open "PATH of PDF","Title"
wait(200)
objAVDoc.CloseAllDocs
objAVDoc.exit
Set objAVDoc=nothing
We can use  objAVDoc.FindText("text") before closing,if we want to find if a text is present or not.

--------------------------- LEARNQUICKTEST.MANIPULATEPDF.DLL-----------


3.  If you have do not have Adobe Acrobat but only have the Adobe Reader,then you can download a copy of  an API from this link  http://www.learnqtp.com/learnquicktestpdf-api-manipulating-pdfs-in-qtp/
The instruction for the download and usage is given
Once it is installed on the system then you can create an object of the DLL file LearnQuickTest.ManipulatePDF.dll
Note:This Dll file can also be installed alternatively by registering it in the RegAsm.exe.
Search for the RegAsm.exe file in your system.Once found goto Run and type cmd.Once the command screen opens type "PATH of RegAsm.exe\RegAsm.exe" "PATH of Dll File\LearnQuickTest.ManipulatePDF.dll"   
Set oPDF=createobject("LearnQuickTest.ManipulatePDF")
You will get a dropdown option after you type oPDF.

----------------------------------- PLUG-IN ADOBE APTT----------------------------------

4.     If you want QTP to read PDF files and add objects directly then all you need is to download ADOBE APTT plugin.If you install ADOBE APTT plugin, QTP starts identifying the objects in PDF.This can be downloaded from the link http://labs.adobe.com/technologies/aptt/
 


--------------------------------------------------------N.B---------------------------------------------------------------------

The following will be needed to grasp a better understanding
1)How to install/uninstall DLL files(explained above in case #3)
2) If qtp is not installed but you want to test codes
Ans) write the codes in text file.save the file in .vbs fromat.Then double click this file for autorun without QTP
3)How to know the names of applications of which we can create an object of.
Ans)Goto Run.Type regedit.Registry editor will open and you can view all the registry files.Typical names like AcroExch.PDDoc can be found under adobe or you can manually search for all applications under adobe acrobat.

Hope this benefits those involved in PDF QTP projects.Thanks ....