SDK or component for rotating a single page 90 degrees in an existing multi-page PDF

Question:I am trying to find application to integrate into an existing Document Imaging application that allows users to rotate individual page that may have been scanned in at an incorrect angle (it happens more often than I would have thought).I have the actual page data rotating correctly across 90/180 degrees, but the page orientation is not rotating along with it. Is there such component or library on VeryPDF allowing to do this?

Answer: When you need to find component or library for rotating PDF file in specified page range, maybe you can have a free trial of this software: VeryPDF Advanced PDF Tools SDK, by which you can rotate PDF and adjust orientation of PDF in specified page range. Meanwhile this software allows you to call it together with applications like C#, VB .NET, MS Visual Basic, Borland Delphi, VBA (MS Office products such as Access) and C++ via COM, C and C++ via native C.  Please check more information of this software on homepage, in the following part, I will show you how to use this software.

Step 1. Free download Advanced PDF Tools SDK

  • This SDK version has been compressed to zip file, when downloading finishes, please extract it to some folder then you can call it to run conversion normally.
  • By the SDK version, you can integrate the corresponding SOFTWARE into your developed software and redistribute it with royalty-free. If the SOFTWARE contains source codes, you have the right to modify and reuse the codes under the Developer License.

Step 2. Rotate PDF a single page 90 degrees in multipage PDF file.

  • When rotate PDF in specified page range, please refer to the following parameters and command line templates:
    For changing page content rotation, please use parameter –@, here is an command line example.
  • pdftools -i "C:\input.pdf" -o "C:\output.pdf" "-@" "90"  -u "2,4-8,29-32,38"   
    to rotate all of the page content of document of 90 degree in specified page range.
    -u "Page Range"      : Set page range

  • For setting page rotation, please add parameter –f. Here is an example for your reference:
    pdftools -i "C:\input.pdf" -o "C:\output.pdf" -f "90"  -u "2,4-8,29-32,38.
    where 90 is the degree of rotation, which can be replaced by other degree such as 180, 270, -90, -180,etc.
  • When you need to call this SDK version from other applications, please refer to the following code template:
  • VC++ Example:
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <time.h>
    #include <io.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <conio.h>
    #include <ctype.h>
    #include <windows.h>
    __declspec(dllexport) int WINAPI VeryPDF_PDFTools(LPCTSTR lpCommand);
    void main()
            char szCommandLine[1024];
            char *lpLicenseKey = "XXXXXXXXXXXXXX";
            sprintf(szCommandLine,"pdftools.exe \"-$\" \"%s\" -x \"0 0 612 792\" -j \"612 792 true\" -i \"%s\" -o \"%s\"",
            lpLicenseKey, "C:\\test.pdf", "C:\\_test.pdf");
            int nRet = VeryPDF_PDFTools(szCommandLine);

By this SDK version software, we can rotate PDF in specified page range. During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Verify Code   If you cannot see the CheckCode image,please refresh the page again!