Skip to content

PDFCLOUD-5200 Add C++ samples#112

Merged
datalogics-tsmith merged 8 commits into
pdfrest:mainfrom
datalogics-kam:pdfcloud-5200-cplusplus-samples
Sep 8, 2025
Merged

PDFCLOUD-5200 Add C++ samples#112
datalogics-tsmith merged 8 commits into
pdfrest:mainfrom
datalogics-kam:pdfcloud-5200-cplusplus-samples

Conversation

@datalogics-kam

Copy link
Copy Markdown
Contributor

No description provided.

- Enhanced build, test, and development command instructions with vcpkg
  setup and usage examples.
- Added CMake integration patterns for HTTP and JSON libraries (cpr,
  cpp-httplib, nlohmann-json).
- Improved coding style section for clarity and standardization.
- Introduced a sample header template for consistency across examples.
- Revised security, region handling, and environment variable usage
  guidelines.
- Introduced `markdown_json.cpp`, demonstrating a two-step JSON flow
  using pdfRest API to upload a PDF and call the `/markdown` endpoint.
- Added support for dotenv file loading to simplify setting environment
  variables for API integration.
- Updated `.env.example` to include required and optional pdfRest API
  variables.
- Created `CMakeLists.txt` with dependencies for `nlohmann_json` and
  `cpr`, enabling seamless build of the new sample.
- Generated `.gitignore` using Toptal's template for C++ and CMake.
- Includes rules for object files, libraries, executables,
  CMake-generated files, and build directories.
- Added multiple C++ samples demonstrating API flows: JSON payload
  (`markdown_json`, `rasterized_pdf_json`), multipart payload
  (`markdown_multipart`, `rasterized_pdf_multipart`), and complex flows
  (`merge_different_file_types`).
- Organized related samples into separate directories with dedicated
  `CMakeLists.txt` for modular inclusion.
- Enabled dotenv-based environment variable loading for simpler
  integration.
- Updated `CMakeLists.txt` to centralize executable output in the build
  directory and added necessary dependencies (`cpr`, `nlohmann_json`).
- Improved sample input validation, error handling, and API key setup
  for seamless usability.
- Revised comments for consistency and improved guidance.
- Simplified descriptions for optional variables.
- Added note to avoid committing the `.env` file.
- Introduced a comprehensive README for C++ pdfRest API samples,
  covering prerequisites, installation, build, and execution
  instructions.
- Documented various sample categories: JSON payload, multipart payload,
  and complex workflows.
- Included environment variable setup, proxy support, and output
  handling details.
- Ensured clarity and consistency with existing sample documentation.
@datalogics-tsmith datalogics-tsmith merged commit 98afe07 into pdfrest:main Sep 8, 2025
1 check passed
@datalogics-kam datalogics-kam deleted the pdfcloud-5200-cplusplus-samples branch September 15, 2025 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants