{"id":114,"date":"2011-04-07T13:36:00","date_gmt":"2011-04-07T13:36:00","guid":{"rendered":"http:\/\/madprogrammer76.wordpress.com\/2011\/04\/07\/converting-a-pdf-to-excel"},"modified":"2011-04-07T13:36:00","modified_gmt":"2011-04-07T13:36:00","slug":"converting-a-pdf-to-excel","status":"publish","type":"post","link":"http:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/","title":{"rendered":"Converting a PDF to Excel"},"content":{"rendered":"<p>Converting a PDF to Excel using <a href=\"http:\/\/www.investintech.com\/pdftoexcel.html\" target=\"_new\">InvestInTech.com&#8217;s <\/a> PDF to Excel SDK.<\/p>\n<p>PDF Sharp and other SDKs had the ability to read text from a PDF; however, I had found that InvestInTech&#8217;s PDF to Excel kept data in grid form.  <br \/>This made it easier to use OLEDB to query the excel and strip the data as needed.  I had tried InvestInTech&#8217;s XML conversion, but it did not have the same clean results.<\/p>\n<p>Here is a sample of how I had accomplished the conversion.<\/p>\n<pre style=\"border:1px inset silver;background-color:#FFFFEA;font-size:8pt;\">String name = Path.GetFileNameWithoutExtension(filename);<br \/>String directory = @\"C:temp\";<br \/><br \/>String[] files = Directory.GetFiles(directory);<br \/><br \/>Int32 iCount = 0;<br \/>foreach (String file in files)<br \/>{<br \/>    iCount++;<br \/>    toolStripStatusLabel2.Text = \" - Converting PDF to Excel File# \" + iCount + \" of \" + files.Count();<br \/>    Application.DoEvents();<br \/><br \/>    CPDF2ExcelClass pdf2Excel = new CPDF2ExcelClass();<br \/>    IPDF2Excel iPDF2Excel = pdf2Excel;<br \/><br \/>    iPDF2Excel.PDF2Excel(file, file.Replace(\".pdf\", \".xls\"));<br \/><br \/>    toolStripStatusLabel2.Text = \" - Converting PDF to Tiff File# \" + iCount + \" of \" + files.Count();<br \/>    Application.DoEvents();<br \/>    ConvertPDFToTiff(file);<br \/><br \/>    File.Delete(file);<br \/>}<br \/><\/pre>\n<div class=\"blogger-post-footer\"><img width='1' height='1' src='https:\/\/blogger.googleusercontent.com\/tracker\/4951456985313329413-7071117357427410643?l=softwaredeveloperinlondon.blogspot.com' alt='' \/><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Converting a PDF to Excel using InvestInTech.com&#8217;s PDF to Excel SDK. PDF Sharp and other SDKs had the ability to read text from a PDF; however, I had found that InvestInTech&#8217;s PDF to Excel kept data in grid form. This made it easier to use OLEDB to query the excel and strip the data as &hellip; <a href=\"http:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Converting a PDF to Excel<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,31,60],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>Converting a PDF to Excel - LDNDeveloper<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Converting a PDF to Excel - LDNDeveloper\" \/>\r\n<meta property=\"og:description\" content=\"Converting a PDF to Excel using InvestInTech.com&#8217;s PDF to Excel SDK. PDF Sharp and other SDKs had the ability to read text from a PDF; however, I had found that InvestInTech&#8217;s PDF to Excel kept data in grid form. This made it easier to use OLEDB to query the excel and strip the data as &hellip; Continue reading Converting a PDF to Excel\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/\" \/>\r\n<meta property=\"og:site_name\" content=\"LDNDeveloper\" \/>\r\n<meta property=\"article:published_time\" content=\"2011-04-07T13:36:00+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/blogger.googleusercontent.com\/tracker\/4951456985313329413-7071117357427410643?l=softwaredeveloperinlondon.blogspot.com\" \/>\r\n<meta name=\"author\" content=\"andrewpallant\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@ldnDeveloper\" \/>\r\n<meta name=\"twitter:site\" content=\"@LdnDeveloper\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"andrewpallant\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/\"},\"author\":{\"name\":\"andrewpallant\",\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/0e7b5e71751000e8f66b17b69ef4ab97\"},\"headline\":\"Converting a PDF to Excel\",\"datePublished\":\"2011-04-07T13:36:00+00:00\",\"dateModified\":\"2011-04-07T13:36:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/\"},\"wordCount\":91,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84\"},\"image\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blogger.googleusercontent.com\/tracker\/4951456985313329413-7071117357427410643?l=softwaredeveloperinlondon.blogspot.com\",\"articleSection\":[\"C#\",\"Excel\",\"PDF\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/\",\"url\":\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/\",\"name\":\"Converting a PDF to Excel - LDNDeveloper\",\"isPartOf\":{\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blogger.googleusercontent.com\/tracker\/4951456985313329413-7071117357427410643?l=softwaredeveloperinlondon.blogspot.com\",\"datePublished\":\"2011-04-07T13:36:00+00:00\",\"dateModified\":\"2011-04-07T13:36:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#primaryimage\",\"url\":\"https:\/\/blogger.googleusercontent.com\/tracker\/4951456985313329413-7071117357427410643?l=softwaredeveloperinlondon.blogspot.com\",\"contentUrl\":\"https:\/\/blogger.googleusercontent.com\/tracker\/4951456985313329413-7071117357427410643?l=softwaredeveloperinlondon.blogspot.com\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/andrewpallant.ca\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Converting a PDF to Excel\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#website\",\"url\":\"http:\/\/andrewpallant.ca\/wordpress\/\",\"name\":\"LDNDeveloper\",\"description\":\"Learning, Growing and Sharing.\",\"publisher\":{\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/andrewpallant.ca\/wordpress\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84\",\"name\":\"ldnDeveloper\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2017\/05\/cropped-AAEAAQAAAAAAAAXQAAAAJDQxMGRlMzFjLWM4ODctNDk1NC05M2EyLWE1NDNhNTRiZjVlYw-2.jpg\",\"contentUrl\":\"https:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2017\/05\/cropped-AAEAAQAAAAAAAAXQAAAAJDQxMGRlMzFjLWM4ODctNDk1NC05M2EyLWE1NDNhNTRiZjVlYw-2.jpg\",\"width\":512,\"height\":512,\"caption\":\"ldnDeveloper\"},\"logo\":{\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/\"},\"description\":\"Andrew Pallant (@LdnDeveloper) has been a web, database and desktop developer for over 16 years. Andrew has worked on projects that ranged from factory automation to writing business applications. Most recently he has been heavily involved in various forms for ecommerce projects. Over the years Andrew has worn many hats: Project Manager, IT Manager, Lead Developer, Supervisor of Developers and many more - See more at: http:\/\/www.unlatched.com\/#sthash.8DiTkpKy.dpuf\",\"sameAs\":[\"http:\/\/www.andrewpallant.ca\",\"https:\/\/x.com\/LdnDeveloper\"]},{\"@type\":\"Person\",\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/0e7b5e71751000e8f66b17b69ef4ab97\",\"name\":\"andrewpallant\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"andrewpallant\"},\"url\":\"http:\/\/andrewpallant.ca\/wordpress\/author\/andrewpallant\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Converting a PDF to Excel - LDNDeveloper","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/","og_locale":"en_US","og_type":"article","og_title":"Converting a PDF to Excel - LDNDeveloper","og_description":"Converting a PDF to Excel using InvestInTech.com&#8217;s PDF to Excel SDK. PDF Sharp and other SDKs had the ability to read text from a PDF; however, I had found that InvestInTech&#8217;s PDF to Excel kept data in grid form. This made it easier to use OLEDB to query the excel and strip the data as &hellip; Continue reading Converting a PDF to Excel","og_url":"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/","og_site_name":"LDNDeveloper","article_published_time":"2011-04-07T13:36:00+00:00","og_image":[{"url":"https:\/\/blogger.googleusercontent.com\/tracker\/4951456985313329413-7071117357427410643?l=softwaredeveloperinlondon.blogspot.com"}],"author":"andrewpallant","twitter_card":"summary_large_image","twitter_creator":"@ldnDeveloper","twitter_site":"@LdnDeveloper","twitter_misc":{"Written by":"andrewpallant","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#article","isPartOf":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/"},"author":{"name":"andrewpallant","@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/0e7b5e71751000e8f66b17b69ef4ab97"},"headline":"Converting a PDF to Excel","datePublished":"2011-04-07T13:36:00+00:00","dateModified":"2011-04-07T13:36:00+00:00","mainEntityOfPage":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/"},"wordCount":91,"commentCount":0,"publisher":{"@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84"},"image":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#primaryimage"},"thumbnailUrl":"https:\/\/blogger.googleusercontent.com\/tracker\/4951456985313329413-7071117357427410643?l=softwaredeveloperinlondon.blogspot.com","articleSection":["C#","Excel","PDF"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/","url":"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/","name":"Converting a PDF to Excel - LDNDeveloper","isPartOf":{"@id":"http:\/\/andrewpallant.ca\/wordpress\/#website"},"primaryImageOfPage":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#primaryimage"},"image":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#primaryimage"},"thumbnailUrl":"https:\/\/blogger.googleusercontent.com\/tracker\/4951456985313329413-7071117357427410643?l=softwaredeveloperinlondon.blogspot.com","datePublished":"2011-04-07T13:36:00+00:00","dateModified":"2011-04-07T13:36:00+00:00","breadcrumb":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#primaryimage","url":"https:\/\/blogger.googleusercontent.com\/tracker\/4951456985313329413-7071117357427410643?l=softwaredeveloperinlondon.blogspot.com","contentUrl":"https:\/\/blogger.googleusercontent.com\/tracker\/4951456985313329413-7071117357427410643?l=softwaredeveloperinlondon.blogspot.com"},{"@type":"BreadcrumbList","@id":"https:\/\/andrewpallant.ca\/wordpress\/converting-a-pdf-to-excel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/andrewpallant.ca\/wordpress\/"},{"@type":"ListItem","position":2,"name":"Converting a PDF to Excel"}]},{"@type":"WebSite","@id":"http:\/\/andrewpallant.ca\/wordpress\/#website","url":"http:\/\/andrewpallant.ca\/wordpress\/","name":"LDNDeveloper","description":"Learning, Growing and Sharing.","publisher":{"@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/andrewpallant.ca\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84","name":"ldnDeveloper","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/","url":"https:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2017\/05\/cropped-AAEAAQAAAAAAAAXQAAAAJDQxMGRlMzFjLWM4ODctNDk1NC05M2EyLWE1NDNhNTRiZjVlYw-2.jpg","contentUrl":"https:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2017\/05\/cropped-AAEAAQAAAAAAAAXQAAAAJDQxMGRlMzFjLWM4ODctNDk1NC05M2EyLWE1NDNhNTRiZjVlYw-2.jpg","width":512,"height":512,"caption":"ldnDeveloper"},"logo":{"@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/"},"description":"Andrew Pallant (@LdnDeveloper) has been a web, database and desktop developer for over 16 years. Andrew has worked on projects that ranged from factory automation to writing business applications. Most recently he has been heavily involved in various forms for ecommerce projects. Over the years Andrew has worn many hats: Project Manager, IT Manager, Lead Developer, Supervisor of Developers and many more - See more at: http:\/\/www.unlatched.com\/#sthash.8DiTkpKy.dpuf","sameAs":["http:\/\/www.andrewpallant.ca","https:\/\/x.com\/LdnDeveloper"]},{"@type":"Person","@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/0e7b5e71751000e8f66b17b69ef4ab97","name":"andrewpallant","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"andrewpallant"},"url":"http:\/\/andrewpallant.ca\/wordpress\/author\/andrewpallant\/"}]}},"_links":{"self":[{"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/posts\/114"}],"collection":[{"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":0,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"wp:attachment":[{"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}