PDF Editing Issues

Change Acrobat Bookmark Text to Uppercase, Lowercase, or Title Case in C++

Bushra ParveenBushra Parveen Nov 18, 2026 868 views

Question details

The user wants to change PDF bookmark text to uppercase, lowercase, or title case from an Acrobat plug-in written in C++.

Change Acrobat Bookmark Text Case in C++
Product
Adobe Acrobat SDK
Device & OS
Windows
Scenario
An Acrobat plug-in developer needs to convert bookmark text capitalization using C++ or Visual C++.
Observed behavior
Bookmark titles should be converted to the desired case and assigned back to the PDF bookmarks.
Before you start

Identify how your plug-in reads and writes bookmark titles using the Acrobat SDK version you have installed. Check the title's encoding before choosing a string conversion method.

Solution 1Recommended

Convert the Bookmark Title with C++ String Functions

Use C++ string manipulation to change capitalization, then write the result back through the Acrobat SDK.

Case conversion is a string-manipulation task, not a dedicated Acrobat SDK feature. The example below handles basic single-byte English text; it is not a Unicode-aware solution.

The example's title case capitalizes the first character and each character after whitespace. It does not implement editorial title-case rules or treat punctuation as a word boundary.

1
Read the bookmark title

In your Acrobat plug-in, retrieve the bookmark title using the bookmark APIs documented for your SDK version and convert it to a C++ string in the encoding your conversion code expects.

2
Convert the string

In your C++ source file, include <string> and <cctype>. For basic English text, use this function with mode 'u' for uppercase, 'l' for lowercase, or 't' for title case: std::string changeCase(std::string text, char mode) { bool wordStart = true; for (char& ch : text) { unsigned char c = static_cast<unsigned char>(ch); if (mode == 'u') { ch = static_cast<char>(std::toupper(c)); } else if (mode == 'l') { ch = static_cast<char>(std::tolower(c)); } else if (mode == 't') { ch = static_cast<char>(wordStart ? std::toupper(c) : std::tolower(c)); wordStart = std::isspace(c) != 0; } } return text; }

3
Assign and save the title

Convert the result to the text representation required by your Acrobat SDK version, call its bookmark-title setter, and save the PDF through your plug-in's document-saving workflow.

Convert the Bookmark Title with C++ String Functions
For multilingual bookmark titles: Use a Unicode-aware library for case conversion and word boundaries. Applying std::toupper or std::tolower byte by byte to UTF-8 text can produce incorrect results.
Edit PDF bookmarks in WPS Office

Manually Rename PDF Bookmarks in WPS Office

For a manual alternative, open a PDF in WPS Office and edit a bookmark's title to the capitalization you want. This does not replace C++ automation or an Acrobat plug-in.

  1. 1. Open the PDF: Open WPS Office, select Open, and choose the PDF containing the bookmark.
  2. 2. Find the bookmark: Open the Bookmarks panel and locate the title you want to change.
  3. 3. Rename the title: Right-click the bookmark, choose Rename if available, and enter the title in your preferred case.
  4. 4. Save the PDF: Select Save or Save As to keep the updated bookmark title.
Manually update individual PDF bookmark titlesOpen and edit PDFs in a familiar interfaceCompatible with Microsoft Office formats such as DOCX, XLSX, and PPTX
microsoft office alternative - wps office

Frequently Asked Questions

Does the Acrobat SDK have a bookmark case-conversion function?

Case conversion is generally handled by your C++ string library or framework. Use the Acrobat SDK to read the bookmark title and assign the converted text back.

Can I use MFC instead of the C++ standard library?

Yes. If your plug-in uses MFC, use the string functions appropriate to your MFC string type, then convert the result to the text representation required by the Acrobat bookmark API.

Will the C++ example work with UTF-8 bookmark titles?

Not reliably. The example applies single-byte character functions to each byte. For multilingual UTF-8 titles, use a Unicode-aware library and preserve the encoding expected by the Acrobat SDK.

Can I change a bookmark's capitalization without writing code?

Yes. In a PDF editor such as WPS Office, open the Bookmarks panel, right-click the bookmark, and choose Rename if that option is available. Enter the desired capitalization and save the PDF.