Our Thought in One Place

  • Mac Preview Signature Capture Makes Signing Documents Easier

    Mac Preview Signature Capture Makes Signing Documents Easier

    Apple’s new OS X Lion has one new feature that we think is pretty cool and will make signing documents easier than ever before. OS X Lion comes with a new version of Preview, it’s popular image and document reader which has a new feature, signature capture mode.

    Just sign a piece of paper, make sure your signature lines up with the blue line on the display screen, and then it’s captured by the computer to be saved for future use. Signing documents, like PDF’s, are easier than ever before, with this new feature. In the past most people had to resort to printing out the document, signing it, and scanning it back in to the computer to email back to the originator. No longer is this long process necessary.

    New gadgets like these are huge time-savers for businesses. What tools do your businesses use to be more efficient? Tweet us @jasegroup and let us know.

    image credit: Chris Rawson on Tuaw

    Subscribe to our RSS Feed Today!
    subscribe to the JASE RSS Feed subscribe to the JASE Email Feed
    RSS Feed Daily Email
  • Adobe AcrobatIt comes up from time to time that we need to generate a PDF from within a .NET application.  There are plenty of PDF tools out there – free and paid.  Our favorite is one called iTextSharp.  Unfortunately, its developers recently changed its licensing model from the commercial use-friendly LGPL to the Affero GPL, which does not permit use on a public web server without releasing your own code under a similar free license.  However, older versions of the library can still be used under the old license and so we am using version 4.1.6 for our example.

    This toolkit provides a class called PdfStamper that allows you to set field values of a form-based PDF, then draw those fields to static text, in essence, “flattening” the form.  This gives you a very quick solution for generating a PDF for your users – you can create a form-based PDF in Adobe Acrobat Professional with fields as placeholders to be filled in programmatically.

    The example function below accepts a PDF form and an array of field names and values and will generate a “flattened” PDF that can be returned to users.

    /// <summary>
    /// Fills in the fields of a PDF
    /// </summary>
    /// <param name=”strInputFileName”></param>
    /// <param name=”strOutputFileName”></param>
    /// <param name=”arrInputFields”></param>
    /// <param name=”arrOutputFields”></param>
    private void GeneratePdf(string strInputFileName, string strOutputFileName,
    string[] arrFieldNames, string[] arrFieldValues)
    // Verify that we have file names
    if (null == strInputFileName || null == strOutputFileName ||
    “” == strInputFileName.Trim() || “” == strOutputFileName.Trim())
    throw new Exception(“Please provide input and output file names.”);
    if (arrFieldNames.Length != arrFieldValues.Length)
    throw new Exception(“The names and values arrays must match.”);
    using (FileStream fileOut = new FileStream(strOutputFileName,
    FileMode.Create, FileAccess.Write))
    PdfReader reader = new PdfReader(strInputFileName);
    PdfStamper stamper = new PdfStamper(reader, fileOut);
    AcroFields fields = stamper.AcroFields;
    // Fields on the form will be rendered as text
    stamper.FormFlattening = true;

    for (int i = 0; i < arrFieldNames.Length; i++)
    fields.SetField(arrFieldNames[i], arrFieldValues[i]);

    This, and other tips, tricks and special methods, are only a small sample of how our software application engineers can help make your applications easier to use for your staff and clients. Talk to our eBusiness Solutions team today.

    Enjoy Your 30-day Free Trial!
    inbound marketing software free trial Learn how Inbound Marketing Software can help your business grow!

    Click here to get started with your free trial.