<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>page orientation conversion on Document Processing REST APIs | GroupDocs Cloud</title>
    <link>https://blog-qa.groupdocs.cloud/tag/page-orientation-conversion/</link>
    <description>Recent content in page orientation conversion on Document Processing REST APIs | GroupDocs Cloud</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Wed, 26 Aug 2026 08:28:34 +0000</lastBuildDate><atom:link href="https://blog-qa.groupdocs.cloud/tag/page-orientation-conversion/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Convert Word Page Orientation in Node.JS</title>
      <link>https://blog-qa.groupdocs.cloud/merger/convert-word-page-orientation-in-nodejs/</link>
      <pubDate>Wed, 26 Aug 2026 08:28:34 +0000</pubDate>
      
      <guid>https://blog-qa.groupdocs.cloud/merger/convert-word-page-orientation-in-nodejs/</guid>
      <description>Learn to programmatically change Word page orientation in Node.js with GroupDocs.Merger Cloud SDK. Includes step-by-step guide, code sample, cURL and setup.</description>
      <content:encoded><![CDATA[<p>Converting the layout of a Word document is a frequent need when generating reports, contracts, or printable brochures. <a href="https://products.groupdocs.cloud/merger/nodejs/">GroupDocs.Merger Cloud SDK for Node.js</a> enables developers to programmatically <strong>convert Word page Orientation in Node.JS</strong> with just a few lines of code. This guide walks you through the required steps, shows a complete working example, demonstrates equivalent cURL calls, and explains installation and configuration so you can integrate page orientation changes into your Node.js applications.</p>
<h2 id="steps-to-convert-word-page-orientation-in-nodejs">Steps to Convert Word Page Orientation in Node.JS</h2>
<ol>
<li>
<p><strong>Install the SDK and configure credentials</strong>: Use npm to add the library and set up your client ID and secret.</p>
<!--[CODE_SNIPPET_START]-->
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>npm install groupdocs-merger-cloud
</span></span></code></pre></div><!--[CODE_SNIPPET_END]-->
</li>
<li>
<p><strong>Create the API instance</strong>: Initialize <code>ChangePageOrientationApi</code> with the configuration object.</p>
<!--[CODE_SNIPPET_START]-->
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">require</span>(<span style="color:#e6db74">&#39;groupdocs-merger-cloud&#39;</span>);
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">clientId</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;YOUR_CLIENT_ID&#39;</span>;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">clientSecret</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;YOUR_CLIENT_SECRET&#39;</span>;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">config</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span>.<span style="color:#a6e22e">Configuration</span>(<span style="color:#a6e22e">clientId</span>, <span style="color:#a6e22e">clientSecret</span>);
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">orientationApi</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span>.<span style="color:#a6e22e">ChangePageOrientationApi</span>(<span style="color:#a6e22e">config</span>);
</span></span></code></pre></div><!--[CODE_SNIPPET_END]-->
</li>
<li>
<p><strong>Build the request options</strong>: Define the source file, page range, desired orientation, and output path.</p>
<!--[CODE_SNIPPET_START]-->
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">options</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span>.<span style="color:#a6e22e">ChangePageOrientationOptions</span>();
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">options</span>.<span style="color:#a6e22e">fileInfo</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span>.<span style="color:#a6e22e">FileInfo</span>();
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">options</span>.<span style="color:#a6e22e">fileInfo</span>.<span style="color:#a6e22e">filePath</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;input.docx&#39;</span>;
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">options</span>.<span style="color:#a6e22e">pages</span> <span style="color:#f92672">=</span> [<span style="color:#e6db74">&#39;1-&#39;</span>]; <span style="color:#75715e">// all pages
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">options</span>.<span style="color:#a6e22e">orientation</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span>.<span style="color:#a6e22e">Orientation</span>.<span style="color:#a6e22e">Landscape</span>; <span style="color:#75715e">// or Portrait
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">options</span>.<span style="color:#a6e22e">outputPath</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;output.docx&#39;</span>;
</span></span></code></pre></div><!--[CODE_SNIPPET_END]-->
</li>
<li>
<p><strong>Execute the orientation change</strong>: Send the request and handle the response.</p>
<!--[CODE_SNIPPET_START]-->
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">request</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span>.<span style="color:#a6e22e">ChangePageOrientationRequest</span>(<span style="color:#a6e22e">options</span>);
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">orientationApi</span>.<span style="color:#a6e22e">changePageOrientation</span>(<span style="color:#a6e22e">request</span>)
</span></span><span style="display:flex;"><span>    .<span style="color:#a6e22e">then</span>(<span style="color:#a6e22e">response</span> =&gt; {
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">console</span>.<span style="color:#a6e22e">log</span>(<span style="color:#e6db74">&#39;Page orientation conversion completed.&#39;</span>);
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">console</span>.<span style="color:#a6e22e">log</span>(<span style="color:#e6db74">&#39;Output stored at:&#39;</span>, <span style="color:#a6e22e">response</span>.<span style="color:#a6e22e">path</span>);
</span></span><span style="display:flex;"><span>    })
</span></span><span style="display:flex;"><span>    .<span style="color:#66d9ef">catch</span>(<span style="color:#a6e22e">error</span> =&gt; {
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">console</span>.<span style="color:#a6e22e">error</span>(<span style="color:#e6db74">&#39;Error during orientation conversion:&#39;</span>, <span style="color:#a6e22e">error</span>);
</span></span><span style="display:flex;"><span>    });
</span></span></code></pre></div><!--[CODE_SNIPPET_END]-->
</li>
<li>
<p><strong>(Optional) Adjust additional settings</strong>: You can modify the <code>pages</code> array to target specific pages or switch the <code>orientation</code> enum to <code>Portrait</code> for a different layout.</p>
</li>
</ol>
<h2 id="word-page-orientation-change---complete-code-example">Word Page Orientation Change - Complete Code Example</h2>
<p>The following example demonstrates the full workflow for changing the orientation of a <a href="https://docs.fileformat.com/word-processing/docx/">DOCX</a> file using the GroupDocs.Merger Cloud SDK for Node.js.</p>
<!--[COMPLETE_CODE_SNIPPET_START]-->
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">require</span>(<span style="color:#e6db74">&#39;groupdocs-merger-cloud&#39;</span>);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// ==== Configuration ====
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// Replace with your actual credentials
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">clientId</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;YOUR_CLIENT_ID&#39;</span>;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">clientSecret</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;YOUR_CLIENT_SECRET&#39;</span>;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">config</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span>.<span style="color:#a6e22e">Configuration</span>(<span style="color:#a6e22e">clientId</span>, <span style="color:#a6e22e">clientSecret</span>);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// ==== API Instance ====
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">orientationApi</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span>.<span style="color:#a6e22e">ChangePageOrientationApi</span>(<span style="color:#a6e22e">config</span>);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// ==== Request Construction ====
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">options</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span>.<span style="color:#a6e22e">ChangePageOrientationOptions</span>();
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">options</span>.<span style="color:#a6e22e">fileInfo</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span>.<span style="color:#a6e22e">FileInfo</span>();
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">options</span>.<span style="color:#a6e22e">fileInfo</span>.<span style="color:#a6e22e">filePath</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;input.docx&#39;</span>;               <span style="color:#75715e">// source Word document
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">options</span>.<span style="color:#a6e22e">pages</span> <span style="color:#f92672">=</span> [<span style="color:#e6db74">&#39;1-&#39;</span>];                                 <span style="color:#75715e">// apply to all pages (1 to end)
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">options</span>.<span style="color:#a6e22e">orientation</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span>.<span style="color:#a6e22e">Orientation</span>.<span style="color:#a6e22e">Landscape</span>; <span style="color:#75715e">// Portrait or Landscape
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">options</span>.<span style="color:#a6e22e">outputPath</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;output.docx&#39;</span>;                     <span style="color:#75715e">// destination file
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">request</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span>.<span style="color:#a6e22e">ChangePageOrientationRequest</span>(<span style="color:#a6e22e">options</span>);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// ==== Execution ====
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">orientationApi</span>.<span style="color:#a6e22e">changePageOrientation</span>(<span style="color:#a6e22e">request</span>)
</span></span><span style="display:flex;"><span>    .<span style="color:#a6e22e">then</span>(<span style="color:#a6e22e">response</span> =&gt; {
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">console</span>.<span style="color:#a6e22e">log</span>(<span style="color:#e6db74">&#39;Page orientation conversion completed.&#39;</span>);
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">console</span>.<span style="color:#a6e22e">log</span>(<span style="color:#e6db74">&#39;Output stored at:&#39;</span>, <span style="color:#a6e22e">response</span>.<span style="color:#a6e22e">path</span>);
</span></span><span style="display:flex;"><span>    })
</span></span><span style="display:flex;"><span>    .<span style="color:#66d9ef">catch</span>(<span style="color:#a6e22e">error</span> =&gt; {
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">console</span>.<span style="color:#a6e22e">error</span>(<span style="color:#e6db74">&#39;Error during orientation conversion:&#39;</span>, <span style="color:#a6e22e">error</span>);
</span></span><span style="display:flex;"><span>    });
</span></span></code></pre></div><!--[COMPLETE_CODE_SNIPPET_END]-->
<blockquote>
<p><strong>Note:</strong> This code example demonstrates the core functionality. Before using it in your project, make sure to update the file paths (<code>input.docx</code>, <code>output.docx</code>) to match your actual file locations, verify that all required dependencies are properly installed, and test thoroughly in your development environment. If you encounter any issues, please refer to the <a href="https://docs.groupdocs.cloud/merger/">official documentation</a> or reach out to the <a href="https://forum.groupdocs.cloud/c/merger/18">support team</a> for assistance.</p>
</blockquote>
<h2 id="changing-page-orientation-via-rest-api-with-curl">Changing Page Orientation via REST API with cURL</h2>
<p>If you prefer a pure HTTP approach, the same operation can be performed with cURL commands against the GroupDocs.Merger Cloud REST endpoints.</p>
<ol>
<li>
<p><strong>Obtain an access token</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X POST <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v1.0/oauth2/token&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Content-Type: application/json&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -d <span style="color:#e6db74">&#39;{&#34;client_id&#34;:&#34;YOUR_CLIENT_ID&#34;,&#34;client_secret&#34;:&#34;YOUR_CLIENT_SECRET&#34;}&#39;</span>
</span></span></code></pre></div><p>The response contains <code>access_token</code>.</p>
</li>
<li>
<p><strong>Upload the source DOCX file</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X POST <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v1.0/merger/storage/upload&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Authorization: Bearer YOUR_ACCESS_TOKEN&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -F <span style="color:#e6db74">&#34;file=@input.docx&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -F <span style="color:#e6db74">&#34;path=/input.docx&#34;</span>
</span></span></code></pre></div></li>
<li>
<p><strong>Request orientation change</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X POST <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v1.0/merger/words/changePageOrientation&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Authorization: Bearer YOUR_ACCESS_TOKEN&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Content-Type: application/json&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -d <span style="color:#e6db74">&#39;{
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">           &#34;fileInfo&#34;: { &#34;filePath&#34;: &#34;/input.docx&#34; },
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">           &#34;pages&#34;: [&#34;1-&#34;],
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">           &#34;orientation&#34;: &#34;Landscape&#34;,
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">           &#34;outputPath&#34;: &#34;/output.docx&#34;
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">         }&#39;</span>
</span></span></code></pre></div></li>
<li>
<p><strong>Download the resulting file</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X GET <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v1.0/merger/storage/download?path=/output.docx&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Authorization: Bearer YOUR_ACCESS_TOKEN&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -o output.docx
</span></span></code></pre></div></li>
</ol>
<p>For more details on request payloads and supported parameters, see the <a href="https://docs.groupdocs.cloud/merger/">official API documentation</a>.</p>
<h2 id="installing-and-configuring-groupdocsmerger-cloud-sdk-for-nodejs">Installing and Configuring GroupDocs.Merger Cloud SDK for Node.js</h2>
<p>To get started, install the package from npm and configure your credentials.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>npm install groupdocs-merger-cloud
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">require</span>(<span style="color:#e6db74">&#39;groupdocs-merger-cloud&#39;</span>);
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">clientId</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;YOUR_CLIENT_ID&#39;</span>;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">clientSecret</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;YOUR_CLIENT_SECRET&#39;</span>;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">config</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span>.<span style="color:#a6e22e">Configuration</span>(<span style="color:#a6e22e">clientId</span>, <span style="color:#a6e22e">clientSecret</span>);
</span></span></code></pre></div><p>Download the latest library from the <a href="https://releases.groupdocs.cloud/merger/nodejs/">release page</a> if you need a specific version. Ensure your environment runs Node.js 12 or higher and that you have a valid GroupDocs Cloud account.</p>
<h2 id="configuring-page-orientation-options">Configuring Page Orientation Options</h2>
<p>The SDK exposes several properties you can tweak:</p>
<ul>
<li><strong>pages</strong> - Define which pages to affect (e.g., <code>['1-5']</code> for the first five pages).
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#a6e22e">options</span>.<span style="color:#a6e22e">pages</span> <span style="color:#f92672">=</span> [<span style="color:#e6db74">&#39;1-5&#39;</span>];
</span></span></code></pre></div></li>
<li><strong>orientation</strong> - Choose <code>GroupDocsMergerCloud.Orientation.Portrait</code> or <code>Landscape</code>.
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#a6e22e">options</span>.<span style="color:#a6e22e">orientation</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">GroupDocsMergerCloud</span>.<span style="color:#a6e22e">Orientation</span>.<span style="color:#a6e22e">Portrait</span>;
</span></span></code></pre></div></li>
<li><strong>outputPath</strong> - Specify the destination path in your cloud storage.
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#a6e22e">options</span>.<span style="color:#a6e22e">outputPath</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;converted/output.docx&#39;</span>;
</span></span></code></pre></div></li>
</ul>
<p>These options are part of the <code>ChangePageOrientationOptions</code> class documented in the <a href="https://reference.groupdocs.cloud/merger/">API reference</a>.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Changing the layout of Word files programmatically is straightforward with the <a href="https://products.groupdocs.cloud/merger/nodejs/">GroupDocs.Merger Cloud SDK for Node.js</a>. By following the steps above, you can <strong>convert Word page Orientation in Node.JS</strong>, automate bulk processing, and integrate orientation changes into any document workflow. Remember to secure a proper license for production use; pricing details are available on the product page, and you can obtain a temporary license from the <a href="https://purchase.groupdocs.cloud/temporary-license/">temporary license page</a>. With the SDK installed and configured, you&rsquo;re ready to enhance your applications with flexible document manipulation capabilities.</p>
<h2 id="faqs">FAQs</h2>
<ul>
<li>
<p><strong>How do I change page orientation in Word documents using Node.js?</strong><br>
Use the <code>ChangePageOrientationApi</code> from the <a href="https://products.groupdocs.cloud/merger/nodejs/">GroupDocs.Merger Cloud SDK for Node.js</a>, set the desired <code>orientation</code> in the request options, and execute the API call.</p>
</li>
<li>
<p><strong>Is there a way to export Word page Orientation in Node.JS without writing code?</strong><br>
Yes, the same operation can be performed via the REST API using cURL commands, which is useful for quick scripts or integration with other systems.</p>
</li>
<li>
<p><strong>What orientations are supported for Word documents?</strong><br>
The SDK supports both <code>Portrait</code> and <code>Landscape</code> modes through the <code>Orientation</code> enum. You can also specify page ranges to apply the change selectively.</p>
</li>
<li>
<p><strong>Do I need a license to run this in production?</strong><br>
A valid license is required for production deployments. You can start with a temporary license from the <a href="https://purchase.groupdocs.cloud/temporary-license/">temporary license page</a> and upgrade to a full license as your usage grows.</p>
</li>
</ul>
<h2 id="read-more">Read More</h2>
<ul>
<li><a href="https://blog.groupdocs.cloud/merger/password-protect-zip-file-using-password-protection-software/">Password-Protect ZIP File using Password Protection Software</a></li>
<li><a href="https://blog.groupdocs.cloud/merger/password-protect-excel-using-password-protection-service/">Password-Protect Excel using Password Protection Service</a></li>
<li><a href="https://blog.groupdocs.cloud/merger/how-to-combine-multiple-word-documents-in-nodejs/">How to Combine Multiple Word Documents in Node.JS</a></li>
</ul>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
