Skip to content

PDFCLOUD-5203 Initial R samples#106

Merged
datalogics-erics merged 5 commits into
pdfrest:mainfrom
datalogics-kam:pdfcloud-5203-initial-r-examples
Sep 4, 2025
Merged

PDFCLOUD-5203 Initial R samples#106
datalogics-erics merged 5 commits into
pdfrest:mainfrom
datalogics-kam:pdfcloud-5203-initial-r-examples

Conversation

@datalogics-kam

Copy link
Copy Markdown
Contributor

Please review/merge #105 first

@datalogics-kam datalogics-kam force-pushed the pdfcloud-5203-initial-r-examples branch from d546b19 to 7262e01 Compare September 3, 2025 22:29
- Added JSON and Multipart payload examples for generating Markdown and rasterized PDFs.
- Introduced a "Complex Flow" R script for merging multiple file types into a single PDF.
- Included `.Renviron.example` for API key configuration and optional EU endpoint setup.
- Added `README.md` with setup instructions, usage examples, and project structure details.
- Provided `requirements.R` for dependency installation.
- Standardized `tryCatch` usage across all R examples for consistent error handling.
- Improved file extension handling in "Complex Flow" script for better readability.
- Added `.lintr` configuration for styling and removed redundant code.
- Updated `.gitignore` to include `.cache/` directory for local styler cache.
…ple`

- Included URL for GDPR compliance details in `.Renviron.example`, `AGENTS.md`, and R example scripts.
- Enhanced comments to guide users on EU region API usage.
@datalogics-kam datalogics-kam force-pushed the pdfcloud-5203-initial-r-examples branch from 7262e01 to 605fa12 Compare September 4, 2025 15:48
@datalogics-erics

Copy link
Copy Markdown
Contributor

I tested running these R code samples from within an RStudio Notebook. To do so, I copied the code for the markdown.R sample into a blank notebook and replaced the code that sources URL, API Key, and file info from environment variables with hardcoded values. I ran the code in requirements.R to install dependent libraries then ran the sample code without any other modifications, and it worked as expected.

Screenshot 2025-09-04 at 3 07 07 PM

Next I tried the same for the rasterized-pdf.R sample, and that worked as expected:

Screenshot 2025-09-04 at 3 23 42 PM

Finally, I tried the merge-different-file-types.R sample, and that also worked as expected:

Screenshot 2025-09-04 at 3 31 06 PM

I did not test setting up the environment file, installing the requirements from external file, or running this code from the command line, but I believe we have sufficient evidence to show that the samples do successfully integrate with pdfRest via R code.

@datalogics-erics datalogics-erics self-assigned this Sep 4, 2025

@datalogics-erics datalogics-erics left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and confirmed new R code samples run as expected

@datalogics-erics datalogics-erics merged commit 3f90080 into pdfrest:main Sep 4, 2025
1 check passed
@datalogics-kam datalogics-kam deleted the pdfcloud-5203-initial-r-examples branch September 4, 2025 21:04
@pdfrest pdfrest deleted a comment from pk0232428-coder Dec 24, 2025
@pdfrest pdfrest deleted a comment from pk0232428-coder Dec 24, 2025
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