Changing a PDF author programmatically

Question: In my office we have about 1000 PDF that have arbitrary title and author information. My bosses had a spreadsheet created with the PDF filename and an appropriate title and appropriate author information.I would like to find a programmatic way to move the data from the Excel sheet to the PDF attributes?My preferred language is C# so I looked for a C# library to do this, each library I looked at had the author and title fields as read-only.If C# doesn't have a library that works I am okay using VBA, VB.NET, JavaScript... I will take this as an opportunity to learn a new language.  Is there a solution on VeryPDF?

Answer: Now we do not have software which can help you change PDF author through importing from Excel spreadsheet. But we have software which can help you change PDF author programmatically from C#. The software is named as VeryPDF Advanced PDF Tools SDK, by which you can edit PDF descriptions and PDF properties such as title, subject, author, keywords, created time, modified time, creator and producer, etc.;  And by the SDK version, you can call it from 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 related information of this software on homepage, in the following part, let us check how to use this software.

Step 1. Free download Advanced PDF Tools SDK

  • By the software toolkit, you can develop software based on this one and call this software together with other applications.
  • When downloading finishes, it is a zip file. Please extract it to some folder then you can check related elements and help documents.

Step 2. Change PDF author programmatically.

    • When you use this software, please refer to the usage and code templates in extracted folder.
    • When changing PDF author or other basic information, you may need the following parameters, please have a check:

-t [Title]               : Set title
-a [Author]           : Set author
-s [Subject]          : Set subject
-k [Keywords]     : Set keywords
-d [CreatedDate] : Set create date
-m [ModifyDate] : Set modify date
-c [Creator]          : Set creator
-p [Producer]       : Set producer
-D                           : Write document summaries into PDF file in ASCII
-e [MetaData]      : Set MetaData, select a XML file for set metadata or"" to clear metadata

  • When you call this software to change PDF author from C#, please refer to the following code templates:
    #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 \" -a \" -i \"%s\" -o \"%s\"",
    lpLicenseKey, "C:\\test.pdf", "C:\\_test.pdf");
    int nRet = VeryPDF_PDFTools(szCommandLine);
    {
    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)

Random Posts

This entry was posted in Advanced PDF Tools and tagged . Bookmark the permalink.

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!