IRONSOFTWAREHOME
縦向き & 横向き
import {PdfDocument, PdfPaperOrientation} from "@ironsoftware/ironpdf";

(async () => {
    const options = {
        // For NEW PDF Documents use PdfPaperOrientation
        // PdfPaperOrientation: To choose Landscape or Portrait Orientation in a new PDF document
        paperOrientation: PdfPaperOrientation.Landscape,
    };
 
    const newPdfFromHtml = PdfDocument.fromHtml("<h1> Hello World! </h1>", {renderOptions: options});
    const newPdfFromHtmlFile = PdfDocument.fromHtml("example.html", {renderOptions: options});
    const newPdfFromUrl = PdfDocument.fromUrl("https://ironpdf.com", {renderOptions: options});
    
    // For EXISTING PDFs use setRotation
    // setRotation : To rotate a PDF page and all of its contents
    const existingPdf = PdfDocument.fromFile("old_report.pdf");

    // Rotate specified page
    (await existingPdf).setRotation(90,{pdfPageSelection: [0]});

    // Rotate ALL pages
    (await existingPdf).setRotation(270,{pdfPageSelection: "all"});
    
    (await existingPdf).saveAs("rotated.pdf");
})();
npm i @ironsoftware/ironpdf
縦向き & 横向き

縦向き & 横向き

ページの向きと回転は、90度の回転と横向きの際に視覚的に似て見えるため、時々混同されることがあります。

ページの向きは、ページがどのように最初に配置されるかを具体的に指し、縦(ポートレート)または横(ランドスケープ)の2つのオプションがあります。

一方、ページの回転は、ページの角度を調整することであり、必要に応じてその向きを変更できるようにします。 これは、整列を修正したり特定の表示設定を満たすために役立ちます。 ページの角度は通常、90度、180度、または270度に設定できます。

IronPDF のページの向き設定に関するガイドで、PDF のレンダリングプロセス中のページの向きの設定について詳しく学んでください。 ただし、既存のPDFドキュメントでページの向きを変更することはできません。 それに対して回転は既存のPDFドキュメントに適用できますが、レンダリングプロセス中に調整することはできません。

GitHub で PDF のページ向きの例を見る
GitHubで見る

準備はできましたか?

バージョン:2026.6リリースされたばかり

Key in blue circle

無料の30日間トライアルキーをすぐに入手してください。

Your trial license will be sent to your email address

制限なし。100% ロック解除済み。クレジットカード不要。

OR
bullet_checkedクレジットカードやアカウントの作成は不要です。制限なし。100% ロック解除済み。クレジットカード不要。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried Iron Suite
無料のライブデモを予約する
Booking Badge

世界中の数百万人のエンジニアから信頼されています。

ライセンスはより安く
義務のない相談を受ける
下記のフォームを記入するか、sales@ironsoftware.comにメールしてください。
あなたの詳細は常に守秘されます。
世界中の数百万人のエンジニアから信頼されています。
ライセンスはより安く
あなたの無料30日間の試用キーをすぐに入手。
クレジットカードやアカウントの作成は不要です。
Node.js モジュールダウンロード for PDF
npmでインストール

バージョン: 2026.6

  1. ダウンロードしてNode.js 12+をインストール。
  2. 上記のコマンドをターミナルで実行します。

ライセンスは$999から