{"id":2629,"date":"2016-03-18T10:29:09","date_gmt":"2016-03-18T10:29:09","guid":{"rendered":"http:\/\/www.ericwhite.com\/home2\/bm8qcmjy\/public_html\/blog\/?page_id=2629"},"modified":"2016-03-18T10:29:09","modified_gmt":"2016-03-18T10:29:09","slug":"screen-cast-converting-open-xml-files-tofrom-base-64-encoded-ascii-by-using-powertools-for-open-xml","status":"publish","type":"page","link":"https:\/\/www.ericwhite.com\/blog\/screen-cast-converting-open-xml-files-tofrom-base-64-encoded-ascii-by-using-powertools-for-open-xml\/","title":{"rendered":"Screen-Cast: Converting Open XML files to\/from Base 64 Encoded ASCII by using PowerTools for Open XML"},"content":{"rendered":"<p>Sometimes we need to use a &#8216;template&#8217; or &#8216;source&#8217; Open XML document from within our C#, VB.NET, PowerShell, or JavaScript program.  One convenient way is to convert the binary Open XML file to base 64 encoded ASCII, and to embed the document in our program as a string literal.  This video explains why we want to do this, and explains the ConvertTo-Base64 Cmdlet that makes it super-easy for us to write this variety of code.<\/p>\n<p><iframe loading=\"lazy\" title=\"ConvertTo ConvertFrom Base64\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/c0hUbKXn4wQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>In the next screen-cast, when I discuss the New-Docx Cmdlet in detail, we&#8217;ll see how the New-Docx cmdlet makes use of the ConvertTo-Base64 and ConvertFrom-Base64 Cmdlets.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes we need to use a &#8216;template&#8217; or &#8216;source&#8217; Open XML document from within our C#, VB.NET, PowerShell, or JavaScript program. One convenient way is to convert the binary Open XML file to base 64 encoded ASCII, and to embed the document in our program as a string literal. This video explains why we want [&hellip;]<\/p>\n","protected":false},"author":10567,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_s2mail":"","footnotes":""},"class_list":["post-2629","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/pages\/2629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/users\/10567"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/comments?post=2629"}],"version-history":[{"count":1,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/pages\/2629\/revisions"}],"predecessor-version":[{"id":2632,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/pages\/2629\/revisions\/2632"}],"wp:attachment":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/media?parent=2629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}