Rearrange pages in a PDF fileThis endpoint rearranges pages in a given PDF file based on the specified page order or custom mode. Users can provide a page order as a comma-separated list of page numbers or page ranges, or a custom mode. Input:PDF Output:PDF File InputThe input PDF fileFile IdFile ID for server-side files (can be used instead of fileInput)Page NumbersThe pages to select, Supports ranges (e.g., '1,3,5-9'), or 'all' or functions in the format 'an+b' where 'a' is the multiplier of the page number 'n', and 'b' is a constant (e.g., '2n+1', '3n', '6n-5')Custom ModeCUSTOMREVERSE_ORDERDUPLEX_SORTBOOKLET_SORTSIDE_STITCH_BOOKLET_SORTODD_EVEN_SPLITODD_EVEN_MERGEREMOVE_FIRSTREMOVE_LASTREMOVE_FIRST_AND_LASTDUPLICATEThe custom mode for page rearrangement. Valid values are: CUSTOM: Uses order defined in PageNums DUPLICATE: Duplicate pages n times (if Page order defined as 4, then duplicates each page 4 times)REVERSE_ORDER: Reverses the order of all pages. DUPLEX_SORT: Sorts pages as if all fronts were scanned then all backs in reverse (1, n, 2, n-1, ...). BOOKLET_SORT: Arranges pages for booklet printing (last, first, second, second last, ...). ODD_EVEN_SPLIT: Splits and arranges pages into odd and even numbered pages. ODD_EVEN_MERGE: Merges pages and organises them alternately into odd and even pages. REMOVE_FIRST: Removes the first page. REMOVE_LAST: Removes the last page. REMOVE_FIRST_AND_LAST: Removes both the first and the last pages. ProcessProcessing... ILovePDF Tools - Quick Access 🌙 Try More Tools ✨ Free 🔒 Secure ⚡ FastSecurity Tools Sanitize PDF Remove Password Remove Signature Redact PDF Security Summary Sign PDF Auto Redact Add Watermark Add PasswordGeneral Tools Split PDF Split by Chapters Split Documents Auto Split Resize PDF Rotate PDF Remove Pages Remove Images Organize PDF Multi to Single Page Overlay PDFs Pages to Single Merge PDF Extract Bookmarks Edit Table of Contents Crop PDFConvert Tools URL to PDF PDF to XML PDF to Word PDF to Text/RTF PDF to PowerPoint PDF to PDF/A PDF to Markdown PDF to Images PDF to HTML PDF to CSV Markdown to PDF Images to PDF HTML to PDF Word to PDF PowerPoint to PDF Excel to PDF EML to PDFMisc Tools Update Metadata Enable Form Edit Extract JavaScript Scanner Effect Invert Colors Repair PDF Remove Blank Pages OCR PDF Flatten PDF Extract Images Extract Scans Decompress PDF Optimize PDF Extract Header Add Stamp Add Page Numbers Overlay Image Add Attachments Compress PDF Edit PDFFilter Tools Check Page Size Check Rotation Check Page Count Check File Size Check Text Content Check ImagesAnalysis Tools Security Info Page Dimensions Page Count Form Field Info Font Info Document Properties PDF Info Annotation Info