public bool ExtractAllTextFromDwg(string inPdfFileName, string outTxtFileName, out string err)
        {
            bool   result    = false;
            string annotType = "";
            string contents  = "";

            err = "";

            try
            {
                if (isLibraryLoaded == false)
                {
                    result = LoadPDFLib();
                    if (result == false)
                    {
                        return(result);
                    }
                }

                int docId = pdfLib.LoadFromFile(inPdfFileName, "");

                if (docId == 0)   //failed
                {
                    err += pdfLib.LastErrorCode();
                    return(false);
                }

                pdfLib.SelectDocument(docId);

                for (int pageNo = 1; pageNo <= pdfLib.PageCount(); ++pageNo)    //Model contains no text
                {
                    pdfLib.SelectPage(pageNo);

                    for (int i = 1; i < pdfLib.AnnotationCount(); ++i)
                    {
                        annotType = pdfLib.GetAnnotStrProperty(i, 101);

                        if (annotType.Equals("Square"))
                        {
                            contents += pdfLib.GetAnnotStrProperty(i, 102) + "\n"; //102 = contents
                        }
                    }
                }

                if (!string.IsNullOrWhiteSpace(contents))
                {
                    File.WriteAllText(outTxtFileName, contents);
                }
            }
            catch (Exception ex)
            {
                err += ex.Message + "\n";
                err += pdfLib.LastErrorCode();
            }
            return(result);
        }