PDFCLOUD-5200 Add C++ samples#112
Merged
datalogics-tsmith merged 8 commits intoSep 8, 2025
Merged
Conversation
- 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
approved these changes
Sep 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.