Saturday, July 20, 2013

itextsharp read pdf file

Referred URL - http://www.codeproject.com/Questions/341142/itextsharp-read-pdf-file

What do you mean by read the PDF file? I'm not kidding asking this question because it's important to understand that a PDF file isn't a structured file. In other words, you can't say that you can retrieve a paragraph, for instance, just by reading some strings. Plus, do you want to consider image data in this as well? About the best that you can do is something like this:
public string ParsePdf(string fileName)
{
  if (!File.Exists(fileName))
    throw new FileNotFoundException("fileName");
  using (PdfReader reader = new PdfReader(fileName))
  {
    StringBuilder sb = new StringBuilder();
 
    ITextExtractionStrategy strategy = new SimpleTextExtractionStrategy();
    for (int page = 0; page < reader.NumberOfPages; page++)
    {
      string text = PdfTextExtractor.GetTextFromPage(reader, page + 1, strategy);
      if (!string.IsNullOrWhitespace(text))
      {
        sb.Append(Encoding.UTF8.GetString(ASCIIEncoding.Convert(Encoding.Default, Encoding.UTF8, Encoding.Default.GetBytes(text))));
      }
    }
 
    return sb.ToString();
  } 
 }
}

Print out in PDF file

Referred URL - http://www.dotnetspider.com/forum/298029-Print-out-PDF-file.aspx

Download the latest version of iTextSharp.dll (v5.0.5.0) and use the following code:

using System.IO;
        using iTextSharp.text;
        using iTextSharp.text.pdf;
        using iTextSharp.text.html;
        using iTextSharp.text.html.simpleparser;
        using System.Text;


        private void button1_Click(object sender, EventArgs e)
        {
            string HtmlText = "<b>" + TextBox1.Text + "</b>";
            HTMLToPdf(HtmlText, "C://PdfFile.pdf");
        }

        public void HTMLToPdf(string HTMLContent, string FilePath)
        {
            string FileName = Guid.NewGuid().ToString();
            Document document = new Document();
            PdfWriter.GetInstance(document, new FileStream(FilePath, FileMode.Create));
            document.Open();
            iTextSharp.text.html.simpleparser.StyleSheet styles = new iTextSharp.text.html.simpleparser.StyleSheet();
            iTextSharp.text.html.simpleparser.HTMLWorker hw = new iTextSharp.text.html.simpleparser.HTMLWorker(document);
            hw.Style = styles;
            hw.Parse(new StringReader(HTMLContent));
            document.Close();
        }

Reading PDF content with itextsharp dll in VB.NET or C#

Links
http://www.dotnetspider.com/forum/156957-read-pdf-content-vb-net.aspx
http://jadn.co.uk/w/ReadPdfUsingCsharp.htm
http://forums.asp.net/p/1408202/3097463.aspx#3097463

below link contain tutorials of itextsharp.
http://itextsharp.sourceforge.net/tutorial/ch01.html

Code

public string ReadFile(string Filename)
{
    PdfReader pdfreader = new PdfReader(Filename);
    string pdfText = string.Empty;

    for (int i = 1; i <= reader2.NumberOfPages; i++)
    {
        ITextExtractionStrategy itextextStrat = new pdf.parser.SimpleTextExtractionStrategy();
        PdfReader reader = new PdfReader(Filename);
        String extractText = PdfTextExtractor.GetTextFromPage(reader, i, itextextStrat);

        extractText = Encoding.UTF8.GetString(ASCIIEncoding.Convert(Encoding.Default, Encoding.UTF8, Encoding.Default.GetBytes(extractText)));
        pdfText = pdfText + extractText;
        reader.Close();
    }
    return pdfText;
}

Seven Essential Teamwork Skills


Referred URL
http://www.agileadvice.com/2009/10/12/linkstoagileinfo/seven-essential-teamwork-skills/


Here’s list:
Active Listening
Active listening is a skill that allows a person to completely focus on the communication of another person including both verbal and non-verbal aspects.  Active listening requires the ability to not think of your own responses until after a person has finished speaking.  One simple way of doing this is to echo what a person is saying in your silent internal voice.  When someone says “I think we should build a new gimbal on the widget”, you are saying exactly the same thing in your own mind.  Active listening also requires that you request clarification, often by rephrasing what a person has said and asking if you have understood correctly.
Questioning
Being able to frame and express questions effectively helps us understand and integrate knowledge into our own mental model of the world, or even to modify our mental model.  Asking questions is easy.  Asking good questions is much harder.  We need to use an appropriate set of words and tone of voice so that we do not alienate or offend the recipient of the question.  For example, asking “why did you do that?” will often put people on the defensive since they will assume that you mean you disagree with their actions.  Instead, saying “I do not understand the reason you did that.  Could you please explain it to me?” can be a much more gentle way of getting to the same information.
Logical Argument
When presenting an idea or position, being able to logically support it is important to exploring the truth of it.  This includes being able to share your assumptions or axioms, the data you are basing your argument upon, and the logical sequence of reasoning to reach your conclusion.  Being able to avoid fallacious logical methods is also important.
Respecting
Showing respect includes acknowledging the fundamental human value of the existence of your teammates, and being able to step back from your own understanding of the world to acknowledge the legitimate nature of the perspective that other people have.  This does not mean that you have to let teammates get away with inappropriate behavior.  In fact, respect for your teammates will allow you to support them in behaving in ways that are in alignment with their fundamental nobility as human beings.
Helping
Offering help and actually following through with real assistance are aspects of helping.  When you suspect that a team member is struggling with something, you offer to help both verbally and with your actions.  This can take the form of offering information, offering emotional support, offering to assist with problem-solving, or actually taking action to do an activity together.  When we help someone, we share their burden.
Sharing
Sharing our knowledge, time, skills or physical resources are all aspects of sharing.  Sharing among team members is focused on those things which will help a team reach its goals.  This is similar to helping except that it tends to be more of a transaction than an ongoing activity.  The transaction is that you give a gift and then the other person uses that gift to meet their needs.  Sharing does not require reciprocity.  If you share something with another person, you should not expect that that person will return the gift at any time in the future.
Participating

It’s probably obvious, but in order to effectively be on a team, you need to participate!  Participation itself is mostly obvious: do work with the other team members.  However, there are also some less obvious aspects of it.  You are not participating when the team is having a discussion, you find it boring, so you check your email.  You are not participating when the team makes a decision and you abstain from helping to execute the decision because you disagree.  You are not participating in a work team when you are mentally checked out because of a crisis at home.

How to be a tall person at work

A Post by Penelope Trunk
Link - http://www.networkedblogs.com/p6164476

The Institute of Social and Economic Research recently published a study about the connection between popularity in high school and earning power later in life. New York magazine, information source to the rich and popular, summarized the study like this: "This study may seem to burst our Revenge of the Nerds fantasies, but it's logical that people who are attractive, likable, and socially comfortable—the class officers, the cheerleaders—should get ahead in corporate settings."

There is absolutely irrefutable data to support the idea that good-looking people do better in life than everyone else. Gordon Patzer, in his book, Looks, draws from a wide body of research to describe the advantaged life of a good-looking person from the time they are a baby (good-looking babies get better parentings) to the time they are in sales (the whole sales team performs better if there are more good-looking people on the team.)

As a result, I have jumped on the plastic surgery bandwagon. Super-smarty Chelea Clinton got plastic surgery before she entered the work world. We should all do that. And while I haven't taken my own advice, I do find myself pinching and pulling at my nose to see what it would look like after at $10,000 investment.

But wait. Before you take out a loan to straighten your nose, maybe you should just start thinking like a tall person. Being good-looking means having the right mix of a lot of things, and for you, being tall might be the final keystone to hold it all in place. (Wondering if you're already tall? Fast Company has the answer: over 6'3" for men and over 5'9" for women, which, by the way, makes me half-an-inch into the land of the tall.)

Tall people make $789 more per inch per year, and are 90% more likely to ascend to the CEO chairs of Fortune 500 Companies, according to Arianne Cohen, author of The Tall Book. She scoured the sociology, psychology and workplace research to determine why tall people succeed (she herself is 6'3"). And Cohen discovered that the behaviors tall people display can be mimicked by anyone in order to get the career benefits of being tall.

Here's what Cohen says to do, based on the research she's gathered:
Be unforgettable
Due to evolutionary programming, when a tall guy walks into a meeting, everyone registers that he's there, and remembers what he says. This is a huge boon for someone who's also an ambitious, talented worker. So be noticeable. Figure out a way that when you walk in the room, everyone registers it. You can do that through interesting (but professional) clothing, cracking jokes when you walk in, etc.

Act like the boss
Tall children, from a very young age, are deemed the "leader" of their friends. Other little kids literally look up to them and often treat them as they would a slightly older child, and as a result, they're more likely to function as the leader for the rest of their life. Even as interns, other office workers give them the physical space and attention usually reserved for a leader. So act like a leader.

Find a way to look down on coworkers. Literally
An eye cast down is a really powerful behavior — it's the body's way of signaling a power imbalance in your favor, and you can create that power imbalance with some attention to your positioning. Thus, stand whenever you can when coworkers are sitting, and avoid walk-and-talks and casual standing around the office where coworkers are looking down at you.

Guard your personal space
Close friends hold conversations 18" apart; friends 2-3' apart, and bosses and employees four feet apart. coworkers naturally give tall people four-or-more feet, which means that from the beginning, they're treated with boss-like reverence. You can mimic this body language — simply send out the physical vibe of professionalism, not chumminess, even in casual conversation. You'll see that people step back, and give you more space.

Don't be shy
Tall people often build an oversize personality to fit their oversize bodies. In the workplace tall people are more likely to yell or make demands or pull off a tongue-in-cheek toast to the boss. Socially, they take chances, and those chances are rewarded.

Focus on image rather than competence
Tall people aren't actually better workers, but in surveys, their bosses think they are. Which means that though competence matters, the perception of competence matters much more. So stop spending so much time on your work, and start spending more time on this list of ways to look tall.

5 Ways to Manage Team Conflicts

Referred URL
http://www.pm4girls.elizabeth-harrin.com/2012/10/5-ways-to-manage-team-conflicts/


Photo credit: Ed Yourdon

This is a guest post by Daniel Raymond, marketing manager at Project-Management.com.

Team conflicts on projects are a part of life. In essence, you are bringing together people with different personalities, mindsets, and specialization and are asking them to work as one. It is very rare for projects to go smoothly. Even in simple, straightforward projects, conflict between people can rear its ugly head. The most common reasons for this include personality clashes, misunderstandings, disagreements about the work, and egos.
If you’re the project manager, your responsibility is to mediate between the parties involved. Take note that there are instances where conflicts cannot be resolved no matter what you do. The resentment between two people is just too deep. Don’t side with anyone. Your responsibility is to ensure that they can still work together as far as possible or to make alternative plans if they can’t.
Here are some guidelines on how you can resolve team conflicts.

1. Exercise an authoritarian approach

This must be done if there is intense pressure to finish within the deadline or if the due date is approaching. Just tell the group what the resolution should be. Emergency situations require unpopular decisions. The authoritarian approach is particularly effective if the project is nearing completion.

2. Avoidance

There are some cases where project managers avoid confrontation. They ignore team conflicts as if they don’t exist. If the issues between team members aren’t serious and if they can still work professionally, it may not require the attention of the project manager. It is still best for the manager to get involved though, if only to provide a better work environment for the team.

3. Sacrificing self-concerns

This entails yielding to another person, it may be quite difficult because of egos. Nevertheless, the approach can be effective when one person has a significant vested interest in the outcome because in those cases they are more willing to make concessions. When one person is clearly wrong, it may be a good idea to help him or her see the error using examples or proof.

4. Collaborating

Compromises and accommodation (sacrificing self-concerns) involve one or both parties giving in. In collaboration, there is an attempt to find a mutually satisfying outcome. This requires the effort of the team manager as well. It is important to sit down with the people who are in conflict and mediate the discussion to reach a collaborative conclusion.

5. Exchanging concessions

Taking the middle ground can be effective if a quick solution is required for a complex issue. This approach takes the opinions of different people into consideration quickly. The mediation should end by outlining the source of the conflict, gaining commitments from all parties, and setting up a follow-up session.
So, these are the top 5 ways to manage team conflicts in any project team. Look at the individual situation in your team and adopt the strategy that looks to you as if it will be the most likely to help resolve it.
It is important to keep in mind that when conflict starts, it is usually over a minor issue such as personality mismatch. But when dealing with the problem is postponed, you run the risk of there being a lot of annoyances that occurred in the meantime. Dealing with it early prevents personality clashes from becoming bigger issues.

About the author: Daniel Raymond is the Marketing Manager at Project-Management.com, a site for everything related to project management. They aim to provide a wide selection of project management articles, and detailed project management software reviews.
Photo credit: Ed Yourdon on Flickr

10 Tips for presenting information

Referred URL
http://www.pm4girls.elizabeth-harrin.com/2013/01/10-tips-for-presenting-information/
When presenting any kind of information to an audience, it’s always important to be as concise as possible, while putting a lot of thought into the preparation of how to best shape your content for an audience. At the same time, it’s worth considering how to use plain speech, repetition, body language, and other approaches to best engage an audience, and to make sure that your message is put across clearly, and in a way that can encourage later discussion.

1. Prepare

Knowing your information inside and out is one thing, but knowing how to shape that information for an audience is another. You need to think about what will be important to that audience, and how to best make your presentation interesting for them.

2. Keep things concise

20 minutes or so of talking is often enough to present information. Don’t let your presentation get bogged down in too many graphs and tables – focus on key case studies, and try to cut out anything that might be too distracting.

3. Avoid too many visual aids

Again, over reliance on PowerPoint can result in an audience losing interest is faced with table after table on the screen. Having a few choice images can, however, keep your presentation more varied, but don’t be tempted to bombard an audience with too much.

4. Speak plainly

Trying to make your presentation too technical will mean that most audiences will have a hard time staying focused for the whole time you’re talking. Provide the context, and offer the opportunity to share your more technical information later.

5. Repeat key points

It’s crucial to have a clear introduction and conclusion to any presentation. Moreover, repeat key points to make it clear what your argument is, even if it seems like you’re going over them too much – in most presentations, an audience will only take away one or two, so make sure they get through.

6. Make eye contact

It’s important to make eye contact during the course of a presentation, even at that means focusing on a few people around a room when talking.

7. Use body language well

If you’re standing behind a podium and reading off a script, you can end up making it easy for an audience to lose interest. Stand in front of the audience, and vary your body language to maintain their attention.

8. Have some handouts

If you don’t have time to cover every piece of information that you want to, have a few handouts that you can offer to people after the presentation. These handouts can include any data or case studies that expand on your points.

9. Prepare for questions

You never know exactly what people will ask, but if you know your topic, you’ll want to have a good discussion about your presentation, and shouldn’t feel under pressure to have all the answers.

10. Ask for feedback













Getting constructive feedback on your presentation skills, or even your topic, can be important, especially if there are areas that you’re unsure about.