From f5ffa435d6fdde6bd63f5d5c20f6bd6b6bb586be Mon Sep 17 00:00:00 2001 From: Taylor Smith Date: Tue, 9 Sep 2025 14:38:53 -0500 Subject: [PATCH 01/11] Add eu/gdpr comment to cURL samples --- .../decrypt-add-reencrypt.sh | 23 ++++++++++++------- .../merge-different-file-types.sh | 13 ++++++++--- .../ocr-with-extract-text.sh | 13 ++++++++--- .../pdfa-3b-with-attachment.sh | 11 +++++++-- .../preserve-word-document.sh | 11 +++++++-- .../protected-watermark.sh | 18 ++++++++++----- .../redact-preview-and-finalize.sh | 19 ++++++++++----- .../JSON Payload/batch-delete.sh | 10 +++++++- cURL/Endpoint Examples/JSON Payload/bmp.sh | 11 +++++++-- .../JSON Payload/compressed-pdf.sh | 11 +++++++-- ...decrypted-pdf-with-permissions-password.sh | 19 ++++++++++----- .../JSON Payload/decrypted-pdf.sh | 19 ++++++++++----- .../JSON Payload/delete-resource.sh | 10 +++++++- .../encrypted-pdf-change-password.sh | 19 ++++++++++----- ...-new-password-with-permissions-password.sh | 19 ++++++++++----- .../JSON Payload/encrypted-pdf.sh | 19 ++++++++++----- cURL/Endpoint Examples/JSON Payload/excel.sh | 11 +++++++-- .../JSON Payload/exported-form-data.sh | 11 +++++++-- .../JSON Payload/extracted-images.sh | 11 +++++++-- .../JSON Payload/extracted-text.sh | 11 +++++++-- .../JSON Payload/flattened-annotations-pdf.sh | 11 +++++++-- .../JSON Payload/flattened-forms-pdf.sh | 11 +++++++-- .../JSON Payload/flattened-layers-pdf.sh | 11 +++++++-- .../flattened-transparencies-pdf-medium.sh | 11 +++++++-- .../flattened-transparencies-pdf.sh | 11 +++++++-- .../JSON Payload/get-resource.sh | 9 +++++++- cURL/Endpoint Examples/JSON Payload/gif.sh | 11 +++++++-- cURL/Endpoint Examples/JSON Payload/jpg.sh | 11 +++++++-- .../JSON Payload/linearized-pdf.sh | 11 +++++++-- .../JSON Payload/markdown.sh | 11 +++++++-- .../JSON Payload/merged-pdf.sh | 13 ++++++++--- .../JSON Payload/pdf-html-to-pdf.sh | 10 +++++++- .../JSON Payload/pdf-info.sh | 11 +++++++-- .../JSON Payload/pdf-with-acroforms.sh | 11 +++++++-- .../JSON Payload/pdf-with-added-attachment.sh | 13 ++++++++--- .../JSON Payload/pdf-with-added-image.sh | 13 ++++++++--- .../JSON Payload/pdf-with-added-text.sh | 11 +++++++-- .../JSON Payload/pdf-with-converted-colors.sh | 11 +++++++-- .../pdf-with-imported-form-data.sh | 13 ++++++++--- .../JSON Payload/pdf-with-ocr-text.sh | 11 +++++++-- .../JSON Payload/pdf-with-page-boxes-set.sh | 11 +++++++-- .../pdf-with-redacted-text-applied.sh | 19 ++++++++++----- .../pdf-with-redacted-text-preview.sh | 19 ++++++++++----- cURL/Endpoint Examples/JSON Payload/pdf.sh | 11 +++++++-- cURL/Endpoint Examples/JSON Payload/pdfa.sh | 11 +++++++-- cURL/Endpoint Examples/JSON Payload/pdfx.sh | 11 +++++++-- cURL/Endpoint Examples/JSON Payload/png.sh | 11 +++++++-- .../JSON Payload/powerpoint.sh | 11 +++++++-- .../JSON Payload/rasterized-pdf.sh | 11 +++++++-- ...icted-pdf-add-password-and-restrictions.sh | 19 ++++++++++----- ...ted-pdf-add-password-with-open-password.sh | 19 ++++++++++----- .../restricted-pdf-change-password.sh | 19 ++++++++++----- .../JSON Payload/restricted-pdf.sh | 19 ++++++++++----- .../JSON Payload/signed-pdf-non-pfx.sh | 15 ++++++++---- .../JSON Payload/signed-pdf.sh | 17 ++++++++++---- .../JSON Payload/split-pdf-custom-ranges.sh | 11 +++++++-- .../JSON Payload/split-pdf-delete-page.sh | 11 +++++++-- .../JSON Payload/split-pdf-odd-and-even.sh | 11 +++++++-- .../JSON Payload/split-pdf.sh | 11 +++++++-- cURL/Endpoint Examples/JSON Payload/tif.sh | 11 +++++++-- .../unrestricted-pdf-with-open-password.sh | 19 ++++++++++----- .../JSON Payload/unrestricted-pdf.sh | 19 ++++++++++----- cURL/Endpoint Examples/JSON Payload/unzip.sh | 11 +++++++-- .../JSON Payload/up-toolkit.sh | 9 +++++++- cURL/Endpoint Examples/JSON Payload/upload.sh | 9 +++++++- .../JSON Payload/watermarked-pdf-image.sh | 22 ++++++++++++------ .../JSON Payload/watermarked-pdf.sh | 19 ++++++++++----- cURL/Endpoint Examples/JSON Payload/word.sh | 11 +++++++-- cURL/Endpoint Examples/JSON Payload/zip.sh | 13 ++++++++--- .../Multipart Payload/batch-delete.sh | 9 +++++++- .../Multipart Payload/bmp.sh | 9 +++++++- .../compressed-pdf-custom.sh | 9 +++++++- .../Multipart Payload/compressed-pdf.sh | 9 +++++++- ...decrypted-pdf-with-permissions-password.sh | 17 ++++++++++---- .../Multipart Payload/decrypted-pdf.sh | 17 ++++++++++---- .../Multipart Payload/delete-resource.sh | 10 +++++++- .../encrypted-pdf-change-password.sh | 17 ++++++++++---- ...-new-password-with-permissions-password.sh | 17 ++++++++++---- .../Multipart Payload/encrypted-pdf.sh | 18 +++++++++++---- .../Multipart Payload/excel.sh | 9 +++++++- .../Multipart Payload/exported-form-data.sh | 9 +++++++- .../Multipart Payload/extracted-images.sh | 9 +++++++- .../Multipart Payload/extracted-text.sh | 9 +++++++- .../flattened-annotations-pdf.sh | 9 +++++++- .../Multipart Payload/flattened-forms-pdf.sh | 9 +++++++- .../Multipart Payload/flattened-layers-pdf.sh | 9 +++++++- .../flattened-transparencies-pdf-medium.sh | 9 +++++++- .../flattened-transparencies-pdf.sh | 9 +++++++- .../Multipart Payload/get-resource.sh | 9 +++++++- .../Multipart Payload/gif.sh | 9 +++++++- .../Multipart Payload/jpg.sh | 9 +++++++- .../Multipart Payload/linearized-pdf.sh | 9 +++++++- .../Multipart Payload/markdown.sh | 9 +++++++- .../Multipart Payload/merged-pdf.sh | 9 +++++++- .../Multipart Payload/pdf-html-to-pdf.sh | 9 +++++++- .../Multipart Payload/pdf-info.sh | 9 +++++++- .../Multipart Payload/pdf-with-acroforms.sh | 9 +++++++- .../pdf-with-added-attachment.sh | 9 +++++++- .../Multipart Payload/pdf-with-added-image.sh | 9 +++++++- .../Multipart Payload/pdf-with-added-text.sh | 9 +++++++- .../pdf-with-converted-colors.sh | 9 +++++++- .../pdf-with-imported-form-data.sh | 11 +++++++-- .../Multipart Payload/pdf-with-ocr-text.sh | 9 +++++++- .../pdf-with-page-boxes-set.sh | 9 +++++++- .../pdf-with-redacted-text-applied.sh | 17 ++++++++++---- .../pdf-with-redacted-text-preview.sh | 17 ++++++++++---- .../Multipart Payload/pdf.sh | 9 +++++++- .../Multipart Payload/pdfa.sh | 9 +++++++- .../Multipart Payload/pdfx.sh | 9 +++++++- .../Multipart Payload/png.sh | 9 +++++++- .../Multipart Payload/powerpoint.sh | 9 +++++++- .../Multipart Payload/rasterized-pdf.sh | 9 +++++++- .../Multipart Payload/request-status.sh | 15 ++++++++---- ...icted-pdf-add-password-and-restrictions.sh | 17 ++++++++++---- ...ted-pdf-add-password-with-open-password.sh | 17 ++++++++++---- .../restricted-pdf-change-password.sh | 17 ++++++++++---- .../Multipart Payload/restricted-pdf.sh | 17 ++++++++++---- .../Multipart Payload/signed-pdf-non-pfx.sh | 9 +++++++- .../Multipart Payload/signed-pdf.sh | 9 +++++++- .../split-pdf-custom-ranges.sh | 9 +++++++- .../split-pdf-delete-page.sh | 9 +++++++- .../split-pdf-odd-and-even.sh | 9 +++++++- .../Multipart Payload/split-pdf.sh | 9 +++++++- .../Multipart Payload/tif.sh | 9 +++++++- .../unrestricted-pdf-with-open-password.sh | 17 ++++++++++---- .../Multipart Payload/unrestricted-pdf.sh | 17 ++++++++++---- .../Multipart Payload/unzip.sh | 11 +++++++-- .../Multipart Payload/up-toolkit.sh | 9 +++++++- .../Multipart Payload/upload.sh | 9 +++++++- .../watermarked-pdf-image.sh | 17 ++++++++++---- .../Multipart Payload/watermarked-pdf.sh | 17 ++++++++++---- .../Multipart Payload/word.sh | 9 +++++++- .../Multipart Payload/zip.sh | 9 +++++++- 133 files changed, 1284 insertions(+), 348 deletions(-) diff --git a/cURL/Complex Flow Examples/decrypt-add-reencrypt.sh b/cURL/Complex Flow Examples/decrypt-add-reencrypt.sh index bcb64614..519f5893 100755 --- a/cURL/Complex Flow Examples/decrypt-add-reencrypt.sh +++ b/cURL/Complex Flow Examples/decrypt-add-reencrypt.sh @@ -8,9 +8,16 @@ # and then sending the output with the new image through /encrypted-pdf to # lock it up again. +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + API_KEY="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # place your api key here -DECRYPTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/decrypted-pdf" \ +DECRYPTED_OUTPUT=$(curl -X POST "$API_URL/decrypted-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ @@ -21,12 +28,12 @@ DECRYPTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/decrypted-pdf" \ DECRYPTED_ID=$(jq -r '.outputId' <<< $DECRYPTED_OUTPUT) -ADDED_IMAGE_OUTPUT=$(curl -X POST "https://api.pdfrest.com/pdf-with-added-image" \ +ADDED_IMAGE_OUTPUT=$(curl -X POST "$API_URL/pdf-with-added-image" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ -F "id=$DECRYPTED_ID" \ - -F "image_file=@/path/to/image.png" \ + -F "image_file=@/path/to/file.png" \ -F "output=example_out" \ -F "x=10" \ -F "y=10" \ @@ -35,7 +42,7 @@ ADDED_IMAGE_OUTPUT=$(curl -X POST "https://api.pdfrest.com/pdf-with-added-image" ADDED_IMAGE_ID=$(jq -r '.outputId' <<< $ADDED_IMAGE_OUTPUT) -ENCRYPTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/encrypted-pdf" \ +ENCRYPTED_OUTPUT=$(curl -X POST "$API_URL/encrypted-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ @@ -46,9 +53,9 @@ ENCRYPTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/encrypted-pdf" \ echo $ENCRYPTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -59,7 +66,7 @@ if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then INPUT_PDF_ID=$(jq -r '.inputId' <<< $DECRYPTED_OUTPUT) ADDED_IMAGE_INPUTS=$(jq -r '.inputId | join(",")' <<< $ADDED_IMAGE_OUTPUT) # Includes the DECRYPTED_ID REENCRYPTED_ID=$(jq -r '.outputId' <<< $ENCRYPTED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ diff --git a/cURL/Complex Flow Examples/merge-different-file-types.sh b/cURL/Complex Flow Examples/merge-different-file-types.sh index cf62cf64..61980799 100755 --- a/cURL/Complex Flow Examples/merge-different-file-types.sh +++ b/cURL/Complex Flow Examples/merge-different-file-types.sh @@ -11,9 +11,16 @@ # this sample could be easily used to convert and combine any two file types # that the /pdf route takes as inputs. +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + API_KEY="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # place your api key here -IMAGE_ID=$(curl -X POST "https://api.pdfrest.com/pdf" \ +IMAGE_ID=$(curl -X POST "$API_URL/pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ @@ -22,7 +29,7 @@ IMAGE_ID=$(curl -X POST "https://api.pdfrest.com/pdf" \ | jq -r '.outputId') -PPT_ID=$(curl -X POST "https://api.pdfrest.com/pdf" \ +PPT_ID=$(curl -X POST "$API_URL/pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ @@ -31,7 +38,7 @@ PPT_ID=$(curl -X POST "https://api.pdfrest.com/pdf" \ | jq -r '.outputId') -curl -X POST "https://api.pdfrest.com/merged-pdf" \ +curl -X POST "$API_URL/merged-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ diff --git a/cURL/Complex Flow Examples/ocr-with-extract-text.sh b/cURL/Complex Flow Examples/ocr-with-extract-text.sh index ccee7c08..44f590e2 100755 --- a/cURL/Complex Flow Examples/ocr-with-extract-text.sh +++ b/cURL/Complex Flow Examples/ocr-with-extract-text.sh @@ -8,10 +8,17 @@ # output ID. Then, we will send the output ID to the /extracted-text route, which will # return the newly added text. +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + API_KEY="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # Replace with your API key # Upload PDF for OCR -OCR_PDF_ID=$(curl -s -X POST "https://api.pdfrest.com/pdf-with-ocr-text" \ +OCR_PDF_ID=$(curl -s -X POST "$API_URL/pdf-with-ocr-text" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ @@ -21,7 +28,7 @@ OCR_PDF_ID=$(curl -s -X POST "https://api.pdfrest.com/pdf-with-ocr-text" \ # Extract text from OCR'd PDF -EXTRACT_TEXT_RESPONSE=$(curl -s -X POST "https://api.pdfrest.com/extracted-text" \ +EXTRACT_TEXT_RESPONSE=$(curl -s -X POST "$API_URL/extracted-text" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ @@ -29,4 +36,4 @@ EXTRACT_TEXT_RESPONSE=$(curl -s -X POST "https://api.pdfrest.com/extracted-text" FULL_TEXT=$(echo $EXTRACT_TEXT_RESPONSE | jq -r '.fullText') -echo "Extracted text: $FULL_TEXT" \ No newline at end of file +echo "Extracted text: $FULL_TEXT" diff --git a/cURL/Complex Flow Examples/pdfa-3b-with-attachment.sh b/cURL/Complex Flow Examples/pdfa-3b-with-attachment.sh index 11c9ccf9..f031fdf9 100755 --- a/cURL/Complex Flow Examples/pdfa-3b-with-attachment.sh +++ b/cURL/Complex Flow Examples/pdfa-3b-with-attachment.sh @@ -9,9 +9,16 @@ # Note that there is nothing special about attaching an xml file, and any appropriate # file may be attached and wrapped into the PDF/A conversion. +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + API_KEY="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # place your api key here -ATTACHED_ID=$(curl -X POST "https://api.pdfrest.com/pdf-with-added-attachment" \ +ATTACHED_ID=$(curl -X POST "$API_URL/pdf-with-added-attachment" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ @@ -20,7 +27,7 @@ ATTACHED_ID=$(curl -X POST "https://api.pdfrest.com/pdf-with-added-attachment" \ -F "output=example_out" \ | jq -r '.outputId') -curl -X POST "https://api.pdfrest.com/pdfa" \ +curl -X POST "$API_URL/pdfa" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ diff --git a/cURL/Complex Flow Examples/preserve-word-document.sh b/cURL/Complex Flow Examples/preserve-word-document.sh index 801e9d6f..e2c46f2a 100755 --- a/cURL/Complex Flow Examples/preserve-word-document.sh +++ b/cURL/Complex Flow Examples/preserve-word-document.sh @@ -6,16 +6,23 @@ # a PDF with a call to the /pdf route. Then, we will take that converted PDF # and convert it to the PDF/A format for long-term storage. +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + API_KEY="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # place your api key here -PDF_ID=$(curl -X POST "https://api.pdfrest.com/pdf" \ +PDF_ID=$(curl -X POST "$API_URL/pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ -F "file=@/path/to/file.doc" \ | jq -r '.outputId') -curl -X POST "https://api.pdfrest.com/pdfa" \ +curl -X POST "$API_URL/pdfa" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ diff --git a/cURL/Complex Flow Examples/protected-watermark.sh b/cURL/Complex Flow Examples/protected-watermark.sh index 68347920..bf8a8c45 100755 --- a/cURL/Complex Flow Examples/protected-watermark.sh +++ b/cURL/Complex Flow Examples/protected-watermark.sh @@ -6,10 +6,16 @@ # We will be running the input file through /watermarked-pdf to apply the watermark # and then /restricted-pdf to lock the watermark in. +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" API_KEY="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # place your api key here -WATERMARKED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/watermarked-pdf" \ +WATERMARKED_OUTPUT=$(curl -X POST "$API_URL/watermarked-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ @@ -21,7 +27,7 @@ WATERMARKED_ID=$(jq -r '.outputId' <<< $WATERMARKED_OUTPUT) echo $WATERMARKED_OUTPUT | jq -r '.' -RESTRICTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/restricted-pdf" \ +RESTRICTED_OUTPUT=$(curl -X POST "$API_URL/restricted-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ @@ -34,9 +40,9 @@ RESTRICTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/restricted-pdf" \ echo $RESTRICTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -46,7 +52,7 @@ echo $RESTRICTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then INPUT_PDF_ID=$(jq -r '.inputId[0]' <<< $WATERMARKED_OUTPUT) RESTRICTED_ID=$(jq -r '.outputId' <<< $RESTRICTED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ diff --git a/cURL/Complex Flow Examples/redact-preview-and-finalize.sh b/cURL/Complex Flow Examples/redact-preview-and-finalize.sh index c97ff592..ad1a8630 100644 --- a/cURL/Complex Flow Examples/redact-preview-and-finalize.sh +++ b/cURL/Complex Flow Examples/redact-preview-and-finalize.sh @@ -6,9 +6,16 @@ # the preview stage before utilizing this workflow to ensure that content is # redacted as intended. +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + API_KEY="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # place your api key here REDACTIONS='[{"type":"regex","value":"[Tt]he"}]' -PREVIEW_OUTPUT=$(curl -X POST "https://api.pdfrest.com/pdf-with-redacted-text-preview" \ +PREVIEW_OUTPUT=$(curl -X POST "$API_URL/pdf-with-redacted-text-preview" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ @@ -20,7 +27,7 @@ PREVIEW_PDF_ID=$(jq -r '.outputId' <<< $PREVIEW_OUTPUT) echo $PREVIEW_OUTPUT | jq -r '.' -APPLIED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/pdf-with-redacted-text-applied" \ +APPLIED_OUTPUT=$(curl -X POST "$API_URL/pdf-with-redacted-text-applied" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ @@ -29,9 +36,9 @@ APPLIED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/pdf-with-redacted-text-ap echo $APPLIED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -41,7 +48,7 @@ echo $APPLIED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then INPUT_PDF_ID=$(jq -r '.inputId' <<< $PREVIEW_OUTPUT) APPLIED_PDF_ID=$(jq -r '.outputId' <<< $APPLIED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ diff --git a/cURL/Endpoint Examples/JSON Payload/batch-delete.sh b/cURL/Endpoint Examples/JSON Payload/batch-delete.sh index 5e101252..3d94bc27 100755 --- a/cURL/Endpoint Examples/JSON Payload/batch-delete.sh +++ b/cURL/Endpoint Examples/JSON Payload/batch-delete.sh @@ -1,5 +1,13 @@ #!/bin/sh -curl --request POST "https://api.pdfrest.com/delete" \ + +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/bmp.sh b/cURL/Endpoint Examples/JSON Payload/bmp.sh index ad2b4d86..d387532b 100755 --- a/cURL/Endpoint Examples/JSON Payload/bmp.sh +++ b/cURL/Endpoint Examples/JSON Payload/bmp.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/bmp' \ +curl "$API_URL/bmp" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/compressed-pdf.sh b/cURL/Endpoint Examples/JSON Payload/compressed-pdf.sh index 4c150fc0..86058712 100755 --- a/cURL/Endpoint Examples/JSON Payload/compressed-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/compressed-pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/compressed-pdf' \ +curl "$API_URL/compressed-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"compression_level\": \"medium\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/decrypted-pdf-with-permissions-password.sh b/cURL/Endpoint Examples/JSON Payload/decrypted-pdf-with-permissions-password.sh index eeaf6367..087f86a7 100755 --- a/cURL/Endpoint Examples/JSON Payload/decrypted-pdf-with-permissions-password.sh +++ b/cURL/Endpoint Examples/JSON Payload/decrypted-pdf-with-permissions-password.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,16 +15,16 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -DECRYPTED_OUTPUT=$(curl 'https://api.pdfrest.com/decrypted-pdf' \ +DECRYPTED_OUTPUT=$(curl "$API_URL/decrypted-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"current_open_password\": \"encrypted\", \"current_permissions_password\": \"restricted\"}") echo $DECRYPTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -27,7 +34,7 @@ echo $DECRYPTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then DECRYPTED_ID=$(jq -r '.outputId' <<< $DECRYPTED_OUTPUT) INPUT_PDF_ID=$(jq -r '.inputId' <<< $DECRYPTED_OUTPUT) -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$INPUT_PDF_ID, $DECRYPTED_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/decrypted-pdf.sh b/cURL/Endpoint Examples/JSON Payload/decrypted-pdf.sh index 4ce18ed6..fc82c3f4 100755 --- a/cURL/Endpoint Examples/JSON Payload/decrypted-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/decrypted-pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,16 +15,16 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -DECRYPTED_OUTPUT=$(curl 'https://api.pdfrest.com/decrypted-pdf' \ +DECRYPTED_OUTPUT=$(curl "$API_URL/decrypted-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"current_open_password\": \"encrypted\"}") echo $DECRYPTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -27,7 +34,7 @@ echo $DECRYPTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then DECRYPTED_ID=$(jq -r '.outputId' <<< $DECRYPTED_OUTPUT) INPUT_PDF_ID=$(jq -r '.inputId' <<< $DECRYPTED_OUTPUT) -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$INPUT_PDF_ID, $DECRYPTED_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/delete-resource.sh b/cURL/Endpoint Examples/JSON Payload/delete-resource.sh index 99b83f9c..ec2d2eac 100755 --- a/cURL/Endpoint Examples/JSON Payload/delete-resource.sh +++ b/cURL/Endpoint Examples/JSON Payload/delete-resource.sh @@ -1,3 +1,11 @@ #!/bin/sh -curl --request DELETE "https://api.pdfrest.com/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ + +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl --request DELETE "$API_URL/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-change-password.sh b/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-change-password.sh index 029743a9..4136a4fa 100755 --- a/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-change-password.sh +++ b/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-change-password.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,16 +15,16 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -ENCRYPTED_OUTPUT=$(curl 'https://api.pdfrest.com/encrypted-pdf' \ +ENCRYPTED_OUTPUT=$(curl "$API_URL/encrypted-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"current_open_password\": \"password\", \"new_open_password\": \"new_password\"}") echo $ENCRYPTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -26,7 +33,7 @@ echo $ENCRYPTED_OUTPUT | jq -r '.' # DELETE_SENSITIVE_FILES=true if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then ENCRYPTED_OUTPUT_ID=$(jq -r '.outputId' <<< $ENCRYPTED_OUTPUT) -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$UPLOAD_ID, $ENCRYPTED_OUTPUT_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-new-password-with-permissions-password.sh b/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-new-password-with-permissions-password.sh index 7408897b..5d47675f 100755 --- a/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-new-password-with-permissions-password.sh +++ b/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-new-password-with-permissions-password.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,16 +15,16 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -ENCRYPTED_OUTPUT=$(curl 'https://api.pdfrest.com/encrypted-pdf' \ +ENCRYPTED_OUTPUT=$(curl "$API_URL/encrypted-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"current_permissions_password\": \"password\", \"new_open_password\": \"new_password\"}") echo $ENCRYPTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -26,7 +33,7 @@ echo $ENCRYPTED_OUTPUT | jq -r '.' # DELETE_SENSITIVE_FILES=true if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then ENCRYPTED_OUTPUT_ID=$(jq -r '.outputId' <<< $ENCRYPTED_OUTPUT) -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$UPLOAD_ID, $ENCRYPTED_OUTPUT_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/encrypted-pdf.sh b/cURL/Endpoint Examples/JSON Payload/encrypted-pdf.sh index a721af92..b76720db 100755 --- a/cURL/Endpoint Examples/JSON Payload/encrypted-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/encrypted-pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,16 +15,16 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -ENCRYPTED_OUTPUT=$(curl 'https://api.pdfrest.com/encrypted-pdf' \ +ENCRYPTED_OUTPUT=$(curl "$API_URL/encrypted-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"new_open_password\": \"new_password\"}") echo $ENCRYPTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -26,7 +33,7 @@ echo $ENCRYPTED_OUTPUT | jq -r '.' # DELETE_SENSITIVE_FILES=true if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then ENCRYPTED_OUTPUT_ID=$(jq -r '.outputId' <<< $ENCRYPTED_OUTPUT) -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$UPLOAD_ID, $ENCRYPTED_OUTPUT_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/excel.sh b/cURL/Endpoint Examples/JSON Payload/excel.sh index 3da1a00d..884a340c 100644 --- a/cURL/Endpoint Examples/JSON Payload/excel.sh +++ b/cURL/Endpoint Examples/JSON Payload/excel.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/excel' \ +curl "$API_URL/excel" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/exported-form-data.sh b/cURL/Endpoint Examples/JSON Payload/exported-form-data.sh index 79664060..76cc28d4 100755 --- a/cURL/Endpoint Examples/JSON Payload/exported-form-data.sh +++ b/cURL/Endpoint Examples/JSON Payload/exported-form-data.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/exported-form-data' \ +curl "$API_URL/exported-form-data" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"data_format\": \"xml\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/extracted-images.sh b/cURL/Endpoint Examples/JSON Payload/extracted-images.sh index bceb178a..f1630a3a 100755 --- a/cURL/Endpoint Examples/JSON Payload/extracted-images.sh +++ b/cURL/Endpoint Examples/JSON Payload/extracted-images.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/extracted-images' \ +curl "$API_URL/extracted-images" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"pages\": \"1-last\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/extracted-text.sh b/cURL/Endpoint Examples/JSON Payload/extracted-text.sh index 25b48998..e29c5dac 100755 --- a/cURL/Endpoint Examples/JSON Payload/extracted-text.sh +++ b/cURL/Endpoint Examples/JSON Payload/extracted-text.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/extracted-text' \ +curl "$API_URL/extracted-text" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/flattened-annotations-pdf.sh b/cURL/Endpoint Examples/JSON Payload/flattened-annotations-pdf.sh index 0a8febaa..614f92c0 100755 --- a/cURL/Endpoint Examples/JSON Payload/flattened-annotations-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/flattened-annotations-pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/flattened-annotations-pdf' \ +curl "$API_URL/flattened-annotations-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/flattened-forms-pdf.sh b/cURL/Endpoint Examples/JSON Payload/flattened-forms-pdf.sh index 81634255..8e559538 100755 --- a/cURL/Endpoint Examples/JSON Payload/flattened-forms-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/flattened-forms-pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/flattened-forms-pdf' \ +curl "$API_URL/flattened-forms-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/flattened-layers-pdf.sh b/cURL/Endpoint Examples/JSON Payload/flattened-layers-pdf.sh index 0ced1618..b83264e7 100755 --- a/cURL/Endpoint Examples/JSON Payload/flattened-layers-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/flattened-layers-pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/flattened-layers-pdf' \ +curl "$API_URL/flattened-layers-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf-medium.sh b/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf-medium.sh index 36af1127..4760d870 100755 --- a/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf-medium.sh +++ b/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf-medium.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/flattened-transparencies-pdf' \ +curl "$API_URL/flattened-transparencies-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"quality\": \"medium\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.sh b/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.sh index 9d925c7b..fe2c62c8 100755 --- a/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/flattened-transparencies-pdf' \ +curl "$API_URL/flattened-transparencies-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/get-resource.sh b/cURL/Endpoint Examples/JSON Payload/get-resource.sh index fddd19dc..81f12599 100755 --- a/cURL/Endpoint Examples/JSON Payload/get-resource.sh +++ b/cURL/Endpoint Examples/JSON Payload/get-resource.sh @@ -1 +1,8 @@ -curl -X GET "https://api.pdfrest.com/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?format=url" +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X GET "$API_URL/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?format=url" diff --git a/cURL/Endpoint Examples/JSON Payload/gif.sh b/cURL/Endpoint Examples/JSON Payload/gif.sh index bfaf04f3..f7264b8f 100755 --- a/cURL/Endpoint Examples/JSON Payload/gif.sh +++ b/cURL/Endpoint Examples/JSON Payload/gif.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/gif' \ +curl "$API_URL/gif" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/jpg.sh b/cURL/Endpoint Examples/JSON Payload/jpg.sh index 253f7aba..a5829791 100755 --- a/cURL/Endpoint Examples/JSON Payload/jpg.sh +++ b/cURL/Endpoint Examples/JSON Payload/jpg.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/jpg' \ +curl "$API_URL/jpg" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/linearized-pdf.sh b/cURL/Endpoint Examples/JSON Payload/linearized-pdf.sh index a9272637..91874f8c 100755 --- a/cURL/Endpoint Examples/JSON Payload/linearized-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/linearized-pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/linearized-pdf' \ +curl "$API_URL/linearized-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/markdown.sh b/cURL/Endpoint Examples/JSON Payload/markdown.sh index e78cf293..d239acd6 100644 --- a/cURL/Endpoint Examples/JSON Payload/markdown.sh +++ b/cURL/Endpoint Examples/JSON Payload/markdown.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/markdown' \ +curl "$API_URL/markdown" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/merged-pdf.sh b/cURL/Endpoint Examples/JSON Payload/merged-pdf.sh index 187eb638..4a919729 100755 --- a/cURL/Endpoint Examples/JSON Payload/merged-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/merged-pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_FIRST_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_FIRST_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: first_filename.pdf' \ --data-binary '@/path/to/first_file' \ @@ -8,7 +15,7 @@ UPLOAD_FIRST_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "First file successfully uploaded with an ID of: $UPLOAD_FIRST_FILE_ID" -UPLOAD_SECOND_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +UPLOAD_SECOND_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: second_filename.pdf' \ --data-binary '@/path/to/second_file' \ @@ -16,7 +23,7 @@ UPLOAD_SECOND_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "Second file successfully uploaded with an ID of: $UPLOAD_SECOND_FILE_ID" -curl 'https://api.pdfrest.com/merged-pdf' \ +curl "$API_URL/merged-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": [\"$UPLOAD_FIRST_FILE_ID\", \"$UPLOAD_SECOND_FILE_ID\"], \"pages\":[1,1], \"type\":[\"id\", \"id\"] }" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-html-to-pdf.sh b/cURL/Endpoint Examples/JSON Payload/pdf-html-to-pdf.sh index ef5f39b0..cf4a61da 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-html-to-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-html-to-pdf.sh @@ -1,4 +1,12 @@ -curl 'https://api.pdfrest.com/pdf' \ + +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl "$API_URL/pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw '{ "url": "https://pdfrest.com/"}' | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-info.sh b/cURL/Endpoint Examples/JSON Payload/pdf-info.sh index 4c8cd26a..16391dd0 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-info.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-info.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/pdf-info' \ +curl "$API_URL/pdf-info" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"queries\": \"title,page_count,doc_language,author\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-acroforms.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-acroforms.sh index d86dac1e..a0e4f169 100644 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-acroforms.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-acroforms.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/pdf-with-acroforms' \ +curl "$API_URL/pdf-with-acroforms" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-added-attachment.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-added-attachment.sh index 55819fad..7ae5e6b0 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-added-attachment.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-added-attachment.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_PDF_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_PDF_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/pdf_file' \ @@ -8,7 +15,7 @@ UPLOAD_PDF_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "PDF file successfully uploaded with an ID of: $UPLOAD_PDF_FILE_ID" -UPLOAD_ATTACHMENT_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +UPLOAD_ATTACHMENT_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.xml' \ --data-binary '@/path/to/attachment_file' \ @@ -16,7 +23,7 @@ UPLOAD_ATTACHMENT_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "Attachment file successfully uploaded with an ID of: $UPLOAD_ATTACHMENT_FILE_ID" -curl 'https://api.pdfrest.com/pdf-with-added-attachment' \ +curl "$API_URL/pdf-with-added-attachment" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_PDF_FILE_ID\", \"id_to_attach\": \"$UPLOAD_ATTACHMENT_FILE_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-added-image.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-added-image.sh index 9e23a3f8..e5dffeb1 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-added-image.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-added-image.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_PDF_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_PDF_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/pdf_file' \ @@ -8,7 +15,7 @@ UPLOAD_PDF_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "PDF file successfully uploaded with an ID of: $UPLOAD_PDF_FILE_ID" -UPLOAD_IMAGE_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +UPLOAD_IMAGE_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.png' \ --data-binary '@/path/to/image_file' \ @@ -16,7 +23,7 @@ UPLOAD_IMAGE_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "Image file successfully uploaded with an ID of: $UPLOAD_IMAGE_FILE_ID" -curl 'https://api.pdfrest.com/pdf-with-added-image' \ +curl "$API_URL/pdf-with-added-image" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_PDF_FILE_ID\", \"image_id\": \"$UPLOAD_IMAGE_FILE_ID\", \"page\":1, \"x\":0, \"y\":0 }" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-added-text.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-added-text.sh index 949fb181..33bffc98 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-added-text.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-added-text.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -10,7 +17,7 @@ echo "File successfully uploaded with an ID of: $UPLOAD_ID" TEXT_OPTIONS='[{\"font\":\"Times New Roman\",\"max_width\":\"175\",\"opacity\":\"1\",\"page\":\"1\",\"rotation\":\"0\",\"text\":\"sample text in PDF\",\"text_color_rgb\":\"0,0,0\",\"text_size\":\"30\",\"x\":\"72\",\"y\":\"144\"}]' -curl 'https://api.pdfrest.com/pdf-with-added-text' \ +curl "$API_URL/pdf-with-added-text" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"text_objects\": \"$TEXT_OPTIONS\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-converted-colors.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-converted-colors.sh index f3c818d9..d8e6452a 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-converted-colors.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-converted-colors.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/pdf-with-converted-colors' \ +curl "$API_URL/pdf-with-converted-colors" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"color_profile\": \"srgb\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.sh index 0b5a2746..cc3406c6 100644 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_PDF_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_PDF_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/pdf_file' \ @@ -8,7 +15,7 @@ UPLOAD_PDF_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "PDF file successfully uploaded with an ID of: $UPLOAD_PDF_FILE_ID" -UPLOAD_DATA_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +UPLOAD_DATA_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.xml' \ --data-binary '@/path/to/data_file' \ @@ -16,7 +23,7 @@ UPLOAD_DATA_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "Data file successfully uploaded with an ID of: $UPLOAD_DATA_FILE_ID" -curl 'https://api.pdfrest.com/pdf-with-imported-form-data' \ +curl "$API_URL/pdf-with-imported-form-data" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_PDF_FILE_ID\", \"data_file_id\": \"$UPLOAD_DATA_FILE_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-ocr-text.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-ocr-text.sh index 72917391..7459e7f8 100644 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-ocr-text.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-ocr-text.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/pdf-with-ocr-text' \ +curl "$API_URL/pdf-with-ocr-text" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.sh index 308785e0..a1a4fdd1 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -10,7 +17,7 @@ echo "File successfully uploaded with an ID of: $UPLOAD_ID" BOXES='{"boxes":[{"box":"media","pages":[{"range":"1","left":100,"top":100,"bottom":100,"right":100}]}]}' -curl 'https://api.pdfrest.com/pdf-with-page-boxes-set' \ +curl "$API_URL/pdf-with-page-boxes-set" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"output\": \"example_out.pdf\", \"id\": \"$UPLOAD_ID\", \"boxes\": \"{\\\"boxes\\\":[{\\\"box\\\":\\\"media\\\",\\\"pages\\\":[{\\\"range\\\":\\\"1\\\",\\\"left\\\":100,\\\"top\\\":100,\\\"bottom\\\":100,\\\"right\\\":100}]}]}\" }" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.sh index dcef572b..32762ab8 100644 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,16 +15,16 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -REDACTED_OUTPUT=$(curl 'https://api.pdfrest.com/pdf-with-redacted-text-applied' \ +REDACTED_OUTPUT=$(curl "$API_URL/pdf-with-redacted-text-applied" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}") echo $REDACTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. @@ -28,7 +35,7 @@ echo $REDACTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then PREVIEW_PDF_ID=$(jq -r '.inputId' <<< $REDACTED_OUTPUT) APPLIED_PDF_ID=$(jq -r '.outputId' <<< $REDACTED_OUTPUT) -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$UPLOAD_ID, $PREVIEW_PDF_ID, $APPLIED_PDF_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.sh index 5df12f98..307e4982 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -10,16 +17,16 @@ echo "File successfully uploaded with an ID of: $UPLOAD_ID" REDACTIONS='[{\"type\":\"preset\",\"value\":\"email\"},{\"type\":\"regex\",\"value\":\"(\\\\+\\\\d{1,2}\\\\s)?\\\\(?\\\\d{3}\\\\)?[\\\\s.-]\\\\d{3}[\\\\s.-]\\\\d{4}\"},{\"type\":\"literal\",\"value\":\"word\"}]' -PREVIEW_OUTPUT=$(curl 'https://api.pdfrest.com/pdf-with-redacted-text-preview' \ +PREVIEW_OUTPUT=$(curl "$API_URL/pdf-with-redacted-text-preview" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"redactions\": \"$REDACTIONS\"}") echo $PREVIEW_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # IMPORTANT: Do not delete the PREVIEW_PDF_ID file until after the redaction is applied @@ -31,7 +38,7 @@ PREVIEW_PDF_ID=$(jq -r '.outputId' <<< $PREVIEW_OUTPUT) # Enable by uncommenting the next line to delete sensitive files # DELETE_SENSITIVE_FILES=true if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$UPLOAD_ID, $PREVIEW_PDF_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdf.sh b/cURL/Endpoint Examples/JSON Payload/pdf.sh index 3962af7d..5b8272b5 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.png' \ --data-binary '@//path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/pdf' \ +curl "$API_URL/pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdfa.sh b/cURL/Endpoint Examples/JSON Payload/pdfa.sh index 2a57d2c9..b0bb17dd 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdfa.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdfa.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/pdfa' \ +curl "$API_URL/pdfa" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"output_type\": \"PDF/A-1b\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/pdfx.sh b/cURL/Endpoint Examples/JSON Payload/pdfx.sh index 431d0a37..ec888500 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdfx.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdfx.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/pdfx' \ +curl "$API_URL/pdfx" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"output_type\": \"PDF/X-4\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/png.sh b/cURL/Endpoint Examples/JSON Payload/png.sh index f1fa60cd..0c834d83 100755 --- a/cURL/Endpoint Examples/JSON Payload/png.sh +++ b/cURL/Endpoint Examples/JSON Payload/png.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/png' \ +curl "$API_URL/png" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/powerpoint.sh b/cURL/Endpoint Examples/JSON Payload/powerpoint.sh index 961bdf97..4ab21061 100644 --- a/cURL/Endpoint Examples/JSON Payload/powerpoint.sh +++ b/cURL/Endpoint Examples/JSON Payload/powerpoint.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/powerpoint' \ +curl "$API_URL/powerpoint" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/rasterized-pdf.sh b/cURL/Endpoint Examples/JSON Payload/rasterized-pdf.sh index 6546d77e..bdca4353 100755 --- a/cURL/Endpoint Examples/JSON Payload/rasterized-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/rasterized-pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/rasterized-pdf' \ +curl "$API_URL/rasterized-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-and-restrictions.sh b/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-and-restrictions.sh index f5720091..f49fedcc 100755 --- a/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-and-restrictions.sh +++ b/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-and-restrictions.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,16 +15,16 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -RESTRICTED_OUTPUT=$(curl 'https://api.pdfrest.com/restricted-pdf' \ +RESTRICTED_OUTPUT=$(curl "$API_URL/restricted-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"new_permissions_password\": \"restricted\", \"restrictions\": [\"print_low\", \"accessibility_off\"]}") echo $RESTRICTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -26,7 +33,7 @@ echo $RESTRICTED_OUTPUT | jq -r '.' # DELETE_SENSITIVE_FILES=true if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then RESTRICTED_OUTPUT_ID=$(jq -r '.outputId' <<< $RESTRICTED_OUTPUT) -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$UPLOAD_ID, $RESTRICTED_OUTPUT_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-with-open-password.sh b/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-with-open-password.sh index 5e717651..417c7e08 100755 --- a/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-with-open-password.sh +++ b/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-with-open-password.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,16 +15,16 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -RESTRICTED_OUTPUT=$(curl 'https://api.pdfrest.com/restricted-pdf' \ +RESTRICTED_OUTPUT=$(curl "$API_URL/restricted-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"current_open_password\": \"encrypted\", \"new_permissions_password\": \"restricted\", \"restrictions\": [\"print_low\"]}") echo $RESTRICTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -26,7 +33,7 @@ echo $RESTRICTED_OUTPUT | jq -r '.' # DELETE_SENSITIVE_FILES=true if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then RESTRICTED_OUTPUT_ID=$(jq -r '.outputId' <<< $RESTRICTED_OUTPUT) -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$UPLOAD_ID, $RESTRICTED_OUTPUT_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/restricted-pdf-change-password.sh b/cURL/Endpoint Examples/JSON Payload/restricted-pdf-change-password.sh index 09fbdffd..0f6cc64d 100755 --- a/cURL/Endpoint Examples/JSON Payload/restricted-pdf-change-password.sh +++ b/cURL/Endpoint Examples/JSON Payload/restricted-pdf-change-password.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,16 +15,16 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -RESTRICTED_OUTPUT=$(curl 'https://api.pdfrest.com/restricted-pdf' \ +RESTRICTED_OUTPUT=$(curl "$API_URL/restricted-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"current_permissions_password\": \"password\", \"new_permissions_password\": \"restricted\", \"restrictions\": [\"print_low\"]}") echo $RESTRICTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -26,7 +33,7 @@ echo $RESTRICTED_OUTPUT | jq -r '.' # DELETE_SENSITIVE_FILES=true if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then RESTRICTED_OUTPUT_ID=$(jq -r '.outputId' <<< $RESTRICTED_OUTPUT) -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$UPLOAD_ID, $RESTRICTED_OUTPUT_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/restricted-pdf.sh b/cURL/Endpoint Examples/JSON Payload/restricted-pdf.sh index f45ba379..6aa62bd3 100755 --- a/cURL/Endpoint Examples/JSON Payload/restricted-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/restricted-pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,16 +15,16 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -RESTRICTED_OUTPUT=$(curl 'https://api.pdfrest.com/restricted-pdf' \ +RESTRICTED_OUTPUT=$(curl "$API_URL/restricted-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\",\"new_permissions_password\": \"restricted\"}") echo $RESTRICTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -26,7 +33,7 @@ echo $RESTRICTED_OUTPUT | jq -r '.' # DELETE_SENSITIVE_FILES=true if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then RESTRICTED_OUTPUT_ID=$(jq -r '.outputId' <<< $RESTRICTED_OUTPUT) -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$UPLOAD_ID, $RESTRICTED_OUTPUT_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.sh b/cURL/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.sh index 18de09bd..a1e4a58a 100644 --- a/cURL/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.sh +++ b/cURL/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.sh @@ -1,8 +1,15 @@ #!/bin/sh +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + API_KEY=xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -PDF_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +PDF_ID=$(curl --location "$API_URL/upload" \ --header "Api-Key: $API_KEY" \ --header 'content-filename: input.pdf' \ --data-binary '@/path/to/input.pdf' \ @@ -10,7 +17,7 @@ PDF_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "PDF successfully uploaded with an ID of: $PDF_ID" -CERT_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +CERT_ID=$(curl --location "$API_URL/upload" \ --header "Api-Key: $API_KEY" \ --header 'content-filename: certificate.pem' \ --data-binary '@/path/to/certificate.pem' \ @@ -18,7 +25,7 @@ CERT_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "Certificate file successfully uploaded with an ID of: $CREDS_ID" -KEY_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +KEY_ID=$(curl --location "$API_URL/upload" \ --header "Api-Key: $API_KEY" \ --header 'content-filename: private_key.pem' \ --data-binary '@/path/to/private_key.pem' \ @@ -28,7 +35,7 @@ echo "Key file successfully uploaded with an ID of: $PASSPHRASE_ID" SIGNATURE_CONFIG='{\"type\": \"new\",\"name\": \"esignature\",\"location\": {\"bottom_left\": { \"x\": \"0\", \"y\": \"0\" },\"top_right\": { \"x\": \"216\", \"y\": \"72\" },\"page\": 1},\"display\": {\"include_datetime\": \"true\"}}' -curl 'https://api.pdfrest.com/signed-pdf' \ +curl "$API_URL/signed-pdf" \ --header "Api-Key: $API_KEY" \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$PDF_ID\", \"certificate_id\": \"$CERT_ID\", \"private_key_id\": \"$KEY_ID\", \"signature_configuration\": \"$SIGNATURE_CONFIG\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/signed-pdf.sh b/cURL/Endpoint Examples/JSON Payload/signed-pdf.sh index 8b48e9e3..e17b1b19 100755 --- a/cURL/Endpoint Examples/JSON Payload/signed-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/signed-pdf.sh @@ -1,8 +1,15 @@ #!/bin/sh +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + API_KEY=xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -PDF_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +PDF_ID=$(curl --location "$API_URL/upload" \ --header "Api-Key: $API_KEY" \ --header 'content-filename: input.pdf' \ --data-binary '@/path/to/input.pdf' \ @@ -10,7 +17,7 @@ PDF_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "PDF successfully uploaded with an ID of: $PDF_ID" -CREDS_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +CREDS_ID=$(curl --location "$API_URL/upload" \ --header "Api-Key: $API_KEY" \ --header 'content-filename: credentials.pfx' \ --data-binary '@/path/to/credentials.pfx' \ @@ -18,7 +25,7 @@ CREDS_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "Credential file successfully uploaded with an ID of: $CREDS_ID" -PASSPHRASE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +PASSPHRASE_ID=$(curl --location "$API_URL/upload" \ --header "Api-Key: $API_KEY" \ --header 'content-filename: passphrase.txt' \ --data-binary '@/path/to/passphrase.txt' \ @@ -26,7 +33,7 @@ PASSPHRASE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "Passphrase file successfully uploaded with an ID of: $PASSPHRASE_ID" -LOGO_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +LOGO_ID=$(curl --location "$API_URL/upload" \ --header "Api-Key: $API_KEY" \ --header 'content-filename: logo.png' \ --data-binary '@/path/to/logo.png' \ @@ -36,7 +43,7 @@ echo "Logo image successfully uploaded with an ID of: $LOGO_ID" SIGNATURE_CONFIG='{\"type\": \"new\",\"name\": \"esignature\",\"logo_opacity\": \"0.25\",\"location\": {\"bottom_left\": { \"x\": \"0\", \"y\": \"0\" },\"top_right\": { \"x\": \"216\", \"y\": \"72\" },\"page\": 1},\"display\": {\"include_distinguished_name\": \"true\",\"include_datetime\": \"true\",\"contact\": \"My contact info\",\"location\": \"My location\",\"name\": \"John Doe\",\"reason\": \"My reason for signing\"}}' -curl 'https://api.pdfrest.com/signed-pdf' \ +curl "$API_URL/signed-pdf" \ --header "Api-Key: $API_KEY" \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$PDF_ID\", \"pfx_credential_id\": \"$CREDS_ID\", \"pfx_passphrase_id\": \"$PASSPHRASE_ID\", \"logo_id\": \"$LOGO_ID\", \"signature_configuration\": \"$SIGNATURE_CONFIG\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/split-pdf-custom-ranges.sh b/cURL/Endpoint Examples/JSON Payload/split-pdf-custom-ranges.sh index b55eae40..00f129de 100755 --- a/cURL/Endpoint Examples/JSON Payload/split-pdf-custom-ranges.sh +++ b/cURL/Endpoint Examples/JSON Payload/split-pdf-custom-ranges.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/split-pdf' \ +curl "$API_URL/split-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"pages\": [1,2]}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/split-pdf-delete-page.sh b/cURL/Endpoint Examples/JSON Payload/split-pdf-delete-page.sh index 16922a7b..13e39398 100755 --- a/cURL/Endpoint Examples/JSON Payload/split-pdf-delete-page.sh +++ b/cURL/Endpoint Examples/JSON Payload/split-pdf-delete-page.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/split-pdf' \ +curl "$API_URL/split-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"pages\": [\"1-3\",5,6]}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/split-pdf-odd-and-even.sh b/cURL/Endpoint Examples/JSON Payload/split-pdf-odd-and-even.sh index a60bd028..333f40c3 100755 --- a/cURL/Endpoint Examples/JSON Payload/split-pdf-odd-and-even.sh +++ b/cURL/Endpoint Examples/JSON Payload/split-pdf-odd-and-even.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/split-pdf' \ +curl "$API_URL/split-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\", \"pages\": [\"even\",\"odd\"]}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/split-pdf.sh b/cURL/Endpoint Examples/JSON Payload/split-pdf.sh index 69d4604a..7a71de34 100755 --- a/cURL/Endpoint Examples/JSON Payload/split-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/split-pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/split-pdf' \ +curl "$API_URL/split-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/tif.sh b/cURL/Endpoint Examples/JSON Payload/tif.sh index 14c660c3..1ac85c01 100755 --- a/cURL/Endpoint Examples/JSON Payload/tif.sh +++ b/cURL/Endpoint Examples/JSON Payload/tif.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/tif' \ +curl "$API_URL/tif" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf-with-open-password.sh b/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf-with-open-password.sh index c0af7d40..95741c3f 100755 --- a/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf-with-open-password.sh +++ b/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf-with-open-password.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,16 +15,16 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -UNRESTRICTED_OUTPUT=$(curl 'https://api.pdfrest.com/unrestricted-pdf' \ +UNRESTRICTED_OUTPUT=$(curl "$API_URL/unrestricted-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\",\"current_open_password\": \"restricted\", \"current_permissions_password\":\"restricted\"}") echo $UNRESTRICTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -27,7 +34,7 @@ echo $UNRESTRICTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then UNRESTRICTED_ID=$(jq -r '.outputId' <<< $UNRESTRICTED_OUTPUT) INPUT_PDF_ID=$(jq -r '.inputId' <<< $UNRESTRICTED_OUTPUT) -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$INPUT_PDF_ID, $UNRESTRICTED_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf.sh b/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf.sh index 30c01207..53abf3ed 100755 --- a/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,16 +15,16 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -UNRESTRICTED_OUTPUT=$(curl 'https://api.pdfrest.com/unrestricted-pdf' \ +UNRESTRICTED_OUTPUT=$(curl "$API_URL/unrestricted-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\",\"current_permissions_password\":\"restricted\"}") echo $UNRESTRICTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -27,7 +34,7 @@ echo $UNRESTRICTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then UNRESTRICTED_ID=$(jq -r '.outputId' <<< $UNRESTRICTED_OUTPUT) INPUT_PDF_ID=$(jq -r '.inputId' <<< $UNRESTRICTED_OUTPUT) -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$INPUT_PDF_ID, $UNRESTRICTED_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/unzip.sh b/cURL/Endpoint Examples/JSON Payload/unzip.sh index 8d5de4a3..ceb032c5 100755 --- a/cURL/Endpoint Examples/JSON Payload/unzip.sh +++ b/cURL/Endpoint Examples/JSON Payload/unzip.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.zip' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/unzip' \ +curl "$API_URL/unzip" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/up-toolkit.sh b/cURL/Endpoint Examples/JSON Payload/up-toolkit.sh index e66dd9e0..ed45c5e6 100755 --- a/cURL/Endpoint Examples/JSON Payload/up-toolkit.sh +++ b/cURL/Endpoint Examples/JSON Payload/up-toolkit.sh @@ -1,2 +1,9 @@ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + #up-forms and up-office can be used to query the other tools -curl -X GET "https://api.pdfrest.com/up-toolkit" +curl -X GET "$API_URL/up-toolkit" diff --git a/cURL/Endpoint Examples/JSON Payload/upload.sh b/cURL/Endpoint Examples/JSON Payload/upload.sh index 4fe51310..08defa09 100755 --- a/cURL/Endpoint Examples/JSON Payload/upload.sh +++ b/cURL/Endpoint Examples/JSON Payload/upload.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'api-key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ diff --git a/cURL/Endpoint Examples/JSON Payload/watermarked-pdf-image.sh b/cURL/Endpoint Examples/JSON Payload/watermarked-pdf-image.sh index f94a9980..3cdbad40 100755 --- a/cURL/Endpoint Examples/JSON Payload/watermarked-pdf-image.sh +++ b/cURL/Endpoint Examples/JSON Payload/watermarked-pdf-image.sh @@ -1,5 +1,13 @@ #!/bin/sh -UPLOAD_PDF_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ + +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_PDF_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: pdf_filename.pdf' \ --data-binary '@/path/to/pdf_file' \ @@ -7,7 +15,7 @@ UPLOAD_PDF_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "PDF file successfully uploaded with an ID of: $UPLOAD_PDF_FILE_ID" -UPLOAD_WATERMARK_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +UPLOAD_WATERMARK_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: watermark_filename.pdf' \ --data-binary '@/path/to/watermark_file' \ @@ -15,16 +23,16 @@ UPLOAD_WATERMARK_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "Watermark file successfully uploaded with an ID of: $UPLOAD_WATERMARK_FILE_ID" -WATERMARKED_OUTPUT=$(curl 'https://api.pdfrest.com/watermarked-pdf' \ +WATERMARKED_OUTPUT=$(curl "$API_URL/watermarked-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_PDF_FILE_ID\", \"watermark_file_id\": \"$UPLOAD_WATERMARK_FILE_ID\" }") echo $WATERMARKED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -33,7 +41,7 @@ echo $WATERMARKED_OUTPUT | jq -r '.' # DELETE_SENSITIVE_FILES=true if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then WATERMARKED_OUTPUT_ID=$(jq -r '.outputId' <<< $WATERMARKED_OUTPUT) -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$UPLOAD_PDF_FILE_ID, $UPLOAD_WATERMARK_FILE_ID, $WATERMARKED_OUTPUT_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/watermarked-pdf.sh b/cURL/Endpoint Examples/JSON Payload/watermarked-pdf.sh index 68460e63..23cdcae6 100755 --- a/cURL/Endpoint Examples/JSON Payload/watermarked-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/watermarked-pdf.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_PDF_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_PDF_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -9,16 +16,16 @@ UPLOAD_PDF_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "PDF file successfully uploaded with an ID of: $UPLOAD_PDF_FILE_ID" -WATERMARKED_OUTPUT=$(curl 'https://api.pdfrest.com/watermarked-pdf' \ +WATERMARKED_OUTPUT=$(curl "$API_URL/watermarked-pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_PDF_FILE_ID\", \"watermark_text\": \"watermark\" }") echo $WATERMARKED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -27,7 +34,7 @@ echo $WATERMARKED_OUTPUT | jq -r '.' # DELETE_SENSITIVE_FILES=true if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then WATERMARKED_OUTPUT_ID=$(jq -r '.outputId' <<< $WATERMARKED_OUTPUT) -curl --request POST "https://api.pdfrest.com/delete" \ +curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"ids\": \"$UPLOAD_PDF_FILE_ID, $WATERMARKED_OUTPUT_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/word.sh b/cURL/Endpoint Examples/JSON Payload/word.sh index da5fbf29..364fe1ec 100644 --- a/cURL/Endpoint Examples/JSON Payload/word.sh +++ b/cURL/Endpoint Examples/JSON Payload/word.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: filename.pdf' \ --data-binary '@/path/to/file' \ @@ -8,7 +15,7 @@ UPLOAD_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "File successfully uploaded with an ID of: $UPLOAD_ID" -curl 'https://api.pdfrest.com/word' \ +curl "$API_URL/word" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": \"$UPLOAD_ID\"}" | jq -r '.' diff --git a/cURL/Endpoint Examples/JSON Payload/zip.sh b/cURL/Endpoint Examples/JSON Payload/zip.sh index 4353c638..fcffe1af 100755 --- a/cURL/Endpoint Examples/JSON Payload/zip.sh +++ b/cURL/Endpoint Examples/JSON Payload/zip.sh @@ -1,6 +1,13 @@ #!/bin/sh -UPLOAD_FIRST_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UPLOAD_FIRST_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: first_filename.pdf' \ --data-binary '@/path/to/first_file' \ @@ -8,7 +15,7 @@ UPLOAD_FIRST_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "First file successfully uploaded with an ID of: $UPLOAD_FIRST_FILE_ID" - UPLOAD_SECOND_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ + UPLOAD_SECOND_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'content-filename: second_filename.pdf' \ --data-binary '@//path/to/second_file' \ @@ -16,7 +23,7 @@ UPLOAD_FIRST_FILE_ID=$(curl --location 'https://api.pdfrest.com/upload' \ echo "Second file successfully uploaded with an ID of: $UPLOAD_SECOND_FILE_ID" -curl 'https://api.pdfrest.com/zip' \ +curl "$API_URL/zip" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data-raw "{ \"id\": [\"$UPLOAD_FIRST_FILE_ID\", \"$UPLOAD_SECOND_FILE_ID\"]}" | jq -r '.' diff --git a/cURL/Endpoint Examples/Multipart Payload/batch-delete.sh b/cURL/Endpoint Examples/Multipart Payload/batch-delete.sh index 66f22e3f..65f223ef 100755 --- a/cURL/Endpoint Examples/Multipart Payload/batch-delete.sh +++ b/cURL/Endpoint Examples/Multipart Payload/batch-delete.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/delete" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/bmp.sh b/cURL/Endpoint Examples/Multipart Payload/bmp.sh index 7a5800a3..66659f20 100755 --- a/cURL/Endpoint Examples/Multipart Payload/bmp.sh +++ b/cURL/Endpoint Examples/Multipart Payload/bmp.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/bmp" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/bmp" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/compressed-pdf-custom.sh b/cURL/Endpoint Examples/Multipart Payload/compressed-pdf-custom.sh index 49aa5f11..a2ea1703 100755 --- a/cURL/Endpoint Examples/Multipart Payload/compressed-pdf-custom.sh +++ b/cURL/Endpoint Examples/Multipart Payload/compressed-pdf-custom.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/compressed-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/compressed-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/compressed-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/compressed-pdf.sh index 13fb428b..6eab236e 100755 --- a/cURL/Endpoint Examples/Multipart Payload/compressed-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/compressed-pdf.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/compressed-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/compressed-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf-with-permissions-password.sh b/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf-with-permissions-password.sh index 448528d1..93e90f15 100755 --- a/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf-with-permissions-password.sh +++ b/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf-with-permissions-password.sh @@ -1,4 +1,11 @@ -DECRYPTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/decrypted-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +DECRYPTED_OUTPUT=$(curl -X POST "$API_URL/decrypted-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -9,9 +16,9 @@ DECRYPTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/decrypted-pdf" \ echo $DECRYPTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -21,7 +28,7 @@ echo $DECRYPTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then DECRYPTED_ID=$(jq -r '.outputId' <<< $DECRYPTED_OUTPUT) INPUT_PDF_ID=$(jq -r '.inputId' <<< $DECRYPTED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf.sh index d1f753aa..265df0ef 100755 --- a/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf.sh @@ -1,4 +1,11 @@ -DECRYPTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/decrypted-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +DECRYPTED_OUTPUT=$(curl -X POST "$API_URL/decrypted-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -8,9 +15,9 @@ DECRYPTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/decrypted-pdf" \ echo $DECRYPTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -20,7 +27,7 @@ echo $DECRYPTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then DECRYPTED_ID=$(jq -r '.outputId' <<< $DECRYPTED_OUTPUT) INPUT_PDF_ID=$(jq -r '.inputId' <<< $DECRYPTED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/delete-resource.sh b/cURL/Endpoint Examples/Multipart Payload/delete-resource.sh index 99b83f9c..ec2d2eac 100644 --- a/cURL/Endpoint Examples/Multipart Payload/delete-resource.sh +++ b/cURL/Endpoint Examples/Multipart Payload/delete-resource.sh @@ -1,3 +1,11 @@ #!/bin/sh -curl --request DELETE "https://api.pdfrest.com/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ + +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl --request DELETE "$API_URL/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-change-password.sh b/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-change-password.sh index c9d8c60e..fe890eac 100755 --- a/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-change-password.sh +++ b/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-change-password.sh @@ -1,4 +1,11 @@ -ENCRYPTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/encrypted-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +ENCRYPTED_OUTPUT=$(curl -X POST "$API_URL/encrypted-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -9,9 +16,9 @@ ENCRYPTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/encrypted-pdf" \ echo $ENCRYPTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -21,7 +28,7 @@ echo $ENCRYPTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then INPUT_PDF_ID=$(jq -r '.inputId' <<< $ENCRYPTED_OUTPUT) OUTPUT_PDF_ID=$(jq -r '.outputId' <<< $ENCRYPTED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-new-password-with-permissions-password.sh b/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-new-password-with-permissions-password.sh index 0cf2cd89..8df8ead2 100755 --- a/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-new-password-with-permissions-password.sh +++ b/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-new-password-with-permissions-password.sh @@ -1,4 +1,11 @@ -ENCRYPTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/encrypted-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +ENCRYPTED_OUTPUT=$(curl -X POST "$API_URL/encrypted-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -9,9 +16,9 @@ ENCRYPTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/encrypted-pdf" \ echo $ENCRYPTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -21,7 +28,7 @@ echo $ENCRYPTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then INPUT_PDF_ID=$(jq -r '.inputId' <<< $ENCRYPTED_OUTPUT) OUTPUT_PDF_ID=$(jq -r '.outputId' <<< $ENCRYPTED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf.sh index 3f728b6d..d2f9bdc4 100755 --- a/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf.sh @@ -1,4 +1,12 @@ -ENCRYPTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/encrypted-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + + +ENCRYPTED_OUTPUT=$(curl -X POST "$API_URL/encrypted-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -8,9 +16,9 @@ ENCRYPTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/encrypted-pdf" \ echo $ENCRYPTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -20,7 +28,7 @@ echo $ENCRYPTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then INPUT_PDF_ID=$(jq -r '.inputId' <<< $ENCRYPTED_OUTPUT) OUTPUT_PDF_ID=$(jq -r '.outputId' <<< $ENCRYPTED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/excel.sh b/cURL/Endpoint Examples/Multipart Payload/excel.sh index ee4dcbf8..27726556 100644 --- a/cURL/Endpoint Examples/Multipart Payload/excel.sh +++ b/cURL/Endpoint Examples/Multipart Payload/excel.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/excel" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/excel" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/exported-form-data.sh b/cURL/Endpoint Examples/Multipart Payload/exported-form-data.sh index cf594dda..9d84cbc3 100755 --- a/cURL/Endpoint Examples/Multipart Payload/exported-form-data.sh +++ b/cURL/Endpoint Examples/Multipart Payload/exported-form-data.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/exported-form-data" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/exported-form-data" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/extracted-images.sh b/cURL/Endpoint Examples/Multipart Payload/extracted-images.sh index 771f7c5d..f11e8d00 100755 --- a/cURL/Endpoint Examples/Multipart Payload/extracted-images.sh +++ b/cURL/Endpoint Examples/Multipart Payload/extracted-images.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/extracted-images" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/extracted-images" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/extracted-text.sh b/cURL/Endpoint Examples/Multipart Payload/extracted-text.sh index a7d54dd2..a41285ba 100755 --- a/cURL/Endpoint Examples/Multipart Payload/extracted-text.sh +++ b/cURL/Endpoint Examples/Multipart Payload/extracted-text.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/extracted-text" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/extracted-text" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.sh index 612e6a27..5711529f 100755 --- a/cURL/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/flattened-annotations-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/flattened-annotations-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/flattened-forms-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/flattened-forms-pdf.sh index d65adeac..61a8f963 100644 --- a/cURL/Endpoint Examples/Multipart Payload/flattened-forms-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/flattened-forms-pdf.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/flattened-forms-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/flattened-forms-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/flattened-layers-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/flattened-layers-pdf.sh index d854e2d0..672dccd2 100755 --- a/cURL/Endpoint Examples/Multipart Payload/flattened-layers-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/flattened-layers-pdf.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/flattened-layers-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/flattened-layers-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf-medium.sh b/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf-medium.sh index 1ca2b845..a3350ede 100755 --- a/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf-medium.sh +++ b/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf-medium.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/flattened-transparencies-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/flattened-transparencies-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.sh index e63a949e..9ec4eb59 100755 --- a/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/flattened-transparencies-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/flattened-transparencies-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/get-resource.sh b/cURL/Endpoint Examples/Multipart Payload/get-resource.sh index fddd19dc..81f12599 100755 --- a/cURL/Endpoint Examples/Multipart Payload/get-resource.sh +++ b/cURL/Endpoint Examples/Multipart Payload/get-resource.sh @@ -1 +1,8 @@ -curl -X GET "https://api.pdfrest.com/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?format=url" +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X GET "$API_URL/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?format=url" diff --git a/cURL/Endpoint Examples/Multipart Payload/gif.sh b/cURL/Endpoint Examples/Multipart Payload/gif.sh index 8df51d38..8daedd95 100755 --- a/cURL/Endpoint Examples/Multipart Payload/gif.sh +++ b/cURL/Endpoint Examples/Multipart Payload/gif.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/gif" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/gif" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/jpg.sh b/cURL/Endpoint Examples/Multipart Payload/jpg.sh index 5de4d0af..3a9ab275 100755 --- a/cURL/Endpoint Examples/Multipart Payload/jpg.sh +++ b/cURL/Endpoint Examples/Multipart Payload/jpg.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/jpg" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/jpg" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/linearized-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/linearized-pdf.sh index 8eaca0ae..68a935f8 100755 --- a/cURL/Endpoint Examples/Multipart Payload/linearized-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/linearized-pdf.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/linearized-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/linearized-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/markdown.sh b/cURL/Endpoint Examples/Multipart Payload/markdown.sh index b99b7ed0..80d7429d 100644 --- a/cURL/Endpoint Examples/Multipart Payload/markdown.sh +++ b/cURL/Endpoint Examples/Multipart Payload/markdown.sh @@ -1,6 +1,13 @@ #!/bin/sh -curl -X POST "https://api.pdfrest.com/markdown" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/markdown" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/merged-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/merged-pdf.sh index f00c39f0..9254b04c 100755 --- a/cURL/Endpoint Examples/Multipart Payload/merged-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/merged-pdf.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/merged-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/merged-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-html-to-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-html-to-pdf.sh index 22ee8298..b7115ae5 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-html-to-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-html-to-pdf.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-info.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-info.sh index e6137cf9..48357bc8 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-info.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-info.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/pdf-info" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/pdf-info" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-acroforms.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-acroforms.sh index 46df23f2..33879141 100644 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-acroforms.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-acroforms.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/pdf-with-acroforms" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/pdf-with-acroforms" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.sh index b725b934..1d8550bc 100644 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/pdf-with-added-attachment" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/pdf-with-added-attachment" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-image.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-image.sh index accd4c21..000e621b 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-image.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-image.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/pdf-with-added-image" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/pdf-with-added-image" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-text.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-text.sh index e846bf48..75af22e3 100644 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-text.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-text.sh @@ -1,6 +1,13 @@ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + TEXT_OPTIONS='[{"font":"Times New Roman","max_width":"175","opacity":"1","page":"1","rotation":"0","text":"sample text in PDF","text_color_rgb":"0,0,0","text_size":"30","x":"72","y":"144"}]' -curl -X POST "https://api.pdfrest.com/pdf-with-added-text" \ +curl -X POST "$API_URL/pdf-with-added-text" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.sh index de6f2ddf..49b7dbbc 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/pdf-with-converted-colors" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/pdf-with-converted-colors" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.sh index 245b385d..b5134474 100644 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.sh @@ -1,7 +1,14 @@ -curl -X POST "https://api.pdfrest.com/pdf-with-imported-form-data" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/pdf-with-imported-form-data" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ -F "file=@/path/to/file" \ -F "output=example_out" \ - -F "data_file=@/path/to/datafile" \ No newline at end of file + -F "data_file=@/path/to/datafile" diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.sh index 1f470d30..99ff6970 100644 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/pdf-with-ocr-text" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/pdf-with-ocr-text" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.sh index b85fe7b0..a16264ec 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.sh @@ -1,6 +1,13 @@ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + BOXES='{"boxes":[{"box":"media","pages":[{"range":"1","left":100,"top":100,"bottom":100,"right":100}]}]}' -curl -X POST "https://api.pdfrest.com/pdf-with-page-boxes-set" \ +curl -X POST "$API_URL/pdf-with-page-boxes-set" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.sh index 7ae5eb4c..18c9f7c4 100644 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.sh @@ -1,4 +1,11 @@ -REDACTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/pdf-with-redacted-text-applied" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +REDACTED_OUTPUT=$(curl -X POST "$API_URL/pdf-with-redacted-text-applied" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -7,9 +14,9 @@ REDACTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/pdf-with-redacted-text-a echo $REDACTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -19,7 +26,7 @@ echo $REDACTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then PREVIEW_PDF_ID=$(jq -r '.inputId' <<< $REDACTED_OUTPUT) APPLIED_PDF_ID=$(jq -r '.outputId' <<< $REDACTED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.sh index a3a076bd..5e7be26e 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.sh @@ -1,6 +1,13 @@ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + REDACTIONS='[{"type":"preset","value":"email"},{"type":"regex","value":"(\\+\\d{1,2}\\s)?\\(?\\d{3}\\)?[\\s.-]\\d{3}[\\s.-]\\d{4}"},{"type":"literal","value":"word"}]' -PREVIEW_OUTPUT=$(curl -X POST "https://api.pdfrest.com/pdf-with-redacted-text-preview" \ +PREVIEW_OUTPUT=$(curl -X POST "$API_URL/pdf-with-redacted-text-preview" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -10,9 +17,9 @@ PREVIEW_OUTPUT=$(curl -X POST "https://api.pdfrest.com/pdf-with-redacted-text-pr echo $PREVIEW_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # IMPORTANT: Do not delete the PREVIEW_PDF_ID file until after the redaction is applied @@ -26,7 +33,7 @@ echo $PREVIEW_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then INPUT_PDF_ID=$(jq -r '.inputId' <<< $PREVIEW_OUTPUT) PREVIEW_PDF_ID=$(jq -r '.outputId' <<< $PREVIEW_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf.sh b/cURL/Endpoint Examples/Multipart Payload/pdf.sh index 02d11aaf..e5b64f8d 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdfa.sh b/cURL/Endpoint Examples/Multipart Payload/pdfa.sh index 7b48bb70..10742058 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdfa.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdfa.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/pdfa" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/pdfa" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdfx.sh b/cURL/Endpoint Examples/Multipart Payload/pdfx.sh index ce45c0ff..e6133db2 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdfx.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdfx.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/pdfx" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/pdfx" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/png.sh b/cURL/Endpoint Examples/Multipart Payload/png.sh index 2f02d724..42e824b9 100755 --- a/cURL/Endpoint Examples/Multipart Payload/png.sh +++ b/cURL/Endpoint Examples/Multipart Payload/png.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/png" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/png" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/powerpoint.sh b/cURL/Endpoint Examples/Multipart Payload/powerpoint.sh index 49c86731..63f7d304 100644 --- a/cURL/Endpoint Examples/Multipart Payload/powerpoint.sh +++ b/cURL/Endpoint Examples/Multipart Payload/powerpoint.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/powerpoint" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/powerpoint" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/rasterized-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/rasterized-pdf.sh index a95f3336..d36e4c8d 100755 --- a/cURL/Endpoint Examples/Multipart Payload/rasterized-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/rasterized-pdf.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/rasterized-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/rasterized-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/request-status.sh b/cURL/Endpoint Examples/Multipart Payload/request-status.sh index f6a648c4..91b8c20a 100755 --- a/cURL/Endpoint Examples/Multipart Payload/request-status.sh +++ b/cURL/Endpoint Examples/Multipart Payload/request-status.sh @@ -1,10 +1,17 @@ #!/bin/sh +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + API_KEY="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # Send a request with the response-type header. -REQUEST_ID=$(curl -X POST "https://api.pdfrest.com/pdfa" \ +REQUEST_ID=$(curl -X POST "$API_URL/pdfa" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: $API_KEY" \ @@ -16,7 +23,7 @@ REQUEST_ID=$(curl -X POST "https://api.pdfrest.com/pdfa" \ # Get the request status at /request-status -RESPONSE=$(curl -X GET "https://api.pdfrest.com/request-status/$REQUEST_ID" \ +RESPONSE=$(curl -X GET "$API_URL/request-status/$REQUEST_ID" \ -H "Api-Key: $API_KEY") echo $RESPONSE STATUS=$(echo $RESPONSE | jq -r '.status') @@ -26,8 +33,8 @@ STATUS=$(echo $RESPONSE | jq -r '.status') while [ $STATUS = "pending" ] do sleep 5 - RESPONSE=$(curl -X GET "https://api.pdfrest.com/request-status/$REQUEST_ID" \ + RESPONSE=$(curl -X GET "$API_URL/request-status/$REQUEST_ID" \ -H "Api-Key: $API_KEY") echo $RESPONSE STATUS=$(echo $RESPONSE | jq -r '.status') -done \ No newline at end of file +done diff --git a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-and-restrictions.sh b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-and-restrictions.sh index 4b65afc9..5710de66 100755 --- a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-and-restrictions.sh +++ b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-and-restrictions.sh @@ -1,4 +1,11 @@ -RESTRICTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/restricted-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +RESTRICTED_OUTPUT=$(curl -X POST "$API_URL/restricted-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -10,9 +17,9 @@ RESTRICTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/restricted-pdf" \ echo $RESTRICTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -22,7 +29,7 @@ echo $RESTRICTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then INPUT_PDF_ID=$(jq -r '.inputId' <<< $RESTRICTED_OUTPUT) OUTPUT_PDF_ID=$(jq -r '.outputId' <<< $RESTRICTED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-with-open-password.sh b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-with-open-password.sh index cbb230ed..979e0627 100755 --- a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-with-open-password.sh +++ b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-with-open-password.sh @@ -1,4 +1,11 @@ -RESTRICTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/restricted-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +RESTRICTED_OUTPUT=$(curl -X POST "$API_URL/restricted-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -10,9 +17,9 @@ RESTRICTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/restricted-pdf" \ echo $RESTRICTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -22,7 +29,7 @@ echo $RESTRICTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then INPUT_PDF_ID=$(jq -r '.inputId' <<< $RESTRICTED_OUTPUT) OUTPUT_PDF_ID=$(jq -r '.outputId' <<< $RESTRICTED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-change-password.sh b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-change-password.sh index 3b2c0a49..8d983c88 100755 --- a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-change-password.sh +++ b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-change-password.sh @@ -1,4 +1,11 @@ -RESTRICTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/restricted-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +RESTRICTED_OUTPUT=$(curl -X POST "$API_URL/restricted-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -10,9 +17,9 @@ RESTRICTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/restricted-pdf" \ echo $RESTRICTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -22,7 +29,7 @@ echo $RESTRICTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then INPUT_PDF_ID=$(jq -r '.inputId' <<< $RESTRICTED_OUTPUT) OUTPUT_PDF_ID=$(jq -r '.outputId' <<< $RESTRICTED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf.sh index b192d1a2..dbaa40c2 100755 --- a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf.sh @@ -1,4 +1,11 @@ -RESTRICTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/restricted-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +RESTRICTED_OUTPUT=$(curl -X POST "$API_URL/restricted-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -8,9 +15,9 @@ RESTRICTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/restricted-pdf" \ echo $RESTRICTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -20,7 +27,7 @@ echo $RESTRICTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then INPUT_PDF_ID=$(jq -r '.inputId' <<< $RESTRICTED_OUTPUT) OUTPUT_PDF_ID=$(jq -r '.outputId' <<< $RESTRICTED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.sh b/cURL/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.sh index 1e19dd24..a78867eb 100644 --- a/cURL/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.sh +++ b/cURL/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.sh @@ -1,6 +1,13 @@ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + SIGNATURE_CONFIG='{"type": "new","name": "esignature","location": {"bottom_left": { "x": "0", "y": "0" },"top_right": { "x": "216", "y": "72" },"page": 1},"display": {"include_datetime": "true"}}' -curl -X POST "https://api.pdfrest.com/signed-pdf" \ +curl -X POST "$API_URL/signed-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/signed-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/signed-pdf.sh index 7bced55c..a69bc385 100644 --- a/cURL/Endpoint Examples/Multipart Payload/signed-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/signed-pdf.sh @@ -1,6 +1,13 @@ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + SIGNATURE_CONFIG='{"type": "new","name": "esignature","logo_opacity": "0.25","location": {"bottom_left": { "x": "0", "y": "0" },"top_right": { "x": "216", "y": "72" },"page": 1},"display": {"include_distinguished_name": "true","include_datetime": "true","contact": "My contact info","location": "My location","name": "John Doe","reason": "My reason for signing"}}' -curl -X POST "https://api.pdfrest.com/signed-pdf" \ +curl -X POST "$API_URL/signed-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/split-pdf-custom-ranges.sh b/cURL/Endpoint Examples/Multipart Payload/split-pdf-custom-ranges.sh index 02907d0f..8ac12057 100755 --- a/cURL/Endpoint Examples/Multipart Payload/split-pdf-custom-ranges.sh +++ b/cURL/Endpoint Examples/Multipart Payload/split-pdf-custom-ranges.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/split-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/split-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/split-pdf-delete-page.sh b/cURL/Endpoint Examples/Multipart Payload/split-pdf-delete-page.sh index 4c9a1d8f..c0881f43 100755 --- a/cURL/Endpoint Examples/Multipart Payload/split-pdf-delete-page.sh +++ b/cURL/Endpoint Examples/Multipart Payload/split-pdf-delete-page.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/split-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/split-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/split-pdf-odd-and-even.sh b/cURL/Endpoint Examples/Multipart Payload/split-pdf-odd-and-even.sh index e141d7b8..73cbfe11 100755 --- a/cURL/Endpoint Examples/Multipart Payload/split-pdf-odd-and-even.sh +++ b/cURL/Endpoint Examples/Multipart Payload/split-pdf-odd-and-even.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/split-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/split-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/split-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/split-pdf.sh index 16f45618..edd2b5dc 100755 --- a/cURL/Endpoint Examples/Multipart Payload/split-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/split-pdf.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/split-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/split-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/tif.sh b/cURL/Endpoint Examples/Multipart Payload/tif.sh index cd172657..758060fd 100755 --- a/cURL/Endpoint Examples/Multipart Payload/tif.sh +++ b/cURL/Endpoint Examples/Multipart Payload/tif.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/tif" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/tif" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf-with-open-password.sh b/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf-with-open-password.sh index b0d28570..17ae19a9 100755 --- a/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf-with-open-password.sh +++ b/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf-with-open-password.sh @@ -1,4 +1,11 @@ -UNRESTRICTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/unrestricted-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UNRESTRICTED_OUTPUT=$(curl -X POST "$API_URL/unrestricted-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -9,9 +16,9 @@ UNRESTRICTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/unrestricted-pdf" \ echo $UNRESTRICTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -21,7 +28,7 @@ echo $UNRESTRICTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then UNRESTRICTED_ID=$(jq -r '.outputId' <<< $UNRESTRICTED_OUTPUT) INPUT_PDF_ID=$(jq -r '.inputId' <<< $UNRESTRICTED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf.sh index 2b471e51..cdb15585 100755 --- a/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf.sh @@ -1,4 +1,11 @@ -UNRESTRICTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/unrestricted-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +UNRESTRICTED_OUTPUT=$(curl -X POST "$API_URL/unrestricted-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -8,9 +15,9 @@ UNRESTRICTED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/unrestricted-pdf" \ echo $UNRESTRICTED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -20,7 +27,7 @@ echo $UNRESTRICTED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then UNRESTRICTED_ID=$(jq -r '.outputId' <<< $UNRESTRICTED_OUTPUT) INPUT_PDF_ID=$(jq -r '.inputId' <<< $UNRESTRICTED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/unzip.sh b/cURL/Endpoint Examples/Multipart Payload/unzip.sh index d0bfb3ee..86180ac5 100755 --- a/cURL/Endpoint Examples/Multipart Payload/unzip.sh +++ b/cURL/Endpoint Examples/Multipart Payload/unzip.sh @@ -1,5 +1,12 @@ -curl -X POST "https://api.pdfrest.com/unzip" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/unzip" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ - -F "file=@/path/to/file" + -F "file=@/path/to/file" diff --git a/cURL/Endpoint Examples/Multipart Payload/up-toolkit.sh b/cURL/Endpoint Examples/Multipart Payload/up-toolkit.sh index e66dd9e0..ed45c5e6 100755 --- a/cURL/Endpoint Examples/Multipart Payload/up-toolkit.sh +++ b/cURL/Endpoint Examples/Multipart Payload/up-toolkit.sh @@ -1,2 +1,9 @@ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + #up-forms and up-office can be used to query the other tools -curl -X GET "https://api.pdfrest.com/up-toolkit" +curl -X GET "$API_URL/up-toolkit" diff --git a/cURL/Endpoint Examples/Multipart Payload/upload.sh b/cURL/Endpoint Examples/Multipart Payload/upload.sh index 14d96ecf..c085ce79 100755 --- a/cURL/Endpoint Examples/Multipart Payload/upload.sh +++ b/cURL/Endpoint Examples/Multipart Payload/upload.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/upload" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/upload" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf-image.sh b/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf-image.sh index c8754d18..e96c414a 100755 --- a/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf-image.sh +++ b/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf-image.sh @@ -1,4 +1,11 @@ -WATERMARKED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/watermarked-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +WATERMARKED_OUTPUT=$(curl -X POST "$API_URL/watermarked-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -8,9 +15,9 @@ WATERMARKED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/watermarked-pdf" \ echo $WATERMARKED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -20,7 +27,7 @@ echo $WATERMARKED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then INPUT_IDS=$(jq -r '.inputId | join(",")' <<< $WATERMARKED_OUTPUT) OUTPUT_PDF_ID=$(jq -r '.outputId' <<< $WATERMARKED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf.sh index 80dde68e..d7162a62 100755 --- a/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf.sh @@ -1,4 +1,11 @@ -WATERMARKED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/watermarked-pdf" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +WATERMARKED_OUTPUT=$(curl -X POST "$API_URL/watermarked-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ @@ -8,9 +15,9 @@ WATERMARKED_OUTPUT=$(curl -X POST "https://api.pdfrest.com/watermarked-pdf" \ echo $WATERMARKED_OUTPUT | jq -r '.' -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # Optional deletion step — OFF by default. @@ -20,7 +27,7 @@ echo $WATERMARKED_OUTPUT | jq -r '.' if [ "$DELETE_SENSITIVE_FILES" = "true" ]; then INPUT_PDF_ID=$(jq -r '.inputId[0]' <<< $WATERMARKED_OUTPUT) OUTPUT_PDF_ID=$(jq -r '.outputId' <<< $WATERMARKED_OUTPUT) - curl -X POST "https://api.pdfrest.com/delete" \ + curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/word.sh b/cURL/Endpoint Examples/Multipart Payload/word.sh index ce39735a..bd63f95a 100644 --- a/cURL/Endpoint Examples/Multipart Payload/word.sh +++ b/cURL/Endpoint Examples/Multipart Payload/word.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/word" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/word" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/zip.sh b/cURL/Endpoint Examples/Multipart Payload/zip.sh index bb87220b..97680ef8 100755 --- a/cURL/Endpoint Examples/Multipart Payload/zip.sh +++ b/cURL/Endpoint Examples/Multipart Payload/zip.sh @@ -1,4 +1,11 @@ -curl -X POST "https://api.pdfrest.com/zip" \ +# By default, we use the US-based API service. This is the primary endpoint for global use. +API_URL="https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +# API_URL = "https://eu-api.pdfrest.com" + +curl -X POST "$API_URL/zip" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ From 7394b8d2c4f78fc6f2563ae66ff96b547919d681 Mon Sep 17 00:00:00 2001 From: Taylor Smith Date: Tue, 9 Sep 2025 16:18:48 -0500 Subject: [PATCH 02/11] Add eu/gdpr comment to Java samples --- Java/Complex Flow Examples/DecryptAddReencrypt.java | 13 ++++++++++--- .../MergeDifferentFileTypes.java | 13 ++++++++++--- Java/Complex Flow Examples/OcrWithExtractText.java | 11 +++++++++-- .../Complex Flow Examples/PDFA3bWithAttachment.java | 11 +++++++++-- .../Complex Flow Examples/PreserveWordDocument.java | 11 +++++++++-- Java/Complex Flow Examples/ProtectedWatermark.java | 11 +++++++++-- .../RedactPreviewAndFinalize.java | 11 +++++++++-- .../Endpoint Examples/JSON Payload/BatchDelete.java | 9 ++++++++- Java/Endpoint Examples/JSON Payload/Bmp.java | 11 +++++++++-- .../JSON Payload/CompressedPDF.java | 11 +++++++++-- .../JSON Payload/DecryptedPDF.java | 13 ++++++++++--- .../JSON Payload/DeleteResource.java | 9 ++++++++- .../JSON Payload/EncryptedPDF.java | 13 ++++++++++--- Java/Endpoint Examples/JSON Payload/Excel.java | 11 +++++++++-- .../JSON Payload/ExportedFormData.java | 11 +++++++++-- .../JSON Payload/ExtractedImages.java | 11 +++++++++-- .../JSON Payload/ExtractedText.java | 11 +++++++++-- .../JSON Payload/FlattenedAnnotationsPDF.java | 11 +++++++++-- .../JSON Payload/FlattenedFormsPDF.java | 11 +++++++++-- .../JSON Payload/FlattenedLayersPDF.java | 11 +++++++++-- .../JSON Payload/FlattenedTransparenciesPDF.java | 11 +++++++++-- .../Endpoint Examples/JSON Payload/GetResource.java | 9 ++++++++- Java/Endpoint Examples/JSON Payload/Gif.java | 11 +++++++++-- Java/Endpoint Examples/JSON Payload/Jpg.java | 11 +++++++++-- .../JSON Payload/LinearizedPDF.java | 11 +++++++++-- Java/Endpoint Examples/JSON Payload/Markdown.java | 11 +++++++++-- Java/Endpoint Examples/JSON Payload/MergedPDF.java | 11 +++++++++-- Java/Endpoint Examples/JSON Payload/PDF.java | 11 +++++++++-- Java/Endpoint Examples/JSON Payload/PDFA.java | 11 +++++++++-- Java/Endpoint Examples/JSON Payload/PDFInfo.java | 11 +++++++++-- .../JSON Payload/PDFWithAcroforms.java | 11 +++++++++-- .../JSON Payload/PDFWithAddedAttachment.java | 11 +++++++++-- .../JSON Payload/PDFWithAddedImage.java | 11 +++++++++-- .../JSON Payload/PDFWithAddedText.java | 11 +++++++++-- .../JSON Payload/PDFWithConvertedColors.java | 11 +++++++++-- .../JSON Payload/PDFWithImportedFormData.java | 11 +++++++++-- .../JSON Payload/PDFWithOCRText.java | 11 +++++++++-- .../JSON Payload/PDFWithPageBoxesSet.java | 11 +++++++++-- .../JSON Payload/PDFWithRedactedTextApplied.java | 13 ++++++++++--- .../JSON Payload/PDFWithRedactedTextPreview.java | 13 ++++++++++--- Java/Endpoint Examples/JSON Payload/PDFX.java | 11 +++++++++-- Java/Endpoint Examples/JSON Payload/Png.java | 11 +++++++++-- Java/Endpoint Examples/JSON Payload/Powerpoint.java | 11 +++++++++-- .../JSON Payload/RasterizedPDF.java | 11 +++++++++-- .../JSON Payload/RestrictedPDF.java | 13 ++++++++++--- Java/Endpoint Examples/JSON Payload/SignedPDF.java | 11 +++++++++-- .../JSON Payload/SignedPDFNonPFX.java | 11 +++++++++-- Java/Endpoint Examples/JSON Payload/SplitPDF.java | 11 +++++++++-- Java/Endpoint Examples/JSON Payload/Tif.java | 11 +++++++++-- .../JSON Payload/UnrestrictedPDF.java | 13 ++++++++++--- Java/Endpoint Examples/JSON Payload/Unzip.java | 11 +++++++++-- Java/Endpoint Examples/JSON Payload/UpToolkit.java | 9 ++++++++- Java/Endpoint Examples/JSON Payload/Upload.java | 9 ++++++++- .../JSON Payload/WatermarkedPDF.java | 13 ++++++++++--- Java/Endpoint Examples/JSON Payload/Word.java | 11 +++++++++-- Java/Endpoint Examples/JSON Payload/Zip.java | 11 +++++++++-- .../Multipart Payload/BatchDelete.java | 9 ++++++++- Java/Endpoint Examples/Multipart Payload/Bmp.java | 9 ++++++++- .../Multipart Payload/CompressedPDF.java | 9 ++++++++- .../Multipart Payload/DecryptedPDF.java | 11 +++++++++-- .../Multipart Payload/DeleteResource.java | 9 ++++++++- .../Multipart Payload/EncryptedPDF.java | 11 +++++++++-- Java/Endpoint Examples/Multipart Payload/Excel.java | 9 ++++++++- .../Multipart Payload/ExportedFormData.java | 9 ++++++++- .../Multipart Payload/ExtractedImages.java | 9 ++++++++- .../Multipart Payload/ExtractedText.java | 9 ++++++++- .../Multipart Payload/FlattenedAnnotationsPDF.java | 9 ++++++++- .../Multipart Payload/FlattenedFormsPDF.java | 9 ++++++++- .../Multipart Payload/FlattenedLayersPDF.java | 9 ++++++++- .../FlattenedTransparenciesPDF.java | 9 ++++++++- .../Multipart Payload/GetResource.java | 9 ++++++++- Java/Endpoint Examples/Multipart Payload/Gif.java | 9 ++++++++- Java/Endpoint Examples/Multipart Payload/Jpg.java | 9 ++++++++- .../Multipart Payload/LinearizedPDF.java | 9 ++++++++- .../Multipart Payload/Markdown.java | 9 ++++++++- .../Multipart Payload/MergedPDF.java | 9 ++++++++- Java/Endpoint Examples/Multipart Payload/PDF.java | 9 ++++++++- Java/Endpoint Examples/Multipart Payload/PDFA.java | 9 ++++++++- .../Multipart Payload/PDFInfo.java | 9 ++++++++- .../Multipart Payload/PDFWithAcroforms.java | 9 ++++++++- .../Multipart Payload/PDFWithAddedAttachment.java | 9 ++++++++- .../Multipart Payload/PDFWithAddedImage.java | 9 ++++++++- .../Multipart Payload/PDFWithAddedText.java | 9 ++++++++- .../Multipart Payload/PDFWithConvertedColors.java | 9 ++++++++- .../Multipart Payload/PDFWithImportedFormData.java | 9 ++++++++- .../Multipart Payload/PDFWithOCRText.java | 9 ++++++++- .../Multipart Payload/PDFWithPageBoxesSet.java | 9 ++++++++- .../PDFWithRedactedTextApplied.java | 11 +++++++++-- .../PDFWithRedactedTextPreview.java | 11 +++++++++-- Java/Endpoint Examples/Multipart Payload/PDFX.java | 9 ++++++++- Java/Endpoint Examples/Multipart Payload/Png.java | 9 ++++++++- .../Multipart Payload/Powerpoint.java | 9 ++++++++- .../Multipart Payload/RasterizedPDF.java | 9 ++++++++- .../Multipart Payload/RequestStatus.java | 11 +++++++++-- .../Multipart Payload/RestrictedPDF.java | 11 +++++++++-- .../Multipart Payload/SignedPDF.java | 9 ++++++++- .../Multipart Payload/SignedPDFNonPFX.java | 9 ++++++++- .../Multipart Payload/SplitPDF.java | 9 ++++++++- Java/Endpoint Examples/Multipart Payload/Tif.java | 9 ++++++++- .../Multipart Payload/UnrestrictedPDF.java | 11 +++++++++-- Java/Endpoint Examples/Multipart Payload/Unzip.java | 9 ++++++++- .../Multipart Payload/UpToolkit.java | 9 ++++++++- .../Endpoint Examples/Multipart Payload/Upload.java | 9 ++++++++- .../Multipart Payload/WatermarkedPDF.java | 11 +++++++++-- Java/Endpoint Examples/Multipart Payload/Word.java | 9 ++++++++- Java/Endpoint Examples/Multipart Payload/Zip.java | 9 ++++++++- 106 files changed, 916 insertions(+), 174 deletions(-) diff --git a/Java/Complex Flow Examples/DecryptAddReencrypt.java b/Java/Complex Flow Examples/DecryptAddReencrypt.java index 4028508b..0312a807 100644 --- a/Java/Complex Flow Examples/DecryptAddReencrypt.java +++ b/Java/Complex Flow Examples/DecryptAddReencrypt.java @@ -16,6 +16,13 @@ public class DecryptAddReencrypt { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your PDF file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -51,7 +58,7 @@ public static void main(String[] args) { Request decryptRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/decrypted-pdf") + .url(API_URL + "/decrypted-pdf") .post(decryptRequestBody) .build(); try { @@ -87,7 +94,7 @@ public static void main(String[] args) { Request addImageRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-added-image") + .url(API_URL + "/pdf-with-added-image") .post(addImageRequestBody) .build(); try { @@ -119,7 +126,7 @@ public static void main(String[] args) { Request encryptRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/encrypted-pdf") + .url(API_URL + "/encrypted-pdf") .post(encryptRequestBody) .build(); try { diff --git a/Java/Complex Flow Examples/MergeDifferentFileTypes.java b/Java/Complex Flow Examples/MergeDifferentFileTypes.java index f24ca667..a4b92674 100644 --- a/Java/Complex Flow Examples/MergeDifferentFileTypes.java +++ b/Java/Complex Flow Examples/MergeDifferentFileTypes.java @@ -19,6 +19,13 @@ public class MergeDifferentFileTypes { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your first file here, or as the first argument when running the program. private static final String DEFAULT_FIRST_FILE_PATH = "/path/to/file.png"; @@ -53,7 +60,7 @@ public static void main(String[] args) { Request firstFileRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf") + .url(API_URL + "/pdf") .post(firstFileRequestBody) .build(); try { @@ -85,7 +92,7 @@ public static void main(String[] args) { Request secondFileRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf") + .url(API_URL + "/pdf") .post(secondFileRequestBody) .build(); try { @@ -121,7 +128,7 @@ public static void main(String[] args) { Request mergeRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/merged-pdf") + .url(API_URL + "/merged-pdf") .post(mergeRequestBody) .build(); try { diff --git a/Java/Complex Flow Examples/OcrWithExtractText.java b/Java/Complex Flow Examples/OcrWithExtractText.java index dbacd17c..8e02d2fb 100644 --- a/Java/Complex Flow Examples/OcrWithExtractText.java +++ b/Java/Complex Flow Examples/OcrWithExtractText.java @@ -16,6 +16,13 @@ public class OcrWithExtractText { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your PDF file here, or as the first argument when running the program. private static final String DEFAULT_PDF_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request ocrRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-ocr-text") + .url(API_URL + "/pdf-with-ocr-text") .post(ocrRequestBody) .build(); try { @@ -74,7 +81,7 @@ public static void main(String[] args) { Request extractRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/extracted-text") + .url(API_URL + "/extracted-text") .post(extractRequestBody) .build(); try { diff --git a/Java/Complex Flow Examples/PDFA3bWithAttachment.java b/Java/Complex Flow Examples/PDFA3bWithAttachment.java index c93544ac..462535c1 100644 --- a/Java/Complex Flow Examples/PDFA3bWithAttachment.java +++ b/Java/Complex Flow Examples/PDFA3bWithAttachment.java @@ -17,6 +17,13 @@ public class PDFA3bWithAttachment { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -54,7 +61,7 @@ public static void main(String[] args) { Request attachmentRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-added-attachment") + .url(API_URL + "/pdf-with-added-attachment") .post(attachmentRequestBody) .build(); try { @@ -85,7 +92,7 @@ public static void main(String[] args) { Request pdfaRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdfa") + .url(API_URL + "/pdfa") .post(pdfaRequestBody) .build(); try { diff --git a/Java/Complex Flow Examples/PreserveWordDocument.java b/Java/Complex Flow Examples/PreserveWordDocument.java index 7304c4e2..be92bd6d 100644 --- a/Java/Complex Flow Examples/PreserveWordDocument.java +++ b/Java/Complex Flow Examples/PreserveWordDocument.java @@ -14,6 +14,13 @@ public class PreserveWordDocument { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -42,7 +49,7 @@ public static void main(String[] args) { Request pdfRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf") + .url(API_URL + "/pdf") .post(pdfRequestBody) .build(); try { @@ -73,7 +80,7 @@ public static void main(String[] args) { Request pdfaRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdfa") + .url(API_URL + "/pdfa") .post(pdfaRequestBody) .build(); try { diff --git a/Java/Complex Flow Examples/ProtectedWatermark.java b/Java/Complex Flow Examples/ProtectedWatermark.java index 40805729..e84ee3ab 100644 --- a/Java/Complex Flow Examples/ProtectedWatermark.java +++ b/Java/Complex Flow Examples/ProtectedWatermark.java @@ -14,6 +14,13 @@ public class ProtectedWatermark { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -43,7 +50,7 @@ public static void main(String[] args) { Request watermarkRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/watermarked-pdf") + .url(API_URL + "/watermarked-pdf") .post(watermarkRequestBody) .build(); try { @@ -77,7 +84,7 @@ public static void main(String[] args) { Request restrictRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/restricted-pdf") + .url(API_URL + "/restricted-pdf") .post(restrictRequestBody) .build(); try { diff --git a/Java/Complex Flow Examples/RedactPreviewAndFinalize.java b/Java/Complex Flow Examples/RedactPreviewAndFinalize.java index 1b134a6f..e7be2eae 100644 --- a/Java/Complex Flow Examples/RedactPreviewAndFinalize.java +++ b/Java/Complex Flow Examples/RedactPreviewAndFinalize.java @@ -15,6 +15,13 @@ public class RedactPreviewAndFinalize { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file"; @@ -47,7 +54,7 @@ public static void main(String[] args) { Request previewRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-redacted-text-preview") + .url(API_URL + "/pdf-with-redacted-text-preview") .post(previewRequestBody) .build(); try { @@ -77,7 +84,7 @@ public static void main(String[] args) { Request appliedRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-redacted-text-applied") + .url(API_URL + "/pdf-with-redacted-text-applied") .post(appliedRequestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/BatchDelete.java b/Java/Endpoint Examples/JSON Payload/BatchDelete.java index ad804fbc..2d194315 100644 --- a/Java/Endpoint Examples/JSON Payload/BatchDelete.java +++ b/Java/Endpoint Examples/JSON Payload/BatchDelete.java @@ -6,6 +6,13 @@ public class BatchDelete { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com" + // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. private static final String DEFAULT_API_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; @@ -23,7 +30,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/Bmp.java b/Java/Endpoint Examples/JSON Payload/Bmp.java index 9647697a..34c1149b 100644 --- a/Java/Endpoint Examples/JSON Payload/Bmp.java +++ b/Java/Endpoint Examples/JSON Payload/Bmp.java @@ -8,6 +8,13 @@ public class Bmp { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/bmp") + .url(API_URL + "/bmp") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/CompressedPDF.java b/Java/Endpoint Examples/JSON Payload/CompressedPDF.java index e238824e..abbce23a 100644 --- a/Java/Endpoint Examples/JSON Payload/CompressedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/CompressedPDF.java @@ -8,6 +8,13 @@ public class CompressedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -45,7 +52,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/compressed-pdf") + .url(API_URL + "/compressed-pdf") .post(requestBody) .build(); try { @@ -79,7 +86,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/DecryptedPDF.java b/Java/Endpoint Examples/JSON Payload/DecryptedPDF.java index 24a30b2d..3299f964 100644 --- a/Java/Endpoint Examples/JSON Payload/DecryptedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/DecryptedPDF.java @@ -8,6 +8,13 @@ public class DecryptedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -46,7 +53,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/decrypted-pdf") + .url(API_URL + "/decrypted-pdf") .post(requestBody) .build(); try { @@ -76,7 +83,7 @@ public static void main(String[] args) { Request deleteRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(deleteBody) .build(); try (Response deleteResp = @@ -114,7 +121,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/DeleteResource.java b/Java/Endpoint Examples/JSON Payload/DeleteResource.java index 6459a2c4..c7c93ab7 100644 --- a/Java/Endpoint Examples/JSON Payload/DeleteResource.java +++ b/Java/Endpoint Examples/JSON Payload/DeleteResource.java @@ -5,6 +5,13 @@ public class DeleteResource { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Resource UUIDs can be found in the JSON response of POST requests as "outputId". // Resource UUIDs usually look like this: '0950b9bdf-0465-4d3f-8ea3-d2894f1ae839'. private static final String FILE_ID = @@ -22,7 +29,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/resource/" + FILE_ID) + .url(API_URL + "/resource/" + FILE_ID) .method("DELETE", requestBody) .build(); Response response = client.newCall(request).execute(); diff --git a/Java/Endpoint Examples/JSON Payload/EncryptedPDF.java b/Java/Endpoint Examples/JSON Payload/EncryptedPDF.java index c818cd92..a134d940 100644 --- a/Java/Endpoint Examples/JSON Payload/EncryptedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/EncryptedPDF.java @@ -8,6 +8,13 @@ public class EncryptedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -46,7 +53,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/encrypted-pdf") + .url(API_URL + "/encrypted-pdf") .post(requestBody) .build(); try { @@ -75,7 +82,7 @@ public static void main(String[] args) { Request deleteRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(deleteBody) .build(); try (Response deleteResp = @@ -112,7 +119,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/Excel.java b/Java/Endpoint Examples/JSON Payload/Excel.java index 67e88314..71cde304 100644 --- a/Java/Endpoint Examples/JSON Payload/Excel.java +++ b/Java/Endpoint Examples/JSON Payload/Excel.java @@ -8,6 +8,13 @@ public class Excel { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/excel") + .url(API_URL + "/excel") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/ExportedFormData.java b/Java/Endpoint Examples/JSON Payload/ExportedFormData.java index 8b817665..3e31c9cb 100644 --- a/Java/Endpoint Examples/JSON Payload/ExportedFormData.java +++ b/Java/Endpoint Examples/JSON Payload/ExportedFormData.java @@ -8,6 +8,13 @@ public class ExportedFormData { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/exported-form-data") + .url(API_URL + "/exported-form-data") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/ExtractedImages.java b/Java/Endpoint Examples/JSON Payload/ExtractedImages.java index 1ec93c17..bd73a344 100644 --- a/Java/Endpoint Examples/JSON Payload/ExtractedImages.java +++ b/Java/Endpoint Examples/JSON Payload/ExtractedImages.java @@ -8,6 +8,13 @@ public class ExtractedImages { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/extracted-images") + .url(API_URL + "/extracted-images") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/ExtractedText.java b/Java/Endpoint Examples/JSON Payload/ExtractedText.java index f0e4a0f4..70d88aab 100644 --- a/Java/Endpoint Examples/JSON Payload/ExtractedText.java +++ b/Java/Endpoint Examples/JSON Payload/ExtractedText.java @@ -8,6 +8,13 @@ public class ExtractedText { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/extracted-text") + .url(API_URL + "/extracted-text") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/FlattenedAnnotationsPDF.java b/Java/Endpoint Examples/JSON Payload/FlattenedAnnotationsPDF.java index 609c9e09..0fa12169 100644 --- a/Java/Endpoint Examples/JSON Payload/FlattenedAnnotationsPDF.java +++ b/Java/Endpoint Examples/JSON Payload/FlattenedAnnotationsPDF.java @@ -8,6 +8,13 @@ public class FlattenedAnnotationsPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/flattened-annotations-pdf") + .url(API_URL + "/flattened-annotations-pdf") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/FlattenedFormsPDF.java b/Java/Endpoint Examples/JSON Payload/FlattenedFormsPDF.java index b39c1ce3..549f549d 100644 --- a/Java/Endpoint Examples/JSON Payload/FlattenedFormsPDF.java +++ b/Java/Endpoint Examples/JSON Payload/FlattenedFormsPDF.java @@ -8,6 +8,13 @@ public class FlattenedFormsPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/flattened-forms-pdf") + .url(API_URL + "/flattened-forms-pdf") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/FlattenedLayersPDF.java b/Java/Endpoint Examples/JSON Payload/FlattenedLayersPDF.java index bc8c371a..192aa52b 100644 --- a/Java/Endpoint Examples/JSON Payload/FlattenedLayersPDF.java +++ b/Java/Endpoint Examples/JSON Payload/FlattenedLayersPDF.java @@ -8,6 +8,13 @@ public class FlattenedLayersPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/flattened-layers-pdf") + .url(API_URL + "/flattened-layers-pdf") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/FlattenedTransparenciesPDF.java b/Java/Endpoint Examples/JSON Payload/FlattenedTransparenciesPDF.java index a62eb496..6fa25b69 100644 --- a/Java/Endpoint Examples/JSON Payload/FlattenedTransparenciesPDF.java +++ b/Java/Endpoint Examples/JSON Payload/FlattenedTransparenciesPDF.java @@ -8,6 +8,13 @@ public class FlattenedTransparenciesPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/flattened-transparencies-pdf") + .url(API_URL + "/flattened-transparencies-pdf") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/GetResource.java b/Java/Endpoint Examples/JSON Payload/GetResource.java index 769213f0..9007dc19 100644 --- a/Java/Endpoint Examples/JSON Payload/GetResource.java +++ b/Java/Endpoint Examples/JSON Payload/GetResource.java @@ -7,6 +7,13 @@ public class GetResource { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Resource UUIDs can be found in the JSON response of POST requests as "outputId". // Resource UUIDs usually look like this: '0950b9bdf-0465-4d3f-8ea3-d2894f1ae839'. private static final String FILE_ID = @@ -20,7 +27,7 @@ public class GetResource { public static void main(String[] args) { try { String urlString = - String.format("https://api.pdfrest.com/resource/%s?format=%2s", FILE_ID, OUTPUT_FORMAT); + String.format(API_URL + "/resource/%s?format=%2s", FILE_ID, OUTPUT_FORMAT); InputStream in = new URL(urlString).openStream(); Files.copy(in, Paths.get("/path/to/write/file")); // Set a path for the file to be written } catch (IOException e) { diff --git a/Java/Endpoint Examples/JSON Payload/Gif.java b/Java/Endpoint Examples/JSON Payload/Gif.java index eee808c4..9e49b27a 100644 --- a/Java/Endpoint Examples/JSON Payload/Gif.java +++ b/Java/Endpoint Examples/JSON Payload/Gif.java @@ -8,6 +8,13 @@ public class Gif { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/gif") + .url(API_URL + "/gif") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/Jpg.java b/Java/Endpoint Examples/JSON Payload/Jpg.java index 215c9706..d243060f 100644 --- a/Java/Endpoint Examples/JSON Payload/Jpg.java +++ b/Java/Endpoint Examples/JSON Payload/Jpg.java @@ -8,6 +8,13 @@ public class Jpg { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/jpg") + .url(API_URL + "/jpg") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/LinearizedPDF.java b/Java/Endpoint Examples/JSON Payload/LinearizedPDF.java index 9c62546c..4f2a3b43 100644 --- a/Java/Endpoint Examples/JSON Payload/LinearizedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/LinearizedPDF.java @@ -8,6 +8,13 @@ public class LinearizedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/linearized-pdf") + .url(API_URL + "/linearized-pdf") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/Markdown.java b/Java/Endpoint Examples/JSON Payload/Markdown.java index f95a3aff..1b6047ba 100644 --- a/Java/Endpoint Examples/JSON Payload/Markdown.java +++ b/Java/Endpoint Examples/JSON Payload/Markdown.java @@ -8,6 +8,13 @@ public class Markdown { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -42,7 +49,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/markdown") + .url(API_URL + "/markdown") .post(requestBody) .build(); try { @@ -74,7 +81,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/MergedPDF.java b/Java/Endpoint Examples/JSON Payload/MergedPDF.java index fdc86c3b..f1aafe60 100644 --- a/Java/Endpoint Examples/JSON Payload/MergedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/MergedPDF.java @@ -8,6 +8,13 @@ public class MergedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + private static final String[] DEFAULT_FILE_PATHS = new String[] {"/path/to/file1.pdf", "/path/to/file2.pdf"}; @@ -58,7 +65,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/merged-pdf") + .url(API_URL + "/merged-pdf") .post(requestBody) .build(); try { @@ -92,7 +99,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/PDF.java b/Java/Endpoint Examples/JSON Payload/PDF.java index 34556d22..5d723fa1 100644 --- a/Java/Endpoint Examples/JSON Payload/PDF.java +++ b/Java/Endpoint Examples/JSON Payload/PDF.java @@ -8,6 +8,13 @@ public class PDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.png"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf") + .url(API_URL + "/pdf") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.png") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/PDFA.java b/Java/Endpoint Examples/JSON Payload/PDFA.java index 1072d91a..8a042bae 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFA.java +++ b/Java/Endpoint Examples/JSON Payload/PDFA.java @@ -8,6 +8,13 @@ public class PDFA { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdfa") + .url(API_URL + "/pdfa") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/PDFInfo.java b/Java/Endpoint Examples/JSON Payload/PDFInfo.java index 659b1a79..c23f760f 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFInfo.java +++ b/Java/Endpoint Examples/JSON Payload/PDFInfo.java @@ -8,6 +8,13 @@ public class PDFInfo { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -46,7 +53,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-info") + .url(API_URL + "/pdf-info") .post(requestBody) .build(); try { @@ -80,7 +87,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithAcroforms.java b/Java/Endpoint Examples/JSON Payload/PDFWithAcroforms.java index 730bf0c9..a6bfc752 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithAcroforms.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithAcroforms.java @@ -8,6 +8,13 @@ public class PDFWithAcroforms { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-acroforms") + .url(API_URL + "/pdf-with-acroforms") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithAddedAttachment.java b/Java/Endpoint Examples/JSON Payload/PDFWithAddedAttachment.java index 3d173aed..b28bdb5c 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithAddedAttachment.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithAddedAttachment.java @@ -8,6 +8,13 @@ public class PDFWithAddedAttachment { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -61,7 +68,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-added-attachment") + .url(API_URL + "/pdf-with-added-attachment") .post(requestBody) .build(); try { @@ -95,7 +102,7 @@ private static String uploadFile(File inputFile, String filename) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", filename) - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithAddedImage.java b/Java/Endpoint Examples/JSON Payload/PDFWithAddedImage.java index cb59ddc9..ba3a3e33 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithAddedImage.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithAddedImage.java @@ -8,6 +8,13 @@ public class PDFWithAddedImage { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -62,7 +69,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-added-image") + .url(API_URL + "/pdf-with-added-image") .post(requestBody) .build(); try { @@ -96,7 +103,7 @@ private static String uploadFile(File inputFile, String filename) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", filename) - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithAddedText.java b/Java/Endpoint Examples/JSON Payload/PDFWithAddedText.java index 8627ee46..f7bce60f 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithAddedText.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithAddedText.java @@ -8,6 +8,13 @@ public class PDFWithAddedText { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file"; @@ -48,7 +55,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-added-text") + .url(API_URL + "/pdf-with-added-text") .post(requestBody) .build(); try { @@ -82,7 +89,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithConvertedColors.java b/Java/Endpoint Examples/JSON Payload/PDFWithConvertedColors.java index dea53c56..4302e77a 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithConvertedColors.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithConvertedColors.java @@ -8,6 +8,13 @@ public class PDFWithConvertedColors { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-converted-colors") + .url(API_URL + "/pdf-with-converted-colors") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithImportedFormData.java b/Java/Endpoint Examples/JSON Payload/PDFWithImportedFormData.java index 07826057..185322a7 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithImportedFormData.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithImportedFormData.java @@ -8,6 +8,13 @@ public class PDFWithImportedFormData { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -60,7 +67,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-imported-form-data") + .url(API_URL + "/pdf-with-imported-form-data") .post(requestBody) .build(); try { @@ -94,7 +101,7 @@ private static String uploadFile(File inputFile, String filename) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", filename) - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithOCRText.java b/Java/Endpoint Examples/JSON Payload/PDFWithOCRText.java index aa086363..c1ce6703 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithOCRText.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithOCRText.java @@ -8,6 +8,13 @@ public class PDFWithOCRText { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-ocr-text") + .url(API_URL + "/pdf-with-ocr-text") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithPageBoxesSet.java b/Java/Endpoint Examples/JSON Payload/PDFWithPageBoxesSet.java index e69ef410..78756eba 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithPageBoxesSet.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithPageBoxesSet.java @@ -8,6 +8,13 @@ public class PDFWithPageBoxesSet { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file"; @@ -67,7 +74,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-page-boxes-set") + .url(API_URL + "/pdf-with-page-boxes-set") .post(requestBody) .build(); try { @@ -101,7 +108,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextApplied.java b/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextApplied.java index 7ef2955c..27584c07 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextApplied.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextApplied.java @@ -8,6 +8,13 @@ public class PDFWithRedactedTextApplied { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -45,7 +52,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-redacted-text-applied") + .url(API_URL + "/pdf-with-redacted-text-applied") .post(requestBody) .build(); try { @@ -74,7 +81,7 @@ public static void main(String[] args) { Request deleteRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(deleteBody) .build(); try (Response deleteResp = @@ -111,7 +118,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextPreview.java b/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextPreview.java index 934250f4..5303f442 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextPreview.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextPreview.java @@ -8,6 +8,13 @@ public class PDFWithRedactedTextPreview { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file"; @@ -49,7 +56,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-redacted-text-preview") + .url(API_URL + "/pdf-with-redacted-text-preview") .post(requestBody) .build(); try { @@ -82,7 +89,7 @@ public static void main(String[] args) { Request deleteRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(deleteBody) .build(); try (Response deleteResp = @@ -120,7 +127,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/PDFX.java b/Java/Endpoint Examples/JSON Payload/PDFX.java index af0814f9..d9e0e563 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFX.java +++ b/Java/Endpoint Examples/JSON Payload/PDFX.java @@ -8,6 +8,13 @@ public class PDFX { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdfx") + .url(API_URL + "/pdfx") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/Png.java b/Java/Endpoint Examples/JSON Payload/Png.java index e05cae8f..bd17ad42 100644 --- a/Java/Endpoint Examples/JSON Payload/Png.java +++ b/Java/Endpoint Examples/JSON Payload/Png.java @@ -8,6 +8,13 @@ public class Png { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/png") + .url(API_URL + "/png") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/Powerpoint.java b/Java/Endpoint Examples/JSON Payload/Powerpoint.java index 6ea26ad3..3bf2b6a4 100644 --- a/Java/Endpoint Examples/JSON Payload/Powerpoint.java +++ b/Java/Endpoint Examples/JSON Payload/Powerpoint.java @@ -8,6 +8,13 @@ public class Powerpoint { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/powerpoint") + .url(API_URL + "/powerpoint") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/RasterizedPDF.java b/Java/Endpoint Examples/JSON Payload/RasterizedPDF.java index 2dfd4db5..af0d3046 100644 --- a/Java/Endpoint Examples/JSON Payload/RasterizedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/RasterizedPDF.java @@ -8,6 +8,13 @@ public class RasterizedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/rasterized-pdf") + .url(API_URL + "/rasterized-pdf") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/RestrictedPDF.java b/Java/Endpoint Examples/JSON Payload/RestrictedPDF.java index 149b6ef1..3a57b58d 100644 --- a/Java/Endpoint Examples/JSON Payload/RestrictedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/RestrictedPDF.java @@ -8,6 +8,13 @@ public class RestrictedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -48,7 +55,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/restricted-pdf") + .url(API_URL + "/restricted-pdf") .post(requestBody) .build(); try { @@ -77,7 +84,7 @@ public static void main(String[] args) { Request deleteRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(deleteBody) .build(); try (Response deleteResp = @@ -114,7 +121,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/SignedPDF.java b/Java/Endpoint Examples/JSON Payload/SignedPDF.java index 2e4cff72..4f095b29 100644 --- a/Java/Endpoint Examples/JSON Payload/SignedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/SignedPDF.java @@ -8,6 +8,13 @@ public class SignedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. private static final String DEFAULT_API_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; @@ -73,7 +80,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/signed-pdf") + .url(API_URL + "/signed-pdf") .post(requestBody) .build(); try { @@ -106,7 +113,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", inputFile.getName()) - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/SignedPDFNonPFX.java b/Java/Endpoint Examples/JSON Payload/SignedPDFNonPFX.java index aeb2da51..acfc7a79 100644 --- a/Java/Endpoint Examples/JSON Payload/SignedPDFNonPFX.java +++ b/Java/Endpoint Examples/JSON Payload/SignedPDFNonPFX.java @@ -8,6 +8,13 @@ public class SignedPDFNonPFX { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. private static final String DEFAULT_API_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; @@ -63,7 +70,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/signed-pdf") + .url(API_URL + "/signed-pdf") .post(requestBody) .build(); try { @@ -96,7 +103,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", inputFile.getName()) - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/SplitPDF.java b/Java/Endpoint Examples/JSON Payload/SplitPDF.java index 463de06a..957dba43 100644 --- a/Java/Endpoint Examples/JSON Payload/SplitPDF.java +++ b/Java/Endpoint Examples/JSON Payload/SplitPDF.java @@ -8,6 +8,13 @@ public class SplitPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/split-pdf") + .url(API_URL + "/split-pdf") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/Tif.java b/Java/Endpoint Examples/JSON Payload/Tif.java index 24c39afe..73eddf47 100644 --- a/Java/Endpoint Examples/JSON Payload/Tif.java +++ b/Java/Endpoint Examples/JSON Payload/Tif.java @@ -8,6 +8,13 @@ public class Tif { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/tif") + .url(API_URL + "/tif") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/UnrestrictedPDF.java b/Java/Endpoint Examples/JSON Payload/UnrestrictedPDF.java index 88f74cf6..5e0f6e05 100644 --- a/Java/Endpoint Examples/JSON Payload/UnrestrictedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/UnrestrictedPDF.java @@ -8,6 +8,13 @@ public class UnrestrictedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -46,7 +53,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/unrestricted-pdf") + .url(API_URL + "/unrestricted-pdf") .post(requestBody) .build(); try { @@ -76,7 +83,7 @@ public static void main(String[] args) { Request deleteRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(deleteBody) .build(); try (Response deleteResp = @@ -114,7 +121,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/Unzip.java b/Java/Endpoint Examples/JSON Payload/Unzip.java index d81b0395..7c5c4adc 100644 --- a/Java/Endpoint Examples/JSON Payload/Unzip.java +++ b/Java/Endpoint Examples/JSON Payload/Unzip.java @@ -8,6 +8,13 @@ public class Unzip { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.zip"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/unzip") + .url(API_URL + "/unzip") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.zip") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/UpToolkit.java b/Java/Endpoint Examples/JSON Payload/UpToolkit.java index 561cb4bd..d4775cff 100644 --- a/Java/Endpoint Examples/JSON Payload/UpToolkit.java +++ b/Java/Endpoint Examples/JSON Payload/UpToolkit.java @@ -7,9 +7,16 @@ public class UpToolkit { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + public static void main(String[] args) { // up-forms and up-office can be used to query the other tools - Request request = new Request.Builder().url("https://api.pdfrest.com/up-toolkit").get().build(); + Request request = new Request.Builder().url(API_URL + "/up-toolkit").get().build(); try { OkHttpClient client = new OkHttpClient().newBuilder().readTimeout(60, TimeUnit.SECONDS).build(); diff --git a/Java/Endpoint Examples/JSON Payload/Upload.java b/Java/Endpoint Examples/JSON Payload/Upload.java index 10f2e8af..b9f14fb7 100644 --- a/Java/Endpoint Examples/JSON Payload/Upload.java +++ b/Java/Endpoint Examples/JSON Payload/Upload.java @@ -6,6 +6,13 @@ public class Upload { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -30,7 +37,7 @@ public static void main(String[] args) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/WatermarkedPDF.java b/Java/Endpoint Examples/JSON Payload/WatermarkedPDF.java index 230fed0c..1f6bc029 100644 --- a/Java/Endpoint Examples/JSON Payload/WatermarkedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/WatermarkedPDF.java @@ -8,6 +8,13 @@ public class WatermarkedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -46,7 +53,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/watermarked-pdf") + .url(API_URL + "/watermarked-pdf") .post(requestBody) .build(); try { @@ -75,7 +82,7 @@ public static void main(String[] args) { Request deleteRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(deleteBody) .build(); try (Response deleteResp = @@ -112,7 +119,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/Word.java b/Java/Endpoint Examples/JSON Payload/Word.java index 8c3a8630..a7e99f88 100644 --- a/Java/Endpoint Examples/JSON Payload/Word.java +++ b/Java/Endpoint Examples/JSON Payload/Word.java @@ -8,6 +8,13 @@ public class Word { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -44,7 +51,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/word") + .url(API_URL + "/word") .post(requestBody) .build(); try { @@ -78,7 +85,7 @@ private static String uploadFile(File inputFile) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", "File.pdf") - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/JSON Payload/Zip.java b/Java/Endpoint Examples/JSON Payload/Zip.java index a982cd6c..b1f2eb74 100644 --- a/Java/Endpoint Examples/JSON Payload/Zip.java +++ b/Java/Endpoint Examples/JSON Payload/Zip.java @@ -8,6 +8,13 @@ public class Zip { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + private static final String[] DEFAULT_FILE_PATHS = new String[] {"/path/to/file1.pdf", "/path/to/file2.pdf"}; @@ -52,7 +59,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/zip") + .url(API_URL + "/zip") .post(requestBody) .build(); try { @@ -86,7 +93,7 @@ private static String uploadFile(File inputFile, String filename) { new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) .header("Content-Filename", filename) - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/BatchDelete.java b/Java/Endpoint Examples/Multipart Payload/BatchDelete.java index 302b0c87..3bfa1d0d 100644 --- a/Java/Endpoint Examples/Multipart Payload/BatchDelete.java +++ b/Java/Endpoint Examples/Multipart Payload/BatchDelete.java @@ -6,6 +6,13 @@ public class BatchDelete { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. private static final String DEFAULT_API_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; @@ -23,7 +30,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/Bmp.java b/Java/Endpoint Examples/Multipart Payload/Bmp.java index ebe93a15..61405cfe 100644 --- a/Java/Endpoint Examples/Multipart Payload/Bmp.java +++ b/Java/Endpoint Examples/Multipart Payload/Bmp.java @@ -7,6 +7,13 @@ public class Bmp { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -35,7 +42,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/bmp") + .url(API_URL + "/bmp") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/CompressedPDF.java b/Java/Endpoint Examples/Multipart Payload/CompressedPDF.java index 6dbfe535..360aa897 100644 --- a/Java/Endpoint Examples/Multipart Payload/CompressedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/CompressedPDF.java @@ -12,6 +12,13 @@ public class CompressedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -43,7 +50,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/compressed-pdf") + .url(API_URL + "/compressed-pdf") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/DecryptedPDF.java b/Java/Endpoint Examples/Multipart Payload/DecryptedPDF.java index 7171985e..2c2d83e2 100644 --- a/Java/Endpoint Examples/Multipart Payload/DecryptedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/DecryptedPDF.java @@ -7,6 +7,13 @@ public class DecryptedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -36,7 +43,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/decrypted-pdf") + .url(API_URL + "/decrypted-pdf") .post(requestBody) .build(); try { @@ -66,7 +73,7 @@ public static void main(String[] args) { Request deleteRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(deleteBody) .build(); try (Response deleteResp = diff --git a/Java/Endpoint Examples/Multipart Payload/DeleteResource.java b/Java/Endpoint Examples/Multipart Payload/DeleteResource.java index 6459a2c4..c7c93ab7 100644 --- a/Java/Endpoint Examples/Multipart Payload/DeleteResource.java +++ b/Java/Endpoint Examples/Multipart Payload/DeleteResource.java @@ -5,6 +5,13 @@ public class DeleteResource { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Resource UUIDs can be found in the JSON response of POST requests as "outputId". // Resource UUIDs usually look like this: '0950b9bdf-0465-4d3f-8ea3-d2894f1ae839'. private static final String FILE_ID = @@ -22,7 +29,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/resource/" + FILE_ID) + .url(API_URL + "/resource/" + FILE_ID) .method("DELETE", requestBody) .build(); Response response = client.newCall(request).execute(); diff --git a/Java/Endpoint Examples/Multipart Payload/EncryptedPDF.java b/Java/Endpoint Examples/Multipart Payload/EncryptedPDF.java index 62306bf2..1d4a2beb 100644 --- a/Java/Endpoint Examples/Multipart Payload/EncryptedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/EncryptedPDF.java @@ -7,6 +7,13 @@ public class EncryptedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -36,7 +43,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/encrypted-pdf") + .url(API_URL + "/encrypted-pdf") .post(requestBody) .build(); try { @@ -66,7 +73,7 @@ public static void main(String[] args) { Request deleteRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(deleteBody) .build(); try (Response deleteResp = diff --git a/Java/Endpoint Examples/Multipart Payload/Excel.java b/Java/Endpoint Examples/Multipart Payload/Excel.java index fbd211f7..11c063ef 100644 --- a/Java/Endpoint Examples/Multipart Payload/Excel.java +++ b/Java/Endpoint Examples/Multipart Payload/Excel.java @@ -12,6 +12,13 @@ public class Excel { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -40,7 +47,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/excel") + .url(API_URL + "/excel") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/ExportedFormData.java b/Java/Endpoint Examples/Multipart Payload/ExportedFormData.java index 08a4281e..dbf6c5d1 100644 --- a/Java/Endpoint Examples/Multipart Payload/ExportedFormData.java +++ b/Java/Endpoint Examples/Multipart Payload/ExportedFormData.java @@ -7,6 +7,13 @@ public class ExportedFormData { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -35,7 +42,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/exported-form-data") + .url(API_URL + "/exported-form-data") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/ExtractedImages.java b/Java/Endpoint Examples/Multipart Payload/ExtractedImages.java index 17ff354e..366987cc 100644 --- a/Java/Endpoint Examples/Multipart Payload/ExtractedImages.java +++ b/Java/Endpoint Examples/Multipart Payload/ExtractedImages.java @@ -12,6 +12,13 @@ public class ExtractedImages { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -43,7 +50,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/extracted-images") + .url(API_URL + "/extracted-images") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/ExtractedText.java b/Java/Endpoint Examples/Multipart Payload/ExtractedText.java index 159b031b..3cebd062 100644 --- a/Java/Endpoint Examples/Multipart Payload/ExtractedText.java +++ b/Java/Endpoint Examples/Multipart Payload/ExtractedText.java @@ -11,6 +11,13 @@ public class ExtractedText { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -38,7 +45,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/extracted-text") + .url(API_URL + "/extracted-text") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/FlattenedAnnotationsPDF.java b/Java/Endpoint Examples/Multipart Payload/FlattenedAnnotationsPDF.java index 01be0b04..d046f11c 100644 --- a/Java/Endpoint Examples/Multipart Payload/FlattenedAnnotationsPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/FlattenedAnnotationsPDF.java @@ -7,6 +7,13 @@ public class FlattenedAnnotationsPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -35,7 +42,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/flattened-annotations-pdf") + .url(API_URL + "/flattened-annotations-pdf") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/FlattenedFormsPDF.java b/Java/Endpoint Examples/Multipart Payload/FlattenedFormsPDF.java index d3b9c6d9..46e1900f 100644 --- a/Java/Endpoint Examples/Multipart Payload/FlattenedFormsPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/FlattenedFormsPDF.java @@ -7,6 +7,13 @@ public class FlattenedFormsPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -35,7 +42,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/flattened-forms-pdf") + .url(API_URL + "/flattened-forms-pdf") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/FlattenedLayersPDF.java b/Java/Endpoint Examples/Multipart Payload/FlattenedLayersPDF.java index 8c9feebe..03547a2b 100644 --- a/Java/Endpoint Examples/Multipart Payload/FlattenedLayersPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/FlattenedLayersPDF.java @@ -7,6 +7,13 @@ public class FlattenedLayersPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -35,7 +42,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/flattened-layers-pdf") + .url(API_URL + "/flattened-layers-pdf") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/FlattenedTransparenciesPDF.java b/Java/Endpoint Examples/Multipart Payload/FlattenedTransparenciesPDF.java index 2a926cf2..7cc2dd11 100644 --- a/Java/Endpoint Examples/Multipart Payload/FlattenedTransparenciesPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/FlattenedTransparenciesPDF.java @@ -7,6 +7,13 @@ public class FlattenedTransparenciesPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -35,7 +42,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/flattened-transparencies-pdf") + .url(API_URL + "/flattened-transparencies-pdf") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/GetResource.java b/Java/Endpoint Examples/Multipart Payload/GetResource.java index 769213f0..9007dc19 100644 --- a/Java/Endpoint Examples/Multipart Payload/GetResource.java +++ b/Java/Endpoint Examples/Multipart Payload/GetResource.java @@ -7,6 +7,13 @@ public class GetResource { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Resource UUIDs can be found in the JSON response of POST requests as "outputId". // Resource UUIDs usually look like this: '0950b9bdf-0465-4d3f-8ea3-d2894f1ae839'. private static final String FILE_ID = @@ -20,7 +27,7 @@ public class GetResource { public static void main(String[] args) { try { String urlString = - String.format("https://api.pdfrest.com/resource/%s?format=%2s", FILE_ID, OUTPUT_FORMAT); + String.format(API_URL + "/resource/%s?format=%2s", FILE_ID, OUTPUT_FORMAT); InputStream in = new URL(urlString).openStream(); Files.copy(in, Paths.get("/path/to/write/file")); // Set a path for the file to be written } catch (IOException e) { diff --git a/Java/Endpoint Examples/Multipart Payload/Gif.java b/Java/Endpoint Examples/Multipart Payload/Gif.java index c4f1bfa1..7189afd4 100644 --- a/Java/Endpoint Examples/Multipart Payload/Gif.java +++ b/Java/Endpoint Examples/Multipart Payload/Gif.java @@ -7,6 +7,13 @@ public class Gif { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -35,7 +42,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/gif") + .url(API_URL + "/gif") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/Jpg.java b/Java/Endpoint Examples/Multipart Payload/Jpg.java index 2f789502..6b33fb92 100644 --- a/Java/Endpoint Examples/Multipart Payload/Jpg.java +++ b/Java/Endpoint Examples/Multipart Payload/Jpg.java @@ -7,6 +7,13 @@ public class Jpg { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -35,7 +42,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/jpg") + .url(API_URL + "/jpg") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/LinearizedPDF.java b/Java/Endpoint Examples/Multipart Payload/LinearizedPDF.java index d893fe45..ef8d8d4d 100644 --- a/Java/Endpoint Examples/Multipart Payload/LinearizedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/LinearizedPDF.java @@ -7,6 +7,13 @@ public class LinearizedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -35,7 +42,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/linearized-pdf") + .url(API_URL + "/linearized-pdf") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/Markdown.java b/Java/Endpoint Examples/Multipart Payload/Markdown.java index 79661866..457e7ad9 100644 --- a/Java/Endpoint Examples/Multipart Payload/Markdown.java +++ b/Java/Endpoint Examples/Multipart Payload/Markdown.java @@ -11,6 +11,13 @@ public class Markdown { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -39,7 +46,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/markdown") + .url(API_URL + "/markdown") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/MergedPDF.java b/Java/Endpoint Examples/Multipart Payload/MergedPDF.java index 513a52d5..3d0ef7a7 100644 --- a/Java/Endpoint Examples/Multipart Payload/MergedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/MergedPDF.java @@ -11,6 +11,13 @@ public class MergedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the paths to your file here, or as the arguments when running the program. private static final String[] DEFAULT_FILE_PATHS = new String[] {"/path/to/file1.pdf", "/path/to/file2.pdf"}; @@ -46,7 +53,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/merged-pdf") + .url(API_URL + "/merged-pdf") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/PDF.java b/Java/Endpoint Examples/Multipart Payload/PDF.java index 1bc0aceb..c766adb5 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDF.java +++ b/Java/Endpoint Examples/Multipart Payload/PDF.java @@ -7,6 +7,13 @@ public class PDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -35,7 +42,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf") + .url(API_URL + "/pdf") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/PDFA.java b/Java/Endpoint Examples/Multipart Payload/PDFA.java index 700802dd..7fe6724f 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFA.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFA.java @@ -7,6 +7,13 @@ public class PDFA { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -36,7 +43,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdfa") + .url(API_URL + "/pdfa") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/PDFInfo.java b/Java/Endpoint Examples/Multipart Payload/PDFInfo.java index 4bd11393..e3cdb3b9 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFInfo.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFInfo.java @@ -7,6 +7,13 @@ public class PDFInfo { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -35,7 +42,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-info") + .url(API_URL + "/pdf-info") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithAcroforms.java b/Java/Endpoint Examples/Multipart Payload/PDFWithAcroforms.java index c3939b80..2f063754 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithAcroforms.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithAcroforms.java @@ -11,6 +11,13 @@ public class PDFWithAcroforms { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -38,7 +45,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-acroforms") + .url(API_URL + "/pdf-with-acroforms") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedAttachment.java b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedAttachment.java index 82be337d..4d6d2b9f 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedAttachment.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedAttachment.java @@ -12,6 +12,13 @@ public class PDFWithAddedAttachment { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -48,7 +55,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-added-attachment") + .url(API_URL + "/pdf-with-added-attachment") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedImage.java b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedImage.java index 758a7e52..583bfc2c 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedImage.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedImage.java @@ -7,6 +7,13 @@ public class PDFWithAddedImage { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -46,7 +53,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-added-image") + .url(API_URL + "/pdf-with-added-image") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedText.java b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedText.java index ee99e650..49c0a37f 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedText.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedText.java @@ -7,6 +7,13 @@ public class PDFWithAddedText { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file"; @@ -38,7 +45,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-added-text") + .url(API_URL + "/pdf-with-added-text") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithConvertedColors.java b/Java/Endpoint Examples/Multipart Payload/PDFWithConvertedColors.java index a6696dc2..0e94bc2e 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithConvertedColors.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithConvertedColors.java @@ -12,6 +12,13 @@ public class PDFWithConvertedColors { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -43,7 +50,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-converted-colors") + .url(API_URL + "/pdf-with-converted-colors") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithImportedFormData.java b/Java/Endpoint Examples/Multipart Payload/PDFWithImportedFormData.java index 850cbb2c..e66457ae 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithImportedFormData.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithImportedFormData.java @@ -7,6 +7,13 @@ public class PDFWithImportedFormData { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -43,7 +50,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-imported-form-data") + .url(API_URL + "/pdf-with-imported-form-data") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithOCRText.java b/Java/Endpoint Examples/Multipart Payload/PDFWithOCRText.java index a24ba998..5938734d 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithOCRText.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithOCRText.java @@ -12,6 +12,13 @@ public class PDFWithOCRText { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -40,7 +47,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-ocr-text") + .url(API_URL + "/pdf-with-ocr-text") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithPageBoxesSet.java b/Java/Endpoint Examples/Multipart Payload/PDFWithPageBoxesSet.java index ada82fe4..c71df8b0 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithPageBoxesSet.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithPageBoxesSet.java @@ -8,6 +8,13 @@ public class PDFWithPageBoxesSet { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file"; @@ -56,7 +63,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-page-boxes-set") + .url(API_URL + "/pdf-with-page-boxes-set") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextApplied.java b/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextApplied.java index 770e598c..58c6fdde 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextApplied.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextApplied.java @@ -12,6 +12,13 @@ public class PDFWithRedactedTextApplied { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -41,7 +48,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-redacted-text-applied") + .url(API_URL + "/pdf-with-redacted-text-applied") .post(requestBody) .build(); try { @@ -71,7 +78,7 @@ public static void main(String[] args) { Request deleteRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(deleteBody) .build(); try (Response deleteResp = diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextPreview.java b/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextPreview.java index f85a2102..6077baa0 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextPreview.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextPreview.java @@ -7,6 +7,13 @@ public class PDFWithRedactedTextPreview { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file"; @@ -39,7 +46,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdf-with-redacted-text-preview") + .url(API_URL + "/pdf-with-redacted-text-preview") .post(requestBody) .build(); try { @@ -71,7 +78,7 @@ public static void main(String[] args) { Request deleteRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(deleteBody) .build(); try (Response deleteResp = diff --git a/Java/Endpoint Examples/Multipart Payload/PDFX.java b/Java/Endpoint Examples/Multipart Payload/PDFX.java index c38cac5f..2081b717 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFX.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFX.java @@ -7,6 +7,13 @@ public class PDFX { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -36,7 +43,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/pdfx") + .url(API_URL + "/pdfx") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/Png.java b/Java/Endpoint Examples/Multipart Payload/Png.java index 42487a9e..c08a8492 100644 --- a/Java/Endpoint Examples/Multipart Payload/Png.java +++ b/Java/Endpoint Examples/Multipart Payload/Png.java @@ -7,6 +7,13 @@ public class Png { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -35,7 +42,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/png") + .url(API_URL + "/png") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/Powerpoint.java b/Java/Endpoint Examples/Multipart Payload/Powerpoint.java index e03f67e7..5eb71905 100644 --- a/Java/Endpoint Examples/Multipart Payload/Powerpoint.java +++ b/Java/Endpoint Examples/Multipart Payload/Powerpoint.java @@ -12,6 +12,13 @@ public class Powerpoint { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -40,7 +47,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/powerpoint") + .url(API_URL + "/powerpoint") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/RasterizedPDF.java b/Java/Endpoint Examples/Multipart Payload/RasterizedPDF.java index 856ce02f..0fb7644d 100644 --- a/Java/Endpoint Examples/Multipart Payload/RasterizedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/RasterizedPDF.java @@ -7,6 +7,13 @@ public class RasterizedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -35,7 +42,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/rasterized-pdf") + .url(API_URL + "/rasterized-pdf") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/RequestStatus.java b/Java/Endpoint Examples/Multipart Payload/RequestStatus.java index 0dc6e4e5..64257464 100644 --- a/Java/Endpoint Examples/Multipart Payload/RequestStatus.java +++ b/Java/Endpoint Examples/Multipart Payload/RequestStatus.java @@ -7,6 +7,13 @@ public class RequestStatus { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. private static final String DEFAULT_API_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; @@ -67,7 +74,7 @@ private static String getPdfaResponse(File inputFile, String apiKey) { new Request.Builder() .header("Api-Key", apiKey) .header("response-type", "requestId") - .url("https://api.pdfrest.com/pdfa") + .url(API_URL + "/pdfa") .post(requestBody) .build(); try { @@ -85,7 +92,7 @@ private static String getPdfaResponse(File inputFile, String apiKey) { } private static String getRequestStatusResponse(String requestId, String apiKey) { - String urlString = String.format("https://api.pdfrest.com/request-status/%s", requestId); + String urlString = String.format(API_URL + "/request-status/%s", requestId); Request request = new Request.Builder().header("Api-Key", apiKey).url(urlString).get().build(); try { OkHttpClient client = diff --git a/Java/Endpoint Examples/Multipart Payload/RestrictedPDF.java b/Java/Endpoint Examples/Multipart Payload/RestrictedPDF.java index e91c75a0..cc2fa698 100644 --- a/Java/Endpoint Examples/Multipart Payload/RestrictedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/RestrictedPDF.java @@ -7,6 +7,13 @@ public class RestrictedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -40,7 +47,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/restricted-pdf") + .url(API_URL + "/restricted-pdf") .post(requestBody) .build(); try { @@ -70,7 +77,7 @@ public static void main(String[] args) { Request deleteRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(deleteBody) .build(); try (Response deleteResp = diff --git a/Java/Endpoint Examples/Multipart Payload/SignedPDF.java b/Java/Endpoint Examples/Multipart Payload/SignedPDF.java index 1631c79d..7ddbf345 100644 --- a/Java/Endpoint Examples/Multipart Payload/SignedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/SignedPDF.java @@ -7,6 +7,13 @@ public class SignedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. private static final String DEFAULT_API_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; @@ -78,7 +85,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/signed-pdf") + .url(API_URL + "/signed-pdf") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/SignedPDFNonPFX.java b/Java/Endpoint Examples/Multipart Payload/SignedPDFNonPFX.java index 4b2f470d..fba2903f 100644 --- a/Java/Endpoint Examples/Multipart Payload/SignedPDFNonPFX.java +++ b/Java/Endpoint Examples/Multipart Payload/SignedPDFNonPFX.java @@ -7,6 +7,13 @@ public class SignedPDFNonPFX { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. private static final String DEFAULT_API_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; @@ -67,7 +74,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/signed-pdf") + .url(API_URL + "/signed-pdf") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/SplitPDF.java b/Java/Endpoint Examples/Multipart Payload/SplitPDF.java index 8dab71d3..b3dda0fe 100644 --- a/Java/Endpoint Examples/Multipart Payload/SplitPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/SplitPDF.java @@ -7,6 +7,13 @@ public class SplitPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -37,7 +44,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/split-pdf") + .url(API_URL + "/split-pdf") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/Tif.java b/Java/Endpoint Examples/Multipart Payload/Tif.java index 07541f67..ef966326 100644 --- a/Java/Endpoint Examples/Multipart Payload/Tif.java +++ b/Java/Endpoint Examples/Multipart Payload/Tif.java @@ -7,6 +7,13 @@ public class Tif { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -35,7 +42,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/tif") + .url(API_URL + "/tif") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/UnrestrictedPDF.java b/Java/Endpoint Examples/Multipart Payload/UnrestrictedPDF.java index 91b41c5a..b93e0e46 100644 --- a/Java/Endpoint Examples/Multipart Payload/UnrestrictedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/UnrestrictedPDF.java @@ -7,6 +7,13 @@ public class UnrestrictedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -37,7 +44,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/unrestricted-pdf") + .url(API_URL + "/unrestricted-pdf") .post(requestBody) .build(); try { @@ -68,7 +75,7 @@ public static void main(String[] args) { Request deleteRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(deleteBody) .build(); try (Response deleteResp = diff --git a/Java/Endpoint Examples/Multipart Payload/Unzip.java b/Java/Endpoint Examples/Multipart Payload/Unzip.java index eee6e728..22362356 100644 --- a/Java/Endpoint Examples/Multipart Payload/Unzip.java +++ b/Java/Endpoint Examples/Multipart Payload/Unzip.java @@ -7,6 +7,13 @@ public class Unzip { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.zip"; @@ -34,7 +41,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/unzip") + .url(API_URL + "/unzip") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/UpToolkit.java b/Java/Endpoint Examples/Multipart Payload/UpToolkit.java index 561cb4bd..d4775cff 100644 --- a/Java/Endpoint Examples/Multipart Payload/UpToolkit.java +++ b/Java/Endpoint Examples/Multipart Payload/UpToolkit.java @@ -7,9 +7,16 @@ public class UpToolkit { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + public static void main(String[] args) { // up-forms and up-office can be used to query the other tools - Request request = new Request.Builder().url("https://api.pdfrest.com/up-toolkit").get().build(); + Request request = new Request.Builder().url(API_URL + "/up-toolkit").get().build(); try { OkHttpClient client = new OkHttpClient().newBuilder().readTimeout(60, TimeUnit.SECONDS).build(); diff --git a/Java/Endpoint Examples/Multipart Payload/Upload.java b/Java/Endpoint Examples/Multipart Payload/Upload.java index 9700da18..73f3c5fa 100644 --- a/Java/Endpoint Examples/Multipart Payload/Upload.java +++ b/Java/Endpoint Examples/Multipart Payload/Upload.java @@ -6,6 +6,13 @@ public class Upload { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the paths to your file here, or as the arguments when running the program. private static final String[] DEFAULT_FILE_PATHS = new String[] {"/path/to/file1.pdf", "/path/to/file2.pdf"}; @@ -38,7 +45,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/upload") + .url(API_URL + "/upload") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/WatermarkedPDF.java b/Java/Endpoint Examples/Multipart Payload/WatermarkedPDF.java index 6b8b0a03..b953b5f5 100644 --- a/Java/Endpoint Examples/Multipart Payload/WatermarkedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/WatermarkedPDF.java @@ -7,6 +7,13 @@ public class WatermarkedPDF { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -37,7 +44,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/watermarked-pdf") + .url(API_URL + "/watermarked-pdf") .post(requestBody) .build(); try { @@ -68,7 +75,7 @@ public static void main(String[] args) { Request deleteRequest = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/delete") + .url(API_URL + "/delete") .post(deleteBody) .build(); try (Response deleteResp = diff --git a/Java/Endpoint Examples/Multipart Payload/Word.java b/Java/Endpoint Examples/Multipart Payload/Word.java index 3351d618..aaeafc40 100644 --- a/Java/Endpoint Examples/Multipart Payload/Word.java +++ b/Java/Endpoint Examples/Multipart Payload/Word.java @@ -12,6 +12,13 @@ public class Word { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; @@ -40,7 +47,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/word") + .url(API_URL + "/word") .post(requestBody) .build(); try { diff --git a/Java/Endpoint Examples/Multipart Payload/Zip.java b/Java/Endpoint Examples/Multipart Payload/Zip.java index 69b2ac36..c7e55409 100644 --- a/Java/Endpoint Examples/Multipart Payload/Zip.java +++ b/Java/Endpoint Examples/Multipart Payload/Zip.java @@ -6,6 +6,13 @@ public class Zip { + // By default, we use the US-based API service. This is the primary endpoint for global use. + private static final String API_URL = "https://api.pdfrest.com"; + + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + //private static final String API_URL = "https://eu-api.pdfrest.com"; + // Specify the paths to your file here, or as the arguments when running the program. private static final String[] DEFAULT_FILE_PATHS = new String[] {"/path/to/file1.pdf", "/path/to/file2.pdf"}; @@ -38,7 +45,7 @@ public static void main(String[] args) { Request request = new Request.Builder() .header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY)) - .url("https://api.pdfrest.com/zip") + .url(API_URL + "/zip") .post(requestBody) .build(); try { From cc4dd8bdee8f92438c0768a40ef97fc91a8de491 Mon Sep 17 00:00:00 2001 From: Taylor Smith Date: Tue, 9 Sep 2025 16:43:09 -0500 Subject: [PATCH 03/11] Add eu/gdpr comment to JavaScript samples --- .../decrypt-add-reencrypt.js | 14 +++++++--- .../merge-different-file-types.js | 14 +++++++--- .../ocr-with-extract-text.js | 14 +++++++--- .../pdfa-3b-with-attachment.js | 12 +++++++-- .../preserve-word-document.js | 12 +++++++-- .../protected-watermark.js | 12 +++++++-- .../redact-preview-and-finalize.js | 12 +++++++-- .../JSON Payload/batch-delete.js | 10 ++++++- .../Endpoint Examples/JSON Payload/bmp.js | 12 +++++++-- .../JSON Payload/compressed-pdf.js | 12 +++++++-- .../JSON Payload/decrypted-pdf.js | 20 +++++++++----- .../JSON Payload/delete-resource.js | 10 ++++++- .../JSON Payload/encrypted-pdf.js | 20 +++++++++----- .../Endpoint Examples/JSON Payload/excel.js | 12 +++++++-- .../JSON Payload/exported-form-data.js | 12 +++++++-- .../JSON Payload/extracted-images.js | 12 +++++++-- .../JSON Payload/extracted-text.js | 12 +++++++-- .../JSON Payload/flattened-annotations-pdf.js | 12 +++++++-- .../JSON Payload/flattened-forms-pdf.js | 12 +++++++-- .../JSON Payload/flattened-layers-pdf.js | 12 +++++++-- .../flattened-transparencies-pdf.js | 12 +++++++-- .../JSON Payload/get-resource.js | 10 ++++++- .../Endpoint Examples/JSON Payload/gif.js | 14 ++++++++-- .../Endpoint Examples/JSON Payload/jpg.js | 12 +++++++-- .../JSON Payload/linearized-pdf.js | 12 +++++++-- .../JSON Payload/markdown.js | 14 +++++++--- .../JSON Payload/merged-pdf.js | 14 +++++++--- .../JSON Payload/pdf-info.js | 12 +++++++-- .../JSON Payload/pdf-with-acroforms.js | 12 +++++++-- .../JSON Payload/pdf-with-added-attachment.js | 14 +++++++--- .../JSON Payload/pdf-with-added-image.js | 14 +++++++--- .../JSON Payload/pdf-with-added-text.js | 12 +++++++-- .../JSON Payload/pdf-with-converted-colors.js | 12 +++++++-- .../pdf-with-imported-form-data.js | 14 +++++++--- .../JSON Payload/pdf-with-ocr-text.js | 12 +++++++-- .../JSON Payload/pdf-with-page-boxes-set.js | 12 +++++++-- .../pdf-with-redacted-text-applied.js | 20 +++++++++----- .../pdf-with-redacted-text-preview.js | 20 +++++++++----- .../Endpoint Examples/JSON Payload/pdf.js | 12 +++++++-- .../Endpoint Examples/JSON Payload/pdfa.js | 12 +++++++-- .../Endpoint Examples/JSON Payload/pdfx.js | 12 +++++++-- .../Endpoint Examples/JSON Payload/png.js | 12 +++++++-- .../JSON Payload/powerpoint.js | 12 +++++++-- .../JSON Payload/rasterized-pdf.js | 12 +++++++-- .../JSON Payload/restricted-pdf.js | 20 +++++++++----- .../JSON Payload/signed-pdf-non-pfx.js | 14 +++++++--- .../JSON Payload/signed-pdf.js | 14 +++++++--- .../JSON Payload/split-pdf.js | 12 +++++++-- .../Endpoint Examples/JSON Payload/tif.js | 12 +++++++-- .../JSON Payload/unrestricted-pdf.js | 22 ++++++++++----- .../Endpoint Examples/JSON Payload/unzip.js | 12 +++++++-- .../JSON Payload/up-toolkit.js | 10 ++++++- .../Endpoint Examples/JSON Payload/upload.js | 10 ++++++- .../JSON Payload/watermarked-pdf.js | 20 +++++++++----- .../Endpoint Examples/JSON Payload/word.js | 12 +++++++-- .../Endpoint Examples/JSON Payload/zip.js | 14 +++++++--- .../Multipart Payload/bmp.js | 27 ++++++++++++------- .../Multipart Payload/compressed-pdf.js | 19 ++++++++++--- .../Multipart Payload/decrypted-pdf.js | 27 +++++++++++++------ .../Multipart Payload/delete-resource.js | 11 +++++++- .../Multipart Payload/encrypted-pdf.js | 20 +++++++++----- .../Multipart Payload/excel.js | 16 ++++++++--- .../Multipart Payload/exported-form-data.js | 14 +++++++--- .../Multipart Payload/extracted-images.js | 16 ++++++++--- .../Multipart Payload/extracted-text.js | 10 ++++++- .../flattened-annotations-pdf.js | 10 ++++++- .../Multipart Payload/flattened-forms-pdf.js | 10 ++++++- .../Multipart Payload/flattened-layers-pdf.js | 10 ++++++- .../flattened-transparencies-pdf.js | 15 ++++++++--- .../Multipart Payload/get-resource.js | 10 ++++++- .../Multipart Payload/gif.js | 18 +++++++++---- .../Multipart Payload/jpg.js | 18 +++++++++---- .../Multipart Payload/linearized-pdf.js | 16 ++++++++--- .../Multipart Payload/markdown.js | 12 +++++++-- .../Multipart Payload/merged-pdf.js | 14 +++++++--- .../Multipart Payload/pdf-info.js | 14 +++++++--- .../Multipart Payload/pdf-with-acroforms.js | 10 ++++++- .../pdf-with-added-attachment.js | 14 +++++++--- .../Multipart Payload/pdf-with-added-image.js | 14 +++++++--- .../Multipart Payload/pdf-with-added-text.js | 16 ++++++++--- .../pdf-with-converted-colors.js | 16 ++++++++--- .../pdf-with-imported-form-data.js | 10 ++++++- .../Multipart Payload/pdf-with-ocr-text.js | 16 ++++++++--- .../pdf-with-page-boxes-set.js | 10 ++++++- .../pdf-with-redacted-text-applied.js | 22 ++++++++++----- .../pdf-with-redacted-text-preview.js | 22 ++++++++++----- .../Multipart Payload/pdf.js | 20 +++++++++----- .../Multipart Payload/pdfa.js | 18 +++++++++---- .../Multipart Payload/pdfx.js | 18 +++++++++---- .../Multipart Payload/png.js | 18 +++++++++---- .../Multipart Payload/powerpoint.js | 16 ++++++++--- .../Multipart Payload/rasterized-pdf.js | 10 ++++++- .../Multipart Payload/request-status.js | 16 ++++++++--- .../Multipart Payload/restricted-pdf.js | 25 +++++++++++------ .../Multipart Payload/signed-pdf-non-pfx.js | 10 ++++++- .../Multipart Payload/signed-pdf.js | 11 +++++++- .../Multipart Payload/split-pdf.js | 14 +++++++--- .../Multipart Payload/tif.js | 18 +++++++++---- .../Multipart Payload/unrestricted-pdf.js | 24 +++++++++++------ .../Multipart Payload/unzip.js | 10 ++++++- .../Multipart Payload/up-toolkit.js | 10 ++++++- .../Multipart Payload/upload.js | 14 +++++++--- .../Multipart Payload/watermarked-pdf.js | 22 ++++++++++----- .../Multipart Payload/word.js | 16 ++++++++--- .../Multipart Payload/zip.js | 14 +++++++--- 105 files changed, 1179 insertions(+), 326 deletions(-) diff --git a/JavaScript/Complex Flow Examples/decrypt-add-reencrypt.js b/JavaScript/Complex Flow Examples/decrypt-add-reencrypt.js index b77fc9bb..0f5c3ad8 100644 --- a/JavaScript/Complex Flow Examples/decrypt-add-reencrypt.js +++ b/JavaScript/Complex Flow Examples/decrypt-add-reencrypt.js @@ -11,6 +11,14 @@ var fs = require("fs"); * lock it up again. */ +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key var decryptRequestData = new FormData(); @@ -20,7 +28,7 @@ decryptRequestData.append("current_open_password", "current_example_pw"); var decryptConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/decrypted-pdf", + url: apiUrl + "/decrypted-pdf", headers: { "Api-Key": apiKey, ...decryptRequestData.getHeaders(), @@ -41,7 +49,7 @@ axios(decryptConfig) var addImageConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-added-image", + url: apiUrl + "/pdf-with-added-image", headers: { "Api-Key": apiKey, ...data.getHeaders(), @@ -58,7 +66,7 @@ axios(decryptConfig) var encryptConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/encrypted-pdf", + url: apiUrl + "/encrypted-pdf", headers: { "Api-Key": apiKey, ...data.getHeaders(), diff --git a/JavaScript/Complex Flow Examples/merge-different-file-types.js b/JavaScript/Complex Flow Examples/merge-different-file-types.js index 6c066cc8..a744f928 100644 --- a/JavaScript/Complex Flow Examples/merge-different-file-types.js +++ b/JavaScript/Complex Flow Examples/merge-different-file-types.js @@ -14,6 +14,14 @@ First, we will upload an image file to the /pdf route and capture the output ID. * that the /pdf route takes as inputs. */ +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key var imageData = new FormData(); @@ -22,7 +30,7 @@ imageData.append("file", fs.createReadStream("/path/to/image.png")); var imageConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf", + url: apiUrl + "/pdf", headers: { "Api-Key": apiKey, ...imageData.getHeaders(), @@ -40,7 +48,7 @@ axios(imageConfig) var pptConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf", + url: apiUrl + "/pdf", headers: { "Api-Key": apiKey, ...pptData.getHeaders(), @@ -64,7 +72,7 @@ axios(imageConfig) var mergeConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/merged-pdf", + url: apiUrl + "/merged-pdf", headers: { "Api-Key": apiKey, ...mergeData.getHeaders(), diff --git a/JavaScript/Complex Flow Examples/ocr-with-extract-text.js b/JavaScript/Complex Flow Examples/ocr-with-extract-text.js index 17b053bd..56b8334e 100644 --- a/JavaScript/Complex Flow Examples/ocr-with-extract-text.js +++ b/JavaScript/Complex Flow Examples/ocr-with-extract-text.js @@ -11,6 +11,14 @@ var fs = require("fs"); * return the newly added text. */ +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key var ocrData = new FormData(); @@ -20,7 +28,7 @@ ocrData.append("output", "example_pdf-with-ocr-text_out"); var ocrConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-ocr-text", + url: apiUrl + "/pdf-with-ocr-text", headers: { "Api-Key": apiKey, ...ocrData.getHeaders(), @@ -43,7 +51,7 @@ axios(ocrConfig) var extractConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/extracted-text", + url: apiUrl + "/extracted-text", headers: { "Api-Key": apiKey, ...extractData.getHeaders(), @@ -71,4 +79,4 @@ axios(ocrConfig) }) .catch(function (error) { console.log(error.response ? error.response.data : error.message); - }); \ No newline at end of file + }); diff --git a/JavaScript/Complex Flow Examples/pdfa-3b-with-attachment.js b/JavaScript/Complex Flow Examples/pdfa-3b-with-attachment.js index fc06fe44..a2cdd8bd 100644 --- a/JavaScript/Complex Flow Examples/pdfa-3b-with-attachment.js +++ b/JavaScript/Complex Flow Examples/pdfa-3b-with-attachment.js @@ -12,6 +12,14 @@ var fs = require("fs"); * file may be attached and wrapped into the PDF/A conversion. */ +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key var attachData = new FormData(); @@ -25,7 +33,7 @@ attachData.append("output", "pdfrest_pdf_with_added_attachment"); var attachConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-added-attachment", + url: apiUrl + "/pdf-with-added-attachment", headers: { "Api-Key": apiKey, ...attachData.getHeaders(), @@ -45,7 +53,7 @@ axios(attachConfig) var pdfaConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdfa", + url: apiUrl + "/pdfa", headers: { "Api-Key": apiKey, ...pdfaData.getHeaders(), diff --git a/JavaScript/Complex Flow Examples/preserve-word-document.js b/JavaScript/Complex Flow Examples/preserve-word-document.js index 39ac600e..339e09d4 100644 --- a/JavaScript/Complex Flow Examples/preserve-word-document.js +++ b/JavaScript/Complex Flow Examples/preserve-word-document.js @@ -9,6 +9,14 @@ var fs = require("fs"); * and convert it to the PDF/A format for long-term storage. */ + // By default, we use the US-based API service. This is the primary endpoint for global use. + var apiUrl = "https://api.pdfrest.com"; + + /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ + //var apiUrl "https://eu-api.pdfrest.com"; + var apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key var pdfData = new FormData(); @@ -17,7 +25,7 @@ pdfData.append("file", fs.createReadStream("/path/to/word.doc")); var pdfConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf", + url: apiUrl + "/pdf", headers: { "Api-Key": apiKey, ...pdfData.getHeaders(), @@ -37,7 +45,7 @@ axios(pdfConfig) var pdfaConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdfa", + url: apiUrl + "/pdfa", headers: { "Api-Key": apiKey, ...pdfaData.getHeaders(), diff --git a/JavaScript/Complex Flow Examples/protected-watermark.js b/JavaScript/Complex Flow Examples/protected-watermark.js index 41bcef2c..54a1130f 100644 --- a/JavaScript/Complex Flow Examples/protected-watermark.js +++ b/JavaScript/Complex Flow Examples/protected-watermark.js @@ -9,6 +9,14 @@ var fs = require("fs"); * and then /restricted-pdf to lock the watermark in. */ + // By default, we use the US-based API service. This is the primary endpoint for global use. + var apiUrl = "https://api.pdfrest.com"; + + /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ + //var apiUrl "https://eu-api.pdfrest.com"; + var apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key var watermarkData = new FormData(); @@ -18,7 +26,7 @@ watermarkData.append("watermark_text", "Watermarked"); var watermarkConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/watermarked-pdf", + url: apiUrl + "/watermarked-pdf", headers: { "Api-Key": apiKey, ...watermarkData.getHeaders(), @@ -40,7 +48,7 @@ axios(watermarkConfig) var restrictConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/restricted-pdf", + url: apiUrl + "/restricted-pdf", headers: { "Api-Key": apiKey, ...data.getHeaders(), diff --git a/JavaScript/Complex Flow Examples/redact-preview-and-finalize.js b/JavaScript/Complex Flow Examples/redact-preview-and-finalize.js index 9b693f2b..7ce23e1f 100644 --- a/JavaScript/Complex Flow Examples/redact-preview-and-finalize.js +++ b/JavaScript/Complex Flow Examples/redact-preview-and-finalize.js @@ -10,6 +10,14 @@ var fs = require("fs"); * redacted as intended. */ +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key var previewData = new FormData(); @@ -26,7 +34,7 @@ previewData.append('redactions', JSON.stringify(redaction_option_array)); var previewConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-redacted-text-preview", + url: apiUrl + "/pdf-with-redacted-text-preview", headers: { "Api-Key": apiKey, ...previewData.getHeaders(), @@ -45,7 +53,7 @@ axios(previewConfig) var appliedConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-redacted-text-applied", + url: apiUrl + "/pdf-with-redacted-text-applied", headers: { "Api-Key": apiKey, ...appliedData.getHeaders(), diff --git a/JavaScript/Endpoint Examples/JSON Payload/batch-delete.js b/JavaScript/Endpoint Examples/JSON Payload/batch-delete.js index a7517e66..4f448957 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/batch-delete.js +++ b/JavaScript/Endpoint Examples/JSON Payload/batch-delete.js @@ -1,9 +1,17 @@ const axios = require("axios"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + let config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/delete", + url: apiUrl + "/delete", headers: { "api-key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/bmp.js b/JavaScript/Endpoint Examples/JSON Payload/bmp.js index d6115750..d0e3361c 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/bmp.js +++ b/JavaScript/Endpoint Examples/JSON Payload/bmp.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var bmp_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/bmp", + url: apiUrl + "/bmp", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/compressed-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/compressed-pdf.js index 4c42ccec..20fe2ef9 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/compressed-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/compressed-pdf.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var compress_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/compressed-pdf", + url: apiUrl + "/compressed-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/decrypted-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/decrypted-pdf.js index 06dd620e..78a6af5c 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/decrypted-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/decrypted-pdf.js @@ -2,6 +2,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; @@ -10,7 +18,7 @@ var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -28,7 +36,7 @@ axios(upload_config) var decrypt_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/decrypted-pdf", + url: apiUrl + "/decrypted-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", @@ -41,9 +49,9 @@ axios(upload_config) .then(function (decrypt_response) { console.log(JSON.stringify(decrypt_response.data)); - // All files uploaded or generated are automatically deleted based on the - // File Retention Period as shown on https://pdfrest.com/pricing. - // For immediate deletion of files, particularly when sensitive data + // All files uploaded or generated are automatically deleted based on the + // File Retention Period as shown on https://pdfrest.com/pricing. + // For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -54,7 +62,7 @@ axios(upload_config) var delete_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/delete", + url: apiUrl + "/delete", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/delete-resource.js b/JavaScript/Endpoint Examples/JSON Payload/delete-resource.js index 7282e9ec..97e1fa35 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/delete-resource.js +++ b/JavaScript/Endpoint Examples/JSON Payload/delete-resource.js @@ -1,9 +1,17 @@ const axios = require("axios"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + let config = { method: "delete", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + url: apiUrl + "/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", headers: { "api-key": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", }, diff --git a/JavaScript/Endpoint Examples/JSON Payload/encrypted-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/encrypted-pdf.js index 58cf8ab6..6176686f 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/encrypted-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/encrypted-pdf.js @@ -2,6 +2,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; @@ -10,7 +18,7 @@ var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -28,7 +36,7 @@ axios(upload_config) var encrypt_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/encrypted-pdf", + url: apiUrl + "/encrypted-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", @@ -42,9 +50,9 @@ axios(upload_config) console.log(JSON.stringify(encrypt_response.data)); var encrypted_output_id = encrypt_response.data.outputId; - // All files uploaded or generated are automatically deleted based on the - // File Retention Period as shown on https://pdfrest.com/pricing. - // For immediate deletion of files, particularly when sensitive data + // All files uploaded or generated are automatically deleted based on the + // File Retention Period as shown on https://pdfrest.com/pricing. + // For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -52,7 +60,7 @@ axios(upload_config) var delete_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/delete", + url: apiUrl + "/delete", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/excel.js b/JavaScript/Endpoint Examples/JSON Payload/excel.js index 2902734b..bcae907f 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/excel.js +++ b/JavaScript/Endpoint Examples/JSON Payload/excel.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var excel_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/excel", + url: apiUrl + "/excel", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/exported-form-data.js b/JavaScript/Endpoint Examples/JSON Payload/exported-form-data.js index 9402afbc..9e235278 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/exported-form-data.js +++ b/JavaScript/Endpoint Examples/JSON Payload/exported-form-data.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var export_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/exported-form-data", + url: apiUrl + "/exported-form-data", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/extracted-images.js b/JavaScript/Endpoint Examples/JSON Payload/extracted-images.js index 50516c79..7fc4eaa7 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/extracted-images.js +++ b/JavaScript/Endpoint Examples/JSON Payload/extracted-images.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var extract_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/extracted-images", + url: apiUrl + "/extracted-images", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/extracted-text.js b/JavaScript/Endpoint Examples/JSON Payload/extracted-text.js index e2471906..ba80ba05 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/extracted-text.js +++ b/JavaScript/Endpoint Examples/JSON Payload/extracted-text.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var extract_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/extracted-text", + url: apiUrl + "/extracted-text", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/flattened-annotations-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/flattened-annotations-pdf.js index a26127e3..4c11d357 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/flattened-annotations-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/flattened-annotations-pdf.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var flatten_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/flattened-annotations-pdf", + url: apiUrl + "/flattened-annotations-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/flattened-forms-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/flattened-forms-pdf.js index cbad5f4b..6e4ec7c9 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/flattened-forms-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/flattened-forms-pdf.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var flatten_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/flattened-forms-pdf", + url: apiUrl + "/flattened-forms-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/flattened-layers-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/flattened-layers-pdf.js index 0646acd2..9a7121f6 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/flattened-layers-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/flattened-layers-pdf.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var flatten_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/flattened-layers-pdf", + url: apiUrl + "/flattened-layers-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.js index e69969f8..678c4acb 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var flatten_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/flattened-transparencies-pdf", + url: apiUrl + "/flattened-transparencies-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/get-resource.js b/JavaScript/Endpoint Examples/JSON Payload/get-resource.js index 1683e486..45795694 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/get-resource.js +++ b/JavaScript/Endpoint Examples/JSON Payload/get-resource.js @@ -1,10 +1,18 @@ // This request demonstrates how to retrieve a resource using an ID. const axios = require('axios'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = apiUrl + ""; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + let config = { method: 'get', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?format=url', + url: apiUrl + "/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?format=url", headers: { } }; diff --git a/JavaScript/Endpoint Examples/JSON Payload/gif.js b/JavaScript/Endpoint Examples/JSON Payload/gif.js index 32649ffb..84a976e7 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/gif.js +++ b/JavaScript/Endpoint Examples/JSON Payload/gif.js @@ -2,12 +2,22 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); + +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +35,7 @@ axios(upload_config) var gif_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/gif", + url: apiUrl + "/gif", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/jpg.js b/JavaScript/Endpoint Examples/JSON Payload/jpg.js index 5be23385..f0ffe87a 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/jpg.js +++ b/JavaScript/Endpoint Examples/JSON Payload/jpg.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var jpg_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/jpg", + url: apiUrl + "/jpg", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/linearized-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/linearized-pdf.js index 1b2cfc07..135de7b6 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/linearized-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/linearized-pdf.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var linearize_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/linearized-pdf", + url: apiUrl + "/linearized-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/markdown.js b/JavaScript/Endpoint Examples/JSON Payload/markdown.js index 91b24b69..d0c98cea 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/markdown.js +++ b/JavaScript/Endpoint Examples/JSON Payload/markdown.js @@ -1,12 +1,20 @@ var axios = require("axios"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file.pdf"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -26,7 +34,7 @@ axios(upload_config) var markdown_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/markdown", + url: apiUrl + "/markdown", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", @@ -51,4 +59,4 @@ axios(upload_config) .catch(function (error) { console.error("Upload request error:"); console.error(error.response?.data || error.message); - }); \ No newline at end of file + }); diff --git a/JavaScript/Endpoint Examples/JSON Payload/merged-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/merged-pdf.js index 9fa5a7ad..0f91e1ca 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/merged-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/merged-pdf.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var first_upload_data = fs.createReadStream("/path/to/first_file"); var first_upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "first_filename.pdf", @@ -26,7 +34,7 @@ axios(first_upload_config) var second_upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "second_filename.pdf", @@ -43,7 +51,7 @@ axios(first_upload_config) var merge_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/merged-pdf", + url: apiUrl + "/merged-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-info.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-info.js index c90b029c..ccff6328 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-info.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-info.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var info_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-info", + url: apiUrl + "/pdf-info", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-acroforms.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-acroforms.js index 80dd7111..f74311f6 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-acroforms.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-acroforms.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var acroform_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-acroforms", + url: apiUrl + "/pdf-with-acroforms", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-attachment.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-attachment.js index 37fd8dd7..19c7a3ef 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-attachment.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-attachment.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var pdf_upload_data = fs.createReadStream("/path/to/pdf_file"); var pdf_upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "pdf_filename.pdf", @@ -28,7 +36,7 @@ axios(pdf_upload_config) var attachment_upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "attachment_filename.xml", @@ -46,7 +54,7 @@ axios(pdf_upload_config) var attach_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-added-attachment", + url: apiUrl + "/pdf-with-added-attachment", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-image.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-image.js index f5e30206..45472130 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-image.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-image.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var pdf_upload_data = fs.createReadStream("/path/to/pdf_file"); var pdf_upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "pdf_filename.pdf", @@ -26,7 +34,7 @@ axios(pdf_upload_config) var image_upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "image_filename.png", @@ -43,7 +51,7 @@ axios(pdf_upload_config) var add_image_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-added-image", + url: apiUrl + "/pdf-with-added-image", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-text.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-text.js index c5f8c7de..aa02ec61 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-text.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-text.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -39,7 +47,7 @@ axios(upload_config) var add_text_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-added-text", + url: apiUrl + "/pdf-with-added-text", headers: { "Api-Key": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-converted-colors.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-converted-colors.js index 82c80b81..190e3607 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-converted-colors.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-converted-colors.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var convert_colors_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-converted-colors", + url: apiUrl + "/pdf-with-converted-colors", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.js index c126c3d1..398d2874 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var pdf_upload_data = fs.createReadStream("/path/to/pdf_file"); var pdf_upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "pdf_filename.pdf", @@ -26,7 +34,7 @@ axios(pdf_upload_config) var data_upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "data_filename.xml", @@ -43,7 +51,7 @@ axios(pdf_upload_config) var import_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-imported-form-data", + url: apiUrl + "/pdf-with-imported-form-data", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-ocr-text.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-ocr-text.js index 1572f2d1..b51c9a60 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-ocr-text.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-ocr-text.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var pdf_with_ocr_text_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-ocr-text", + url: apiUrl + "/pdf-with-ocr-text", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.js index 71f29f39..b9a3c92f 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -42,7 +50,7 @@ axios(upload_config) var boxes_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-page-boxes-set", + url: apiUrl + "/pdf-with-page-boxes-set", headers: { "Api-Key": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.js index deabb033..5e6b70a8 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.js @@ -2,6 +2,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; @@ -10,7 +18,7 @@ var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -28,7 +36,7 @@ axios(upload_config) var pdf_with_redacted_text_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-redacted-text-applied", + url: apiUrl + "/pdf-with-redacted-text-applied", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", @@ -42,9 +50,9 @@ axios(upload_config) console.log(JSON.stringify(pdf_with_redacted_text_response.data)); var applied_output_id = pdf_with_redacted_text_response.data.outputId; - // All files uploaded or generated are automatically deleted based on the - // File Retention Period as shown on https://pdfrest.com/pricing. - // For immediate deletion of files, particularly when sensitive data + // All files uploaded or generated are automatically deleted based on the + // File Retention Period as shown on https://pdfrest.com/pricing. + // For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -52,7 +60,7 @@ axios(upload_config) var delete_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/delete", + url: apiUrl + "/delete", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.js index 745bc298..0b387914 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.js @@ -2,6 +2,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; @@ -10,7 +18,7 @@ var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -45,7 +53,7 @@ axios(upload_config) var redact_text_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf-with-redacted-text-preview", + url: apiUrl + "/pdf-with-redacted-text-preview", headers: { "Api-Key": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", @@ -61,9 +69,9 @@ axios(upload_config) .then(function (redact_text_response) { console.log(JSON.stringify(redact_text_response.data)); - // All files uploaded or generated are automatically deleted based on the - // File Retention Period as shown on https://pdfrest.com/pricing. - // For immediate deletion of files, particularly when sensitive data + // All files uploaded or generated are automatically deleted based on the + // File Retention Period as shown on https://pdfrest.com/pricing. + // For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -74,7 +82,7 @@ axios(upload_config) var delete_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/delete", + url: apiUrl + "/delete", headers: { "Api-Key": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf.js b/JavaScript/Endpoint Examples/JSON Payload/pdf.js index 69d176f5..cf1e33c0 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.png", @@ -25,7 +33,7 @@ axios(upload_config) var pdf_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdf", + url: apiUrl + "/pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdfa.js b/JavaScript/Endpoint Examples/JSON Payload/pdfa.js index 5d5323ca..13212b30 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdfa.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdfa.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var pdfa_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdfa", + url: apiUrl + "/pdfa", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdfx.js b/JavaScript/Endpoint Examples/JSON Payload/pdfx.js index 4b5d0b4c..c4a72c1c 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdfx.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdfx.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var pdfx_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/pdfx", + url: apiUrl + "/pdfx", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/png.js b/JavaScript/Endpoint Examples/JSON Payload/png.js index 8872625a..d1dd6724 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/png.js +++ b/JavaScript/Endpoint Examples/JSON Payload/png.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var png_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/png", + url: apiUrl + "/png", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/powerpoint.js b/JavaScript/Endpoint Examples/JSON Payload/powerpoint.js index b5758033..ac385b2b 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/powerpoint.js +++ b/JavaScript/Endpoint Examples/JSON Payload/powerpoint.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var powerpoint_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/powerpoint", + url: apiUrl + "/powerpoint", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/rasterized-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/rasterized-pdf.js index 7a28800f..4d8ec5b3 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/rasterized-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/rasterized-pdf.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var rasterize_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/rasterized-pdf", + url: apiUrl + "/rasterized-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/restricted-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/restricted-pdf.js index 4c593139..683bd82c 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/restricted-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/restricted-pdf.js @@ -2,6 +2,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; @@ -10,7 +18,7 @@ var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -28,7 +36,7 @@ axios(upload_config) var restrict_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/restricted-pdf", + url: apiUrl + "/restricted-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", @@ -46,9 +54,9 @@ axios(upload_config) console.log(JSON.stringify(restrict_response.data)); var restricted_output_id = restrict_response.data.outputId; - // All files uploaded or generated are automatically deleted based on the - // File Retention Period as shown on https://pdfrest.com/pricing. - // For immediate deletion of files, particularly when sensitive data + // All files uploaded or generated are automatically deleted based on the + // File Retention Period as shown on https://pdfrest.com/pricing. + // For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -56,7 +64,7 @@ axios(upload_config) var delete_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/delete", + url: apiUrl + "/delete", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.js b/JavaScript/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.js index c8582d02..f1f6c3e6 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.js +++ b/JavaScript/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.js @@ -1,12 +1,20 @@ import axios from "axios"; import fs from "fs"; +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + async function uploadFile(filePath, fileName) { var upload_data = fs.createReadStream(filePath); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": fileName, @@ -40,7 +48,7 @@ function signPdf(input_id, certificate_id, private_key_id) { var signed_pdf_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/signed-pdf", + url: apiUrl + "/signed-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", @@ -66,4 +74,4 @@ function signPdf(input_id, certificate_id, private_key_id) { const input_id = await uploadFile("/path/to/input.pdf", "input.pdf"); const certificate_id = await uploadFile("/path/to/certificate.pem", "certificate.pem"); const private_key_id = await uploadFile("/path/to/private_key.pem", "private_key.pem"); -signPdf(input_id, certificate_id, private_key_id); \ No newline at end of file +signPdf(input_id, certificate_id, private_key_id); diff --git a/JavaScript/Endpoint Examples/JSON Payload/signed-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/signed-pdf.js index be402727..8966da68 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/signed-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/signed-pdf.js @@ -1,12 +1,20 @@ import axios from "axios"; import fs from "fs"; +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + async function uploadFile(filePath, fileName) { var upload_data = fs.createReadStream(filePath); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": fileName, @@ -46,7 +54,7 @@ function signPdf(input_id, credential_id, passphrase_id, logo_id) { var signed_pdf_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/signed-pdf", + url: apiUrl + "/signed-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", @@ -74,4 +82,4 @@ const input_id = await uploadFile("/path/to/input.pdf", "input.pdf"); const credential_id = await uploadFile("/path/to/credentials.pfx", "credentials.pfx"); const passphrase_id = await uploadFile("/path/to/passphrase.txt", "passphrase.txt"); const logo_id = await uploadFile("/path/to/logo.png", "logo.png"); -signPdf(input_id, credential_id, passphrase_id, logo_id); \ No newline at end of file +signPdf(input_id, credential_id, passphrase_id, logo_id); diff --git a/JavaScript/Endpoint Examples/JSON Payload/split-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/split-pdf.js index 8b669564..b1196dde 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/split-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/split-pdf.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var split_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/split-pdf", + url: apiUrl + "/split-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/tif.js b/JavaScript/Endpoint Examples/JSON Payload/tif.js index 48dc5f70..184bc8a5 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/tif.js +++ b/JavaScript/Endpoint Examples/JSON Payload/tif.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var tif_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/tif", + url: apiUrl + "/tif", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/unrestricted-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/unrestricted-pdf.js index 589a78a7..17d73d64 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/unrestricted-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/unrestricted-pdf.js @@ -2,6 +2,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; @@ -10,7 +18,7 @@ var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -28,7 +36,7 @@ axios(upload_config) var unrestrict_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/unrestricted-pdf", + url: apiUrl + "/unrestricted-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", @@ -44,9 +52,9 @@ axios(upload_config) .then(function (unrestrict_response) { console.log(JSON.stringify(unrestrict_response.data)); - // All files uploaded or generated are automatically deleted based on the - // File Retention Period as shown on https://pdfrest.com/pricing. - // For immediate deletion of files, particularly when sensitive data + // All files uploaded or generated are automatically deleted based on the + // File Retention Period as shown on https://pdfrest.com/pricing. + // For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -57,7 +65,7 @@ axios(upload_config) var delete_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/delete", + url: apiUrl + "/delete", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Content-Type": "application/json", @@ -74,7 +82,7 @@ axios(upload_config) console.log(error); }); } - + }) .catch(function (error) { console.log(error); diff --git a/JavaScript/Endpoint Examples/JSON Payload/unzip.js b/JavaScript/Endpoint Examples/JSON Payload/unzip.js index 7c3137eb..f6be05eb 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/unzip.js +++ b/JavaScript/Endpoint Examples/JSON Payload/unzip.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.zip", @@ -25,7 +33,7 @@ axios(upload_config) var unzip_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/unzip", + url: apiUrl + "/unzip", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/up-toolkit.js b/JavaScript/Endpoint Examples/JSON Payload/up-toolkit.js index bb20131e..1e864e68 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/up-toolkit.js +++ b/JavaScript/Endpoint Examples/JSON Payload/up-toolkit.js @@ -1,10 +1,18 @@ // This request demonstrates how to check the status of the API servers const axios = require("axios"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + let config = { method: "get", maxBodyLength: Infinity, // set maximum length of the request body - url: "https://api.pdfrest.com/up-toolkit", // up-forms and up-office can be used to query the other tools + url: apiUrl + "/up-toolkit", // up-forms and up-office can be used to query the other tools headers: {}, }; diff --git a/JavaScript/Endpoint Examples/JSON Payload/upload.js b/JavaScript/Endpoint Examples/JSON Payload/upload.js index 9cc0670c..1cd39447 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/upload.js +++ b/JavaScript/Endpoint Examples/JSON Payload/upload.js @@ -2,13 +2,21 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); // define configuration options for axios request var config = { method: "post", maxBodyLength: Infinity, // set maximum length of the request body - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", diff --git a/JavaScript/Endpoint Examples/JSON Payload/watermarked-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/watermarked-pdf.js index c6c01336..a39355a3 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/watermarked-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/watermarked-pdf.js @@ -2,6 +2,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; @@ -10,7 +18,7 @@ var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -28,7 +36,7 @@ axios(upload_config) var watermark_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/watermarked-pdf", + url: apiUrl + "/watermarked-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", @@ -45,9 +53,9 @@ axios(upload_config) console.log(JSON.stringify(watermark_response.data)); var watermarked_output_id = watermark_response.data.outputId; - // All files uploaded or generated are automatically deleted based on the - // File Retention Period as shown on https://pdfrest.com/pricing. - // For immediate deletion of files, particularly when sensitive data + // All files uploaded or generated are automatically deleted based on the + // File Retention Period as shown on https://pdfrest.com/pricing. + // For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -55,7 +63,7 @@ axios(upload_config) var delete_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/delete", + url: apiUrl + "/delete", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/word.js b/JavaScript/Endpoint Examples/JSON Payload/word.js index 9682a19a..87797cbf 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/word.js +++ b/JavaScript/Endpoint Examples/JSON Payload/word.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var upload_data = fs.createReadStream("/path/to/file"); var upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "filename.pdf", @@ -25,7 +33,7 @@ axios(upload_config) var word_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/word", + url: apiUrl + "/word", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/JSON Payload/zip.js b/JavaScript/Endpoint Examples/JSON Payload/zip.js index 3180ea9c..75967f01 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/zip.js +++ b/JavaScript/Endpoint Examples/JSON Payload/zip.js @@ -2,12 +2,20 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + var first_upload_data = fs.createReadStream("/path/to/first_file"); var first_upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "first_filename.pdf", @@ -26,7 +34,7 @@ axios(first_upload_config) var second_upload_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/upload", + url: apiUrl + "/upload", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Filename": "second_filename.pdf", @@ -43,7 +51,7 @@ axios(first_upload_config) var zip_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/zip", + url: apiUrl + "/zip", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key "Content-Type": "application/json", diff --git a/JavaScript/Endpoint Examples/Multipart Payload/bmp.js b/JavaScript/Endpoint Examples/Multipart Payload/bmp.js index 453fa368..9716b17b 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/bmp.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/bmp.js @@ -3,20 +3,29 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + + // Create a new form data instance and append the file and parameters to it var data = new FormData(); -data.append('file', fs.createReadStream('/path/to/file')); -data.append('pages', '1-last'); -data.append('resolution', '300'); -data.append('color_model', 'rgb'); -data.append('output', 'pdfrest_bmp'); +data.append('file', fs.createReadStream('/path/to/file')); +data.append('pages', '1-last'); +data.append('resolution', '300'); +data.append('color_model', 'rgb'); +data.append('output', 'pdfrest_bmp'); // define configuration options for axios request var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/bmp', - headers: { + url: apiUrl + '/bmp', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -29,8 +38,8 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/compressed-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/compressed-pdf.js index 9737274e..d99f4856 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/compressed-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/compressed-pdf.js @@ -3,6 +3,17 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); + +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + + + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -13,8 +24,8 @@ data.append('output', 'pdfrest_compressed_pdf'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/compressed-pdf', - headers: { + url: apiUrl + '/compressed-pdf', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -27,7 +38,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/decrypted-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/decrypted-pdf.js index cd243700..4ff7c64a 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/decrypted-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/decrypted-pdf.js @@ -3,6 +3,17 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); + +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + + + // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; @@ -10,14 +21,14 @@ const DELETE_SENSITIVE_FILES = false; var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); data.append('current_open_password', 'current_example_pw'); -data.append('output', 'pdfrest_decrypted_pdf'); +data.append('output', 'pdfrest_decrypted_pdf'); // Define configuration options for axios request var config = { method: 'post', maxBodyLength: Infinity, // Set maximum length of the request body - url: 'https://api.pdfrest.com/decrypted-pdf', - headers: { + url: apiUrl + '/decrypted-pdf', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // Set headers with form data headers }, @@ -29,9 +40,9 @@ axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); - // All files uploaded or generated are automatically deleted based on the - // File Retention Period as shown on https://pdfrest.com/pricing. - // For immediate deletion of files, particularly when sensitive data + // All files uploaded or generated are automatically deleted based on the + // File Retention Period as shown on https://pdfrest.com/pricing. + // For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -42,7 +53,7 @@ axios(config) var delete_config = { method: 'post', maxBodyLength: Infinity, - url: 'https://api.pdfrest.com/delete', + url: apiUrl + '/delete', headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'Content-Type': 'application/json' @@ -55,7 +66,7 @@ axios(config) .then(function (delete_response) { console.log(JSON.stringify(delete_response.data)); }) .catch(function (error) { console.log(error); }); } - + }) .catch(function (error) { console.log(error); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/delete-resource.js b/JavaScript/Endpoint Examples/Multipart Payload/delete-resource.js index 7282e9ec..0102c096 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/delete-resource.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/delete-resource.js @@ -1,9 +1,18 @@ const axios = require("axios"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + + let config = { method: "delete", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + url: apiUrl + "/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", headers: { "api-key": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", }, diff --git a/JavaScript/Endpoint Examples/Multipart Payload/encrypted-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/encrypted-pdf.js index 192b4fa4..52a935f0 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/encrypted-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/encrypted-pdf.js @@ -3,6 +3,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; @@ -16,8 +24,8 @@ data.append('output', 'pdfrest_encrypted_pdf'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/encrypted-pdf', - headers: { + url: apiUrl + '/encrypted-pdf', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -30,9 +38,9 @@ axios(config) console.log(JSON.stringify(response.data)); var output_id = response.data.outputId; - // All files uploaded or generated are automatically deleted based on the - // File Retention Period as shown on https://pdfrest.com/pricing. - // For immediate deletion of files, particularly when sensitive data + // All files uploaded or generated are automatically deleted based on the + // File Retention Period as shown on https://pdfrest.com/pricing. + // For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -42,7 +50,7 @@ axios(config) var delete_config = { method: 'post', maxBodyLength: Infinity, - url: 'https://api.pdfrest.com/delete', + url: apiUrl + '/delete', headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'Content-Type': 'application/json' diff --git a/JavaScript/Endpoint Examples/Multipart Payload/excel.js b/JavaScript/Endpoint Examples/Multipart Payload/excel.js index 39aadcb3..e1bcf411 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/excel.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/excel.js @@ -3,6 +3,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -12,8 +20,8 @@ data.append('output', 'pdfrest_excel_pdf'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/excel', - headers: { + url: apiUrl + '/excel', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -26,7 +34,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/exported-form-data.js b/JavaScript/Endpoint Examples/Multipart Payload/exported-form-data.js index da79e744..4aa002e3 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/exported-form-data.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/exported-form-data.js @@ -3,6 +3,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -13,8 +21,8 @@ data.append('output', 'pdfrest_exported_form_data'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/exported-form-data', - headers: { + url: apiUrl + '/exported-form-data', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -30,4 +38,4 @@ axios(config) console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/extracted-images.js b/JavaScript/Endpoint Examples/Multipart Payload/extracted-images.js index c0f5b1fd..9da95ebb 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/extracted-images.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/extracted-images.js @@ -3,6 +3,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -13,8 +21,8 @@ data.append('output', 'pdfrest_extracted_images'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/extracted-images', - headers: { + url: apiUrl + '/extracted-images', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -27,7 +35,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/extracted-text.js b/JavaScript/Endpoint Examples/Multipart Payload/extracted-text.js index 7a71269d..b1c44e54 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/extracted-text.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/extracted-text.js @@ -3,6 +3,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append("file", fs.createReadStream("/path/to/file")); @@ -12,7 +20,7 @@ data.append("word_style", "on"); var config = { method: "post", maxBodyLength: Infinity, // set maximum length of the request body - url: "https://api.pdfrest.com/extracted-text", + url: apiUrl + "/extracted-text", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key ...data.getHeaders(), // set headers for the request diff --git a/JavaScript/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.js index f7da0eff..5bbb93f6 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.js @@ -5,6 +5,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append("file", fs.createReadStream("/path/to/file")); @@ -14,7 +22,7 @@ data.append("output", "pdfrest_flattened_annotations_pdf"); var config = { method: "post", maxBodyLength: Infinity, // set maximum length of the request body - url: "https://api.pdfrest.com/flattened-annotations-pdf", + url: apiUrl + "/flattened-annotations-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key ...data.getHeaders(), // set headers for the request diff --git a/JavaScript/Endpoint Examples/Multipart Payload/flattened-forms-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/flattened-forms-pdf.js index 71af6b96..2b7ec7e6 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/flattened-forms-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/flattened-forms-pdf.js @@ -5,6 +5,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append("file", fs.createReadStream("/path/to/file")); @@ -14,7 +22,7 @@ data.append("output", "pdfrest_flattened_forms_pdf"); var config = { method: "post", maxBodyLength: Infinity, // set maximum length of the request body - url: "https://api.pdfrest.com/flattened-forms-pdf", + url: apiUrl + "/flattened-forms-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key ...data.getHeaders(), // set headers for the request diff --git a/JavaScript/Endpoint Examples/Multipart Payload/flattened-layers-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/flattened-layers-pdf.js index ca72fe4e..687544ba 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/flattened-layers-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/flattened-layers-pdf.js @@ -5,6 +5,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append("file", fs.createReadStream("/path/to/file")); @@ -14,7 +22,7 @@ data.append("output", "pdfrest_flattened_layers_pdf"); var config = { method: "post", maxBodyLength: Infinity, // set maximum length of the request body - url: "https://api.pdfrest.com/flattened-layers-pdf", + url: apiUrl + "/flattened-layers-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key ...data.getHeaders(), // set headers for the request diff --git a/JavaScript/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.js index ad26a246..a808bced 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.js @@ -3,6 +3,15 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -13,8 +22,8 @@ data.append('output', 'pdfrest_flattened_transparencies_pdf'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/flattened-transparencies-pdf', - headers: { + url: apiUrl + '/flattened-transparencies-pdf', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -27,7 +36,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); // If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/get-resource.js b/JavaScript/Endpoint Examples/Multipart Payload/get-resource.js index 1683e486..d90b1f0c 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/get-resource.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/get-resource.js @@ -1,10 +1,18 @@ // This request demonstrates how to retrieve a resource using an ID. const axios = require('axios'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + let config = { method: 'get', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?format=url', + url: apiUrl + '/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?format=url', headers: { } }; diff --git a/JavaScript/Endpoint Examples/Multipart Payload/gif.js b/JavaScript/Endpoint Examples/Multipart Payload/gif.js index 49eb26f9..a815ed42 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/gif.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/gif.js @@ -3,9 +3,17 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the file and parameters to it var data = new FormData(); -data.append('file', fs.createReadStream('/path/to/file')); +data.append('file', fs.createReadStream('/path/to/file')); data.append('pages', '1-last'); data.append('resolution', '300'); data.append('color_model', 'rgb'); @@ -15,8 +23,8 @@ data.append('output', 'pdfrest_gif'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/gif', - headers: { + url: apiUrl + '/gif', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -29,7 +37,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/jpg.js b/JavaScript/Endpoint Examples/Multipart Payload/jpg.js index 0692333c..ae3e48c1 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/jpg.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/jpg.js @@ -3,9 +3,17 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the file and parameters to it var data = new FormData(); -data.append('file', fs.createReadStream('/path/to/file')); +data.append('file', fs.createReadStream('/path/to/file')); data.append('pages', '1-last'); data.append('resolution', '300'); data.append('color_model', 'rgb'); @@ -16,8 +24,8 @@ data.append('output', 'pdfrest_jpg'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/jpg', - headers: { + url: apiUrl + '/jpg', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -30,7 +38,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/linearized-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/linearized-pdf.js index ddd4e37b..519c608e 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/linearized-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/linearized-pdf.js @@ -3,6 +3,14 @@ var FormData = require('form-data'); var fs = require('fs'); // This request demonstrates how to liearize a PDF for fast web viewing. +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -12,8 +20,8 @@ data.append('output', 'pdfrest_linearized_pdf'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/linearized-pdf', - headers: { + url: apiUrl + '/linearized-pdf', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -26,7 +34,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/markdown.js b/JavaScript/Endpoint Examples/Multipart Payload/markdown.js index eb0110b8..89c72f32 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/markdown.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/markdown.js @@ -3,6 +3,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append("file", fs.createReadStream("/path/to/file")); @@ -12,7 +20,7 @@ data.append("page_break_comments", "on"); var config = { method: "post", maxBodyLength: Infinity, // set maximum length of the request body - url: "https://api.pdfrest.com/markdown", + url: apiUrl + "/markdown", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key ...data.getHeaders(), // set headers for the request @@ -27,4 +35,4 @@ axios(config) }) .catch(function (error) { console.log(error); - }); \ No newline at end of file + }); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/merged-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/merged-pdf.js index f5e6473b..6aa81134 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/merged-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/merged-pdf.js @@ -3,6 +3,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -17,8 +25,8 @@ data.append('output', 'pdfrest_merged_pdf'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/merged-pdf', - headers: { + url: apiUrl + '/merged-pdf', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -31,7 +39,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); // If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-info.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-info.js index 8ba0477a..50d97f24 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-info.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-info.js @@ -3,6 +3,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -12,8 +20,8 @@ data.append('queries', 'tagged,image_only,title,subject,author,producer,creator, var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/pdf-info', - headers: { + url: apiUrl + '/pdf-info', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -26,7 +34,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); // If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-acroforms.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-acroforms.js index d36c3b2a..dd27b315 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-acroforms.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-acroforms.js @@ -3,6 +3,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append("file", fs.createReadStream("/path/to/file")); @@ -12,7 +20,7 @@ data.append("output", "pdfrest_acroform_pdf"); var config = { method: "post", maxBodyLength: Infinity, // set maximum length of the request body - url: "https://api.pdfrest.com/pdf-with-acroforms", + url: apiUrl + "/pdf-with-acroforms", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key ...data.getHeaders(), // set headers for the request diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.js index 6b1e358b..b971518f 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.js @@ -5,6 +5,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -15,8 +23,8 @@ data.append('output', 'pdfrest_pdf_with_added_attachment'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/pdf-with-added-attachment', - headers: { + url: apiUrl + '/pdf-with-added-attachment', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -29,7 +37,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); // If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-image.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-image.js index e0a8c3f2..17ee4746 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-image.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-image.js @@ -5,6 +5,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -18,8 +26,8 @@ data.append('output', 'pdfrest_pdf_with_added_image'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/pdf-with-added-image', - headers: { + url: apiUrl + '/pdf-with-added-image', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -32,7 +40,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); // If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-text.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-text.js index 9165a14f..08bfda73 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-text.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-text.js @@ -6,6 +6,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -30,8 +38,8 @@ data.append('output', 'pdfrest_pdf_with_added_text'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/pdf-with-added-text', - headers: { + url: apiUrl + '/pdf-with-added-text', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -44,7 +52,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.js index 8847195f..9304f33b 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.js @@ -3,6 +3,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -13,8 +21,8 @@ data.append('output', 'pdfrest_pdf_with_converted_colors'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/pdf-with-converted-colors', - headers: { + url: apiUrl + '/pdf-with-converted-colors', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -27,7 +35,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.js index 0cf78fa8..1ddf73d2 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.js @@ -5,6 +5,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append("file", fs.createReadStream("/path/to/file")); @@ -15,7 +23,7 @@ data.append("output", "pdfrest_pdf_with_imported_form_data"); var config = { method: "post", maxBodyLength: Infinity, // set maximum length of the request body - url: "https://api.pdfrest.com/pdf-with-imported-form-data", + url: apiUrl + "/pdf-with-imported-form-data", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key ...data.getHeaders(), // set headers for the request diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.js index 771c9cb3..80614a32 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.js @@ -3,6 +3,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -12,8 +20,8 @@ data.append('output', 'pdfrest_pdf-with-ocr-text'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/pdf-with-ocr-text', - headers: { + url: apiUrl + '/pdf-with-ocr-text', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -26,7 +34,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.js index b906ad9a..a2ac978c 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.js @@ -5,6 +5,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append("file", fs.createReadStream("/path/to/file")); @@ -31,7 +39,7 @@ data.append("output", "example_out"); var config = { method: "post", maxBodyLength: Infinity, // set maximum length of the request body - url: "https://api.pdfrest.com/pdf-with-page-boxes-set", + url: apiUrl + "/pdf-with-page-boxes-set", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key ...data.getHeaders(), // set headers for the request diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.js index a02d698a..53047f71 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.js @@ -3,6 +3,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; @@ -15,8 +23,8 @@ data.append('output', 'pdfrest_pdf-with-redacted-text-applied'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/pdf-with-redacted-text-applied', - headers: { + url: apiUrl + '/pdf-with-redacted-text-applied', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -29,9 +37,9 @@ axios(config) console.log(JSON.stringify(response.data)); var output_id = response.data.outputId; - // All files uploaded or generated are automatically deleted based on the - // File Retention Period as shown on https://pdfrest.com/pricing. - // For immediate deletion of files, particularly when sensitive data + // All files uploaded or generated are automatically deleted based on the + // File Retention Period as shown on https://pdfrest.com/pricing. + // For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -41,7 +49,7 @@ axios(config) var delete_config = { method: 'post', maxBodyLength: Infinity, - url: 'https://api.pdfrest.com/delete', + url: apiUrl + '/delete', headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'Content-Type': 'application/json' @@ -56,7 +64,7 @@ axios(config) } }) .catch(function (error) { - console.log(error); + console.log(error); }); // If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.js index 13fcac8a..1aac5d2f 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.js @@ -6,6 +6,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; @@ -35,8 +43,8 @@ data.append('output', 'pdfrest_pdf_with_redacted_text_preview'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/pdf-with-redacted-text-preview', - headers: { + url: apiUrl + '/pdf-with-redacted-text-preview', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -48,9 +56,9 @@ axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); - // All files uploaded or generated are automatically deleted based on the - // File Retention Period as shown on https://pdfrest.com/pricing. - // For immediate deletion of files, particularly when sensitive data + // All files uploaded or generated are automatically deleted based on the + // File Retention Period as shown on https://pdfrest.com/pricing. + // For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -63,7 +71,7 @@ axios(config) var delete_config = { method: 'post', maxBodyLength: Infinity, - url: 'https://api.pdfrest.com/delete', + url: apiUrl + '/delete', headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'Content-Type': 'application/json' @@ -78,7 +86,7 @@ axios(config) } }) .catch(function (error) { - console.log(error); + console.log(error); }); // If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf.js index 0bac6fe1..9b9a8e9a 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf.js @@ -2,20 +2,28 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); -data.append('compression', 'lossy'); -data.append('downsample', '300'); -data.append('tagged_pdf', 'off'); +data.append('compression', 'lossy'); +data.append('downsample', '300'); +data.append('tagged_pdf', 'off'); data.append('output', 'pdfrest_pdf'); // define configuration options for axios request var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/pdf', - headers: { + url: apiUrl + '/pdf', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -28,7 +36,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); // If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdfa.js b/JavaScript/Endpoint Examples/Multipart Payload/pdfa.js index ddddd0cf..d7a89eb4 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdfa.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdfa.js @@ -1,12 +1,20 @@ -// This request demonstrates how to convert any of several formats to PDF/A. +// This request demonstrates how to convert any of several formats to PDF/A. var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data object and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); -data.append('output_type', 'PDF/A-2b'); +data.append('output_type', 'PDF/A-2b'); data.append('rasterize_if_errors_encountered', 'off'); data.append('output', 'pdfrest_pdfa'); @@ -14,8 +22,8 @@ data.append('output', 'pdfrest_pdfa'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/pdfa', - headers: { + url: apiUrl + '/pdfa', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -28,7 +36,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); // If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdfx.js b/JavaScript/Endpoint Examples/Multipart Payload/pdfx.js index a09bc7d8..68e9a956 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdfx.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdfx.js @@ -1,20 +1,28 @@ -// This request demonstrates how to convert any of several formats to PDF/X. +// This request demonstrates how to convert any of several formats to PDF/X. var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data object and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); -data.append('output_type', 'PDF/X-4'); +data.append('output_type', 'PDF/X-4'); data.append('output', 'pdfrest_pdfx'); // define configuration options for axios request var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/pdfx', - headers: { + url: apiUrl + '/pdfx', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -27,7 +35,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); // If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/png.js b/JavaScript/Endpoint Examples/Multipart Payload/png.js index e916b1b0..c913ce0c 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/png.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/png.js @@ -3,9 +3,17 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the file and parameters to it var data = new FormData(); -data.append('file', fs.createReadStream('/path/to/file')); +data.append('file', fs.createReadStream('/path/to/file')); data.append('pages', '1-last'); data.append('resolution', '300'); data.append('color_model', 'rgb'); @@ -15,8 +23,8 @@ data.append('output', 'pdfrest_png'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/png', - headers: { + url: apiUrl + '/png', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -29,8 +37,8 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/powerpoint.js b/JavaScript/Endpoint Examples/Multipart Payload/powerpoint.js index 96f65715..893d03b3 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/powerpoint.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/powerpoint.js @@ -3,6 +3,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -12,8 +20,8 @@ data.append('output', 'pdfrest_powerpoint_pdf'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/powerpoint', - headers: { + url: apiUrl + '/powerpoint', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -26,7 +34,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/rasterized-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/rasterized-pdf.js index 454cfa9c..3c12e60b 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/rasterized-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/rasterized-pdf.js @@ -3,6 +3,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the file and parameters to it var data = new FormData(); data.append("file", fs.createReadStream("/path/to/file")); @@ -12,7 +20,7 @@ data.append("output", "pdfrest_rasterized"); var config = { method: "post", maxBodyLength: Infinity, // set maximum length of the request body - url: "https://api.pdfrest.com/rasterized-pdf", + url: apiUrl + "/rasterized-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key ...data.getHeaders(), // set headers for the request diff --git a/JavaScript/Endpoint Examples/Multipart Payload/request-status.js b/JavaScript/Endpoint Examples/Multipart Payload/request-status.js index 5bf214d1..7bcfd95b 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/request-status.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/request-status.js @@ -2,6 +2,14 @@ const axios = require("axios"); const FormData = require("form-data"); const fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + const apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key const pathToFile = "/path/to/file.pdf"; @@ -18,7 +26,7 @@ const pollUntilFulfilled = async (requestId) => { const pollConfig = { method: "get", maxBodyLength: Infinity, // set maximum length of the request body - url: `https://api.pdfrest.com/request-status/${requestId}`, + url: `${apiUrl}/request-status/${requestId}`, headers: { "Api-Key": apiKey } }; requestStatusResponse = await axios(pollConfig); @@ -39,11 +47,11 @@ const demoApiPolling = async () => { // Send a request with the Response-Type header (using /bmp as an arbitrary example) const bmpRequestData = new FormData(); bmpRequestData.append("file", fs.createReadStream(pathToFile)); - + const bmpConfig = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/bmp", + url: apiUrl + "/bmp", headers: { "Api-Key": apiKey, "Response-Type": "requestId", // Use this header to get a request ID. @@ -53,7 +61,7 @@ const demoApiPolling = async () => { }; bmpResponse = await sendBmpReq(bmpConfig); console.log(JSON.stringify(bmpResponse.data)); - + // Get the request ID from the initial response. const requestId = bmpResponse.data.requestId; await pollUntilFulfilled(requestId); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/restricted-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/restricted-pdf.js index bb98acb1..279226e6 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/restricted-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/restricted-pdf.js @@ -3,6 +3,15 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + + // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; @@ -10,7 +19,7 @@ const DELETE_SENSITIVE_FILES = false; var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); data.append('new_permissions_password', 'new_example_pw'); -data.append('restrictions[]', 'print_low'); +data.append('restrictions[]', 'print_low'); data.append('restrictions[]', 'accessibility_off'); data.append('restrictions[]', 'edit_content'); data.append('output', 'pdfrest_restricted_pdf'); @@ -19,8 +28,8 @@ data.append('output', 'pdfrest_restricted_pdf'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/restricted-pdf', - headers: { + url: apiUrl + '/restricted-pdf', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // Set headers with form data headers }, @@ -33,9 +42,9 @@ axios(config) console.log(JSON.stringify(response.data)); var output_id = response.data.outputId; - // All files uploaded or generated are automatically deleted based on the - // File Retention Period as shown on https://pdfrest.com/pricing. - // For immediate deletion of files, particularly when sensitive data + // All files uploaded or generated are automatically deleted based on the + // File Retention Period as shown on https://pdfrest.com/pricing. + // For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -45,7 +54,7 @@ axios(config) var delete_config = { method: 'post', maxBodyLength: Infinity, - url: 'https://api.pdfrest.com/delete', + url: apiUrl + '/delete', headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'Content-Type': 'application/json' @@ -60,7 +69,7 @@ axios(config) } }) .catch(function (error) { - console.log(error); + console.log(error); }); // If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample diff --git a/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.js b/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.js index ab16c955..81e0b30d 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.js @@ -5,6 +5,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append("file", fs.createReadStream("/path/to/file")); @@ -28,7 +36,7 @@ data.append("output", "example_out"); var signed_pdf_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/signed-pdf", + url: apiUrl + "/signed-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key ...data.getHeaders(), // set headers for the request diff --git a/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf.js index 2aae08c6..7de72aeb 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf.js @@ -5,6 +5,15 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append("file", fs.createReadStream("/path/to/file")); @@ -35,7 +44,7 @@ data.append("output", "example_out"); var signed_pdf_config = { method: "post", maxBodyLength: Infinity, - url: "https://api.pdfrest.com/signed-pdf", + url: apiUrl + "/signed-pdf", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key ...data.getHeaders(), // set headers for the request diff --git a/JavaScript/Endpoint Examples/Multipart Payload/split-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/split-pdf.js index bb863148..f6755d84 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/split-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/split-pdf.js @@ -6,6 +6,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -18,8 +26,8 @@ data.append('output', 'pdfrest_split_pdf'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/split-pdf', - headers: { + url: apiUrl + '/split-pdf', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -32,7 +40,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); // If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/tif.js b/JavaScript/Endpoint Examples/Multipart Payload/tif.js index 25f3f090..5c9f8eae 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/tif.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/tif.js @@ -3,9 +3,17 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the file and parameters to it var data = new FormData(); -data.append('file', fs.createReadStream('/path/to/file')); +data.append('file', fs.createReadStream('/path/to/file')); data.append('pages', '1-last'); data.append('resolution', '300'); data.append('color_model', 'rgb'); @@ -15,8 +23,8 @@ data.append('output', 'pdfrest_tif'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/tif', - headers: { + url: apiUrl + '/tif', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -29,8 +37,8 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/unrestricted-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/unrestricted-pdf.js index 555225b1..e928207f 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/unrestricted-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/unrestricted-pdf.js @@ -6,6 +6,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; @@ -19,8 +27,8 @@ data.append('output', 'pdfrest_unrestricted_pdf'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/unrestricted-pdf', - headers: { + url: apiUrl + '/unrestricted-pdf', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -32,9 +40,9 @@ axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); - // All files uploaded or generated are automatically deleted based on the - // File Retention Period as shown on https://pdfrest.com/pricing. - // For immediate deletion of files, particularly when sensitive data + // All files uploaded or generated are automatically deleted based on the + // File Retention Period as shown on https://pdfrest.com/pricing. + // For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -45,7 +53,7 @@ axios(config) var delete_config = { method: 'post', maxBodyLength: Infinity, - url: 'https://api.pdfrest.com/delete', + url: apiUrl + '/delete', headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'Content-Type': 'application/json' @@ -58,10 +66,10 @@ axios(config) .then(function (delete_response) { console.log(JSON.stringify(delete_response.data)); }) .catch(function (error) { console.log(error); }); } - + }) .catch(function (error) { - console.log(error); + console.log(error); }); // If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/unzip.js b/JavaScript/Endpoint Examples/Multipart Payload/unzip.js index 3d8a471c..1696e05c 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/unzip.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/unzip.js @@ -5,6 +5,14 @@ var axios = require("axios"); var FormData = require("form-data"); var fs = require("fs"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append("file", fs.createReadStream("/path/to/file")); @@ -13,7 +21,7 @@ data.append("file", fs.createReadStream("/path/to/file")); var config = { method: "post", maxBodyLength: Infinity, // set maximum length of the request body - url: "https://api.pdfrest.com/unzip", + url: apiUrl + "/unzip", headers: { "Api-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // Replace with your API key ...data.getHeaders(), // set headers for the request diff --git a/JavaScript/Endpoint Examples/Multipart Payload/up-toolkit.js b/JavaScript/Endpoint Examples/Multipart Payload/up-toolkit.js index bb20131e..1e864e68 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/up-toolkit.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/up-toolkit.js @@ -1,10 +1,18 @@ // This request demonstrates how to check the status of the API servers const axios = require("axios"); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + let config = { method: "get", maxBodyLength: Infinity, // set maximum length of the request body - url: "https://api.pdfrest.com/up-toolkit", // up-forms and up-office can be used to query the other tools + url: apiUrl + "/up-toolkit", // up-forms and up-office can be used to query the other tools headers: {}, }; diff --git a/JavaScript/Endpoint Examples/Multipart Payload/upload.js b/JavaScript/Endpoint Examples/Multipart Payload/upload.js index 84004161..3dabccb4 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/upload.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/upload.js @@ -3,6 +3,14 @@ var FormData = require('form-data'); var fs = require('fs'); // This request demonstrates how to upload a document to the service. +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data object and append the PDF file and parameters to it var data = new FormData(); data.append("file", fs.createReadStream("/path/to/file")); @@ -13,8 +21,8 @@ data.append("file", fs.createReadStream("/path/to/file")); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/upload', - headers: { + url: apiUrl + '/upload', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -27,5 +35,5 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/watermarked-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/watermarked-pdf.js index 88ef9bf6..b50017ed 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/watermarked-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/watermarked-pdf.js @@ -6,6 +6,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; @@ -26,8 +34,8 @@ data.append('output', 'pdfrest_watermarked_pdf'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/watermarked-pdf', - headers: { + url: apiUrl + '/watermarked-pdf', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -40,9 +48,9 @@ axios(config) console.log(JSON.stringify(response.data)); var output_id = response.data.outputId; - // All files uploaded or generated are automatically deleted based on the - // File Retention Period as shown on https://pdfrest.com/pricing. - // For immediate deletion of files, particularly when sensitive data + // All files uploaded or generated are automatically deleted based on the + // File Retention Period as shown on https://pdfrest.com/pricing. + // For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -52,7 +60,7 @@ axios(config) var delete_config = { method: 'post', maxBodyLength: Infinity, - url: 'https://api.pdfrest.com/delete', + url: apiUrl + '/delete', headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'Content-Type': 'application/json' @@ -67,7 +75,7 @@ axios(config) } }) .catch(function (error) { - console.log(error); + console.log(error); }); // If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/word.js b/JavaScript/Endpoint Examples/Multipart Payload/word.js index 56031221..15ffcf7d 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/word.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/word.js @@ -3,6 +3,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -12,8 +20,8 @@ data.append('output', 'pdfrest_word_pdf'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/word', - headers: { + url: apiUrl + '/word', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -26,7 +34,7 @@ axios(config) console.log(JSON.stringify(response.data)); }) .catch(function (error) { - console.log(error); + console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. diff --git a/JavaScript/Endpoint Examples/Multipart Payload/zip.js b/JavaScript/Endpoint Examples/Multipart Payload/zip.js index a79e918d..24f8d0fe 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/zip.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/zip.js @@ -6,6 +6,14 @@ var axios = require('axios'); var FormData = require('form-data'); var fs = require('fs'); +// By default, we use the US-based API service. This is the primary endpoint for global use. +var apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//var apiUrl "https://eu-api.pdfrest.com"; + // Create a new form data instance and append the files and parameters to it var data = new FormData(); data.append('file', fs.createReadStream('/path/to/file')); @@ -16,8 +24,8 @@ data.append('output', 'pdfrest_zip'); var config = { method: 'post', maxBodyLength: Infinity, // set maximum length of the request body - url: 'https://api.pdfrest.com/zip', - headers: { + url: apiUrl + '/zip', + headers: { 'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', // Replace with your API key ...data.getHeaders() // set headers for the request }, @@ -33,4 +41,4 @@ axios(config) console.log(error); }); -// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. \ No newline at end of file +// If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.js' sample. From b7f246b745091cc8ba15167c395f5d24e8a81828 Mon Sep 17 00:00:00 2001 From: Taylor Smith Date: Wed, 10 Sep 2025 10:20:13 -0500 Subject: [PATCH 04/11] Add eu/gdpr comment to PHP samples --- .../decrypt-add-reencrypt.php | 13 +++++++++--- .../merge-different-file-types.php | 13 +++++++++--- .../ocr-with-extract-text.php | 14 ++++++++++--- .../pdfa-3b-with-attachment.php | 12 +++++++++-- .../preserve-word-document.php | 12 +++++++++-- .../protected-watermark.php | 12 +++++++++-- .../redact-preview-and-finalize.php | 12 +++++++++-- .../JSON Payload/batch-delete.php | 10 +++++++++- PHP/Endpoint Examples/JSON Payload/bmp.php | 12 +++++++++-- .../JSON Payload/compressed-pdf.php | 12 +++++++++-- .../JSON Payload/decrypted-pdf.php | 20 +++++++++++++------ .../JSON Payload/delete-resource.php | 10 +++++++++- .../JSON Payload/encrypted-pdf.php | 20 +++++++++++++------ PHP/Endpoint Examples/JSON Payload/excel.php | 12 +++++++++-- .../JSON Payload/exported-form-data.php | 12 +++++++++-- .../JSON Payload/extracted-images.php | 12 +++++++++-- .../JSON Payload/extracted-text.php | 12 +++++++++-- .../flattened-annotations-pdf.php | 12 +++++++++-- .../JSON Payload/flattened-forms-pdf.php | 12 +++++++++-- .../JSON Payload/flattened-layers-pdf.php | 12 +++++++++-- .../flattened-transparencies-pdf.php | 12 +++++++++-- .../JSON Payload/get-resource.php | 14 +++++++++++-- PHP/Endpoint Examples/JSON Payload/gif.php | 12 +++++++++-- PHP/Endpoint Examples/JSON Payload/jpg.php | 12 +++++++++-- .../JSON Payload/linearized-pdf.php | 12 +++++++++-- .../JSON Payload/markdown.php | 14 ++++++++++--- .../JSON Payload/merged-pdf.php | 14 ++++++++++--- .../JSON Payload/pdf-info.php | 12 +++++++++-- .../JSON Payload/pdf-with-acroforms.php | 12 +++++++++-- .../pdf-with-added-attachment.php | 14 ++++++++++--- .../JSON Payload/pdf-with-added-image.php | 14 ++++++++++--- .../JSON Payload/pdf-with-added-text.php | 12 +++++++++-- .../pdf-with-converted-colors.php | 12 +++++++++-- .../pdf-with-imported-form-data.php | 14 ++++++++++--- .../JSON Payload/pdf-with-ocr-text.php | 12 +++++++++-- .../JSON Payload/pdf-with-page-boxes-set.php | 12 +++++++++-- .../pdf-with-redacted-text-applied.php | 20 +++++++++++++------ .../pdf-with-redacted-text-preview.php | 20 +++++++++++++------ PHP/Endpoint Examples/JSON Payload/pdf.php | 12 +++++++++-- PHP/Endpoint Examples/JSON Payload/pdfa.php | 12 +++++++++-- PHP/Endpoint Examples/JSON Payload/pdfx.php | 12 +++++++++-- PHP/Endpoint Examples/JSON Payload/png.php | 12 +++++++++-- .../JSON Payload/powerpoint.php | 12 +++++++++-- .../JSON Payload/rasterized-pdf.php | 12 +++++++++-- .../JSON Payload/restricted-pdf.php | 20 +++++++++++++------ .../JSON Payload/signed-pdf-non-pfx.php | 16 +++++++++++---- .../JSON Payload/signed-pdf.php | 18 ++++++++++++----- .../JSON Payload/split-pdf.php | 12 +++++++++-- PHP/Endpoint Examples/JSON Payload/tif.php | 12 +++++++++-- .../JSON Payload/unrestricted-pdf.php | 20 +++++++++++++------ PHP/Endpoint Examples/JSON Payload/unzip.php | 12 +++++++++-- .../JSON Payload/up-toolkit.php | 8 +++++++- PHP/Endpoint Examples/JSON Payload/upload.php | 10 +++++++++- .../JSON Payload/watermarked-pdf.php | 20 +++++++++++++------ PHP/Endpoint Examples/JSON Payload/word.php | 12 +++++++++-- PHP/Endpoint Examples/JSON Payload/zip.php | 14 ++++++++++--- .../Multipart Payload/batch-delete.php | 10 +++++++++- .../Multipart Payload/bmp.php | 10 +++++++++- .../Multipart Payload/compressed-pdf.php | 10 +++++++++- .../Multipart Payload/decrypted-pdf.php | 18 ++++++++++++----- .../Multipart Payload/delete-resource.php | 10 +++++++++- .../Multipart Payload/encrypted-pdf.php | 18 ++++++++++++----- .../Multipart Payload/excel.php | 10 +++++++++- .../Multipart Payload/exported-form-data.php | 10 +++++++++- .../Multipart Payload/extracted-images.php | 10 +++++++++- .../Multipart Payload/extracted-text.php | 10 +++++++++- .../flattened-annotations-pdf.php | 10 +++++++++- .../Multipart Payload/flattened-forms-pdf.php | 10 +++++++++- .../flattened-layers-pdf.php | 10 +++++++++- .../flattened-transparencies-pdf.php | 10 +++++++++- .../Multipart Payload/get-resource.php | 14 +++++++++++-- .../Multipart Payload/gif.php | 10 +++++++++- .../Multipart Payload/jpg.php | 10 +++++++++- .../Multipart Payload/linearized-pdf.php | 10 +++++++++- .../Multipart Payload/markdown.php | 12 +++++++++-- .../Multipart Payload/merged-pdf.php | 10 +++++++++- .../Multipart Payload/pdf-info.php | 10 +++++++++- .../Multipart Payload/pdf-with-acroforms.php | 10 +++++++++- .../pdf-with-added-attachment.php | 10 +++++++++- .../pdf-with-added-image.php | 10 +++++++++- .../Multipart Payload/pdf-with-added-text.php | 10 +++++++++- .../pdf-with-converted-colors.php | 10 +++++++++- .../pdf-with-imported-form-data.php | 10 +++++++++- .../Multipart Payload/pdf-with-ocr-text.php | 10 +++++++++- .../pdf-with-page-boxes-set.php | 10 +++++++++- .../pdf-with-redacted-text-applied.php | 18 ++++++++++++----- .../pdf-with-redacted-text-preview.php | 18 ++++++++++++----- .../Multipart Payload/pdf.php | 10 +++++++++- .../Multipart Payload/pdfa.php | 10 +++++++++- .../Multipart Payload/pdfx.php | 10 +++++++++- .../Multipart Payload/png.php | 10 +++++++++- .../Multipart Payload/powerpoint.php | 10 +++++++++- .../Multipart Payload/rasterized-pdf.php | 10 +++++++++- .../Multipart Payload/request-status.php | 12 +++++++++-- .../Multipart Payload/restricted-pdf.php | 18 ++++++++++++----- .../Multipart Payload/signed-pdf-non-pfx.php | 10 +++++++++- .../Multipart Payload/signed-pdf.php | 10 +++++++++- .../Multipart Payload/split-pdf.php | 10 +++++++++- .../Multipart Payload/tif.php | 10 +++++++++- .../Multipart Payload/unrestricted-pdf.php | 18 ++++++++++++----- .../Multipart Payload/unzip.php | 10 +++++++++- .../Multipart Payload/up-toolkit.php | 11 +++++++++- .../Multipart Payload/upload.php | 10 +++++++++- .../Multipart Payload/watermarked-pdf.php | 18 ++++++++++++----- .../Multipart Payload/word.php | 10 +++++++++- .../Multipart Payload/zip.php | 10 +++++++++- 106 files changed, 1080 insertions(+), 231 deletions(-) diff --git a/PHP/Complex Flow Examples/decrypt-add-reencrypt.php b/PHP/Complex Flow Examples/decrypt-add-reencrypt.php index 6d689c79..9550b4da 100755 --- a/PHP/Complex Flow Examples/decrypt-add-reencrypt.php +++ b/PHP/Complex Flow Examples/decrypt-add-reencrypt.php @@ -15,6 +15,13 @@ * lock it up again. */ +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; $client = new Client(); @@ -39,7 +46,7 @@ ] ]; -$decryptRequest = new Request('POST', 'https://api.pdfrest.com/decrypted-pdf', $headers); +$decryptRequest = new Request('POST', $apiUrl.'/decrypted-pdf', $headers); $decryptResponse = $client->sendAsync($decryptRequest, $decryptOptions)->wait(); @@ -79,7 +86,7 @@ ] ]; -$addImageRequest = new Request('POST', 'https://api.pdfrest.com/pdf-with-added-image', $headers); +$addImageRequest = new Request('POST', $apiUrl.'/pdf-with-added-image', $headers); $addImageResponse = $client->sendAsync($addImageRequest, $addImageOptions)->wait(); @@ -105,7 +112,7 @@ ] ]; -$encryptRequest = new Request('POST', 'https://api.pdfrest.com/encrypted-pdf', $headers); +$encryptRequest = new Request('POST', $apiUrl.'/encrypted-pdf', $headers); $encryptResponse = $client->sendAsync($encryptRequest, $encryptOptions)->wait(); diff --git a/PHP/Complex Flow Examples/merge-different-file-types.php b/PHP/Complex Flow Examples/merge-different-file-types.php index f2306fd8..6fb41c66 100755 --- a/PHP/Complex Flow Examples/merge-different-file-types.php +++ b/PHP/Complex Flow Examples/merge-different-file-types.php @@ -18,6 +18,13 @@ * that the /pdf route takes as inputs. */ +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; $client = new Client(); @@ -38,7 +45,7 @@ ] ]; -$imageToPDFRequest = new Request('POST', 'https://api.pdfrest.com/pdf', $headers); +$imageToPDFRequest = new Request('POST', $apiUrl.'/pdf', $headers); $imageToPDFResponse = $client->sendAsync($imageToPDFRequest, $imageToPDFOptions)->wait(); @@ -59,7 +66,7 @@ ] ]; -$powerpointToPDFRequest = new Request('POST', 'https://api.pdfrest.com/pdf', $headers); +$powerpointToPDFRequest = new Request('POST', $apiUrl.'/pdf', $headers); $powerpointToPDFResponse = $client->sendAsync($powerpointToPDFRequest, $powerpointToPDFOptions)->wait(); @@ -96,7 +103,7 @@ ] ]; -$mergeRequest = new Request('POST', 'https://api.pdfrest.com/merged-pdf', $headers); +$mergeRequest = new Request('POST', $apiUrl.'/merged-pdf', $headers); $mergeResponse = $client->sendAsync($mergeRequest, $mergeOptions)->wait(); diff --git a/PHP/Complex Flow Examples/ocr-with-extract-text.php b/PHP/Complex Flow Examples/ocr-with-extract-text.php index 4eb612b1..be80e7a6 100644 --- a/PHP/Complex Flow Examples/ocr-with-extract-text.php +++ b/PHP/Complex Flow Examples/ocr-with-extract-text.php @@ -15,6 +15,14 @@ * return the newly added text. */ + // By default, we use the US-based API service. This is the primary endpoint for global use. + $apiUrl = "https://api.pdfrest.com"; + + /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ + //$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); $headers = [ @@ -39,7 +47,7 @@ ] ]; -$pdfToOCRRequest = new Request('POST', 'https://api.pdfrest.com/pdf-with-ocr-text', $headers); +$pdfToOCRRequest = new Request('POST', $apiUrl.'/pdf-with-ocr-text', $headers); echo "Sending POST request to OCR endpoint...\n"; $pdfToOCRResponse = $client->sendAsync($pdfToOCRRequest, $pdfToOCROptions)->wait(); @@ -59,7 +67,7 @@ ] ]; -$extractTextRequest = new Request('POST', 'https://api.pdfrest.com/extracted-text', $headers); +$extractTextRequest = new Request('POST', $apiUrl.'/extracted-text', $headers); echo "Sending POST request to extract text endpoint...\n"; $extractTextResponse = $client->sendAsync($extractTextRequest, $extractTextOptions)->wait(); @@ -69,4 +77,4 @@ $fullText = json_decode($extractTextResponse->getBody())->fullText; echo $fullText . "\n"; -?> \ No newline at end of file +?> diff --git a/PHP/Complex Flow Examples/pdfa-3b-with-attachment.php b/PHP/Complex Flow Examples/pdfa-3b-with-attachment.php index 14747c1b..ddb97bd8 100755 --- a/PHP/Complex Flow Examples/pdfa-3b-with-attachment.php +++ b/PHP/Complex Flow Examples/pdfa-3b-with-attachment.php @@ -17,6 +17,14 @@ */ +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); $headers = [ @@ -44,7 +52,7 @@ ] ]; -$attachRequest = new Request('POST', 'https://api.pdfrest.com/pdf-with-added-attachment', $headers); +$attachRequest = new Request('POST', $apiUrl.'/pdf-with-added-attachment', $headers); $attachResponse = $client->sendAsync($attachRequest, $attachOptions)->wait(); @@ -69,7 +77,7 @@ ] ]; -$pdfaRequest = new Request('POST', 'https://api.pdfrest.com/pdfa', $headers); +$pdfaRequest = new Request('POST', $apiUrl.'/pdfa', $headers); $pdfaResponse = $client->sendAsync($pdfaRequest, $pdfaOptions)->wait(); diff --git a/PHP/Complex Flow Examples/preserve-word-document.php b/PHP/Complex Flow Examples/preserve-word-document.php index 147baeae..3afce120 100755 --- a/PHP/Complex Flow Examples/preserve-word-document.php +++ b/PHP/Complex Flow Examples/preserve-word-document.php @@ -13,6 +13,14 @@ * and convert it to the PDF/A format for long-term storage. */ +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); @@ -33,7 +41,7 @@ ] ]; -$wordToPDFRequest = new Request('POST', 'https://api.pdfrest.com/pdf', $headers); +$wordToPDFRequest = new Request('POST', $apiUrl.'/pdf', $headers); $wordToPDFResponse = $client->sendAsync($wordToPDFRequest, $wordToPDFOptions)->wait(); @@ -58,7 +66,7 @@ ] ]; -$pdfaRequest = new Request('POST', 'https://api.pdfrest.com/pdfa', $headers); +$pdfaRequest = new Request('POST', $apiUrl.'/pdfa', $headers); $pdfaResponse = $client->sendAsync($pdfaRequest, $pdfaOptions)->wait(); diff --git a/PHP/Complex Flow Examples/protected-watermark.php b/PHP/Complex Flow Examples/protected-watermark.php index 8cbc9297..89194b23 100755 --- a/PHP/Complex Flow Examples/protected-watermark.php +++ b/PHP/Complex Flow Examples/protected-watermark.php @@ -13,6 +13,14 @@ * and then /restricted-pdf to lock the watermark in. */ +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); $headers = [ @@ -36,7 +44,7 @@ ] ]; -$watermarkRequest = new Request('POST', 'https://api.pdfrest.com/watermarked-pdf', $headers); +$watermarkRequest = new Request('POST', $apiUrl.'/watermarked-pdf', $headers); $watermarkResponse = $client->sendAsync($watermarkRequest, $watermarkOptions)->wait(); @@ -72,7 +80,7 @@ ] ]; -$restrictRequest = new Request('POST', 'https://api.pdfrest.com/restricted-pdf', $headers); +$restrictRequest = new Request('POST', $apiUrl.'/restricted-pdf', $headers); $restrictResponse = $client->sendAsync($restrictRequest, $restrictOptions)->wait(); diff --git a/PHP/Complex Flow Examples/redact-preview-and-finalize.php b/PHP/Complex Flow Examples/redact-preview-and-finalize.php index 6853c9bb..ff222afe 100644 --- a/PHP/Complex Flow Examples/redact-preview-and-finalize.php +++ b/PHP/Complex Flow Examples/redact-preview-and-finalize.php @@ -14,6 +14,14 @@ * redacted as intended. */ +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); @@ -38,7 +46,7 @@ ] ]; -$redactionPreviewRequest = new Request('POST', 'https://api.pdfrest.com/pdf-with-redacted-text-preview', $headers); +$redactionPreviewRequest = new Request('POST', $apiUrl.'/pdf-with-redacted-text-preview', $headers); $redactionPreviewResponse = $client->sendAsync($redactionPreviewRequest, $redactionPreviewOptions)->wait(); @@ -59,7 +67,7 @@ ] ]; -$redactionAppliedRequest = new Request('POST', 'https://api.pdfrest.com/pdf-with-redacted-text-applied', $headers); +$redactionAppliedRequest = new Request('POST', $apiUrl.'/pdf-with-redacted-text-applied', $headers); $redactionAppliedResponse = $client->sendAsync($redactionAppliedRequest, $redactionAppliedOptions)->wait(); diff --git a/PHP/Endpoint Examples/JSON Payload/batch-delete.php b/PHP/Endpoint Examples/JSON Payload/batch-delete.php index f54155ba..10194108 100644 --- a/PHP/Endpoint Examples/JSON Payload/batch-delete.php +++ b/PHP/Endpoint Examples/JSON Payload/batch-delete.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $delete_client = new Client(['http_errors' => false]); $delete_headers = [ @@ -12,6 +20,6 @@ 'Content-Type' => 'application/json' ]; $delete_body = '{"ids":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}'; -$delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); +$delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/bmp.php b/PHP/Endpoint Examples/JSON Payload/bmp.php index 764b2430..28876011 100644 --- a/PHP/Endpoint Examples/JSON Payload/bmp.php +++ b/PHP/Endpoint Examples/JSON Payload/bmp.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $bmp_body = '{"id":"'.$uploaded_id.'"}'; -$bmp_request = new Request('POST', 'https://api.pdfrest.com/bmp', $bmp_headers, $bmp_body); +$bmp_request = new Request('POST', $apiUrl.'/bmp', $bmp_headers, $bmp_body); $bmp_res = $bmp_client->sendAsync($bmp_request)->wait(); echo $bmp_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/compressed-pdf.php b/PHP/Endpoint Examples/JSON Payload/compressed-pdf.php index 2449cb78..eb7f9cb7 100644 --- a/PHP/Endpoint Examples/JSON Payload/compressed-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/compressed-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $compress_body = '{"id":"'.$uploaded_id.'", "compression_level": "medium"}'; -$compress_request = new Request('POST', 'https://api.pdfrest.com/compressed-pdf', $compress_headers, $compress_body); +$compress_request = new Request('POST', $apiUrl.'/compressed-pdf', $compress_headers, $compress_body); $compress_res = $compress_client->sendAsync($compress_request)->wait(); echo $compress_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/decrypted-pdf.php b/PHP/Endpoint Examples/JSON Payload/decrypted-pdf.php index b1a57861..f473cf7c 100644 --- a/PHP/Endpoint Examples/JSON Payload/decrypted-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/decrypted-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; @@ -15,7 +23,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -31,14 +39,14 @@ 'Content-Type' => 'application/json' ]; $decrypt_body = '{"id":"'.$uploaded_id.'", "current_open_password": "password"}'; -$decrypt_request = new Request('POST', 'https://api.pdfrest.com/decrypted-pdf', $decrypt_headers, $decrypt_body); +$decrypt_request = new Request('POST', $apiUrl.'/decrypted-pdf', $decrypt_headers, $decrypt_body); $decrypt_res = $decrypt_client->sendAsync($decrypt_request)->wait(); $decrypt_body = (string) $decrypt_res->getBody(); echo $decrypt_body . PHP_EOL; -// All files uploaded or generated are automatically deleted based on the -// File Retention Period as shown on https://pdfrest.com/pricing. -// For immediate deletion of files, particularly when sensitive data +// All files uploaded or generated are automatically deleted based on the +// File Retention Period as shown on https://pdfrest.com/pricing. +// For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -51,7 +59,7 @@ ]; $decrypt_json = json_decode($decrypt_body, true); $delete_body = '{"ids":"'.$uploaded_id.', '.$decrypt_json['outputId'].'"}'; - $delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); + $delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; } diff --git a/PHP/Endpoint Examples/JSON Payload/delete-resource.php b/PHP/Endpoint Examples/JSON Payload/delete-resource.php index 0ff24cff..373709f9 100644 --- a/PHP/Endpoint Examples/JSON Payload/delete-resource.php +++ b/PHP/Endpoint Examples/JSON Payload/delete-resource.php @@ -2,8 +2,16 @@ $curl = curl_init(); +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + curl_setopt_array($curl, array( - CURLOPT_URL => 'https://api.pdfrest.com/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', + CURLOPT_URL => $apiUrl.'/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, diff --git a/PHP/Endpoint Examples/JSON Payload/encrypted-pdf.php b/PHP/Endpoint Examples/JSON Payload/encrypted-pdf.php index d45cf5e5..72dc9d58 100644 --- a/PHP/Endpoint Examples/JSON Payload/encrypted-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/encrypted-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; @@ -15,7 +23,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -31,16 +39,16 @@ 'Content-Type' => 'application/json' ]; $encrypt_body = '{"id":"'.$uploaded_id.'", "new_open_password": "password"}'; -$encrypt_request = new Request('POST', 'https://api.pdfrest.com/encrypted-pdf', $encrypt_headers, $encrypt_body); +$encrypt_request = new Request('POST', $apiUrl.'/encrypted-pdf', $encrypt_headers, $encrypt_body); $encrypt_res = $encrypt_client->sendAsync($encrypt_request)->wait(); $encrypt_body_str = (string)$encrypt_res->getBody(); echo $encrypt_body_str . PHP_EOL; $encrypt_response_json = json_decode($encrypt_body_str); $output_id = $encrypt_response_json->{'outputId'} ?? ''; -// All files uploaded or generated are automatically deleted based on the -// File Retention Period as shown on https://pdfrest.com/pricing. -// For immediate deletion of files, particularly when sensitive data +// All files uploaded or generated are automatically deleted based on the +// File Retention Period as shown on https://pdfrest.com/pricing. +// For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -52,7 +60,7 @@ 'Content-Type' => 'application/json' ]; $delete_body = '{"ids":"' . $uploaded_id . ', ' . $output_id . '"}'; - $delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); + $delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; } diff --git a/PHP/Endpoint Examples/JSON Payload/excel.php b/PHP/Endpoint Examples/JSON Payload/excel.php index 86620153..79196248 100644 --- a/PHP/Endpoint Examples/JSON Payload/excel.php +++ b/PHP/Endpoint Examples/JSON Payload/excel.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $excel_body = '{"id":"'.$uploaded_id.'"}'; -$excel_request = new Request('POST', 'https://api.pdfrest.com/excel', $excel_headers, $excel_body); +$excel_request = new Request('POST', $apiUrl.'/excel', $excel_headers, $excel_body); $excel_res = $excel_client->sendAsync($excel_request)->wait(); echo $excel_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/exported-form-data.php b/PHP/Endpoint Examples/JSON Payload/exported-form-data.php index 099cc5b8..ad466a04 100644 --- a/PHP/Endpoint Examples/JSON Payload/exported-form-data.php +++ b/PHP/Endpoint Examples/JSON Payload/exported-form-data.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $export_body = '{"id":"'.$uploaded_id.'", "data_format": "xml"}'; -$export_request = new Request('POST', 'https://api.pdfrest.com/exported-form-data', $export_headers, $export_body); +$export_request = new Request('POST', $apiUrl.'/exported-form-data', $export_headers, $export_body); $export_res = $export_client->sendAsync($export_request)->wait(); echo $export_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/extracted-images.php b/PHP/Endpoint Examples/JSON Payload/extracted-images.php index f65fda18..548246ef 100644 --- a/PHP/Endpoint Examples/JSON Payload/extracted-images.php +++ b/PHP/Endpoint Examples/JSON Payload/extracted-images.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $extract_body = '{"id":"'.$uploaded_id.'", "pages": "1-last"}'; -$extract_request = new Request('POST', 'https://api.pdfrest.com/extracted-images', $extract_headers, $extract_body); +$extract_request = new Request('POST', $apiUrl.'/extracted-images', $extract_headers, $extract_body); $extract_res = $extract_client->sendAsync($extract_request)->wait(); echo $extract_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/extracted-text.php b/PHP/Endpoint Examples/JSON Payload/extracted-text.php index e684872d..060de0d3 100644 --- a/PHP/Endpoint Examples/JSON Payload/extracted-text.php +++ b/PHP/Endpoint Examples/JSON Payload/extracted-text.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $extract_body = '{"id":"'.$uploaded_id.'"}'; -$extract_request = new Request('POST', 'https://api.pdfrest.com/extracted-text', $extract_headers, $extract_body); +$extract_request = new Request('POST', $apiUrl.'/extracted-text', $extract_headers, $extract_body); $extract_res = $extract_client->sendAsync($extract_request)->wait(); echo $extract_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/flattened-annotations-pdf.php b/PHP/Endpoint Examples/JSON Payload/flattened-annotations-pdf.php index b4441adc..be6335c2 100644 --- a/PHP/Endpoint Examples/JSON Payload/flattened-annotations-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/flattened-annotations-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $flatten_body = '{"id":"'.$uploaded_id.'"}'; -$flatten_request = new Request('POST', 'https://api.pdfrest.com/flattened-annotations-pdf', $flatten_headers, $flatten_body); +$flatten_request = new Request('POST', $apiUrl.'/flattened-annotations-pdf', $flatten_headers, $flatten_body); $flatten_res = $flatten_client->sendAsync($flatten_request)->wait(); echo $flatten_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/flattened-forms-pdf.php b/PHP/Endpoint Examples/JSON Payload/flattened-forms-pdf.php index b7aea94a..11693c86 100644 --- a/PHP/Endpoint Examples/JSON Payload/flattened-forms-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/flattened-forms-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $flatten_body = '{"id":"'.$uploaded_id.'"}'; -$flatten_request = new Request('POST', 'https://api.pdfrest.com/flattened-forms-pdf', $flatten_headers, $flatten_body); +$flatten_request = new Request('POST', $apiUrl.'/flattened-forms-pdf', $flatten_headers, $flatten_body); $flatten_res = $flatten_client->sendAsync($flatten_request)->wait(); echo $flatten_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/flattened-layers-pdf.php b/PHP/Endpoint Examples/JSON Payload/flattened-layers-pdf.php index 7394c29e..c8cff2f1 100644 --- a/PHP/Endpoint Examples/JSON Payload/flattened-layers-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/flattened-layers-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $flatten_body = '{"id":"'.$uploaded_id.'"}'; -$flatten_request = new Request('POST', 'https://api.pdfrest.com/flattened-layers-pdf', $flatten_headers, $flatten_body); +$flatten_request = new Request('POST', $apiUrl.'/flattened-layers-pdf', $flatten_headers, $flatten_body); $flatten_res = $flatten_client->sendAsync($flatten_request)->wait(); echo $flatten_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.php b/PHP/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.php index feef0a0f..b3788676 100644 --- a/PHP/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $flatten_body = '{"id":"'.$uploaded_id.'"}'; -$flatten_request = new Request('POST', 'https://api.pdfrest.com/flattened-transparencies-pdf', $flatten_headers, $flatten_body); +$flatten_request = new Request('POST', $apiUrl.'/flattened-transparencies-pdf', $flatten_headers, $flatten_body); $flatten_res = $flatten_client->sendAsync($flatten_request)->wait(); echo $flatten_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/get-resource.php b/PHP/Endpoint Examples/JSON Payload/get-resource.php index 3d1f1f74..fbefa2d3 100644 --- a/PHP/Endpoint Examples/JSON Payload/get-resource.php +++ b/PHP/Endpoint Examples/JSON Payload/get-resource.php @@ -1,13 +1,23 @@ false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $gif_body = '{"id":"'.$uploaded_id.'"}'; -$gif_request = new Request('POST', 'https://api.pdfrest.com/gif', $gif_headers, $gif_body); +$gif_request = new Request('POST', $apiUrl.'/gif', $gif_headers, $gif_body); $gif_res = $gif_client->sendAsync($gif_request)->wait(); echo $gif_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/jpg.php b/PHP/Endpoint Examples/JSON Payload/jpg.php index ba9fb877..cf304836 100644 --- a/PHP/Endpoint Examples/JSON Payload/jpg.php +++ b/PHP/Endpoint Examples/JSON Payload/jpg.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $jpg_body = '{"id":"'.$uploaded_id.'"}'; -$jpg_request = new Request('POST', 'https://api.pdfrest.com/jpg', $jpg_headers, $jpg_body); +$jpg_request = new Request('POST', $apiUrl.'/jpg', $jpg_headers, $jpg_body); $jpg_res = $jpg_client->sendAsync($jpg_request)->wait(); echo $jpg_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/linearized-pdf.php b/PHP/Endpoint Examples/JSON Payload/linearized-pdf.php index b093a40d..e2ddba20 100644 --- a/PHP/Endpoint Examples/JSON Payload/linearized-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/linearized-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $linearize_body = '{"id":"'.$uploaded_id.'"}'; -$linearize_request = new Request('POST', 'https://api.pdfrest.com/linearized-pdf', $linearize_headers, $linearize_body); +$linearize_request = new Request('POST', $apiUrl.'/linearized-pdf', $linearize_headers, $linearize_body); $linearize_res = $linearize_client->sendAsync($linearize_request)->wait(); echo $linearize_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/markdown.php b/PHP/Endpoint Examples/JSON Payload/markdown.php index 914edb91..766666bf 100644 --- a/PHP/Endpoint Examples/JSON Payload/markdown.php +++ b/PHP/Endpoint Examples/JSON Payload/markdown.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $markdown_body = '{"id":"'.$uploaded_id.'","page_break_comments":"on"}'; -$markdown_request = new Request('POST', 'https://api.pdfrest.com/markdown', $markdown_headers, $markdown_body); +$markdown_request = new Request('POST', $apiUrl.'/markdown', $markdown_headers, $markdown_body); $markdown_res = $markdown_client->sendAsync($markdown_request)->wait(); -echo $markdown_res->getBody() . PHP_EOL; \ No newline at end of file +echo $markdown_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/merged-pdf.php b/PHP/Endpoint Examples/JSON Payload/merged-pdf.php index 3a84d45c..f49e87b1 100644 --- a/PHP/Endpoint Examples/JSON Payload/merged-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/merged-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_first_file_client = new Client(['http_errors' => false]); $upload_first_file_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_first_file_body = file_get_contents('/path/to/first_file'); -$upload_first_file_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_first_file_headers, $upload_first_file_body); +$upload_first_file_request = new Request('POST', $apiUrl.'/upload', $upload_first_file_headers, $upload_first_file_body); $upload_first_file_res = $upload_first_file_client->sendAsync($upload_first_file_request)->wait(); echo $upload_first_file_res->getBody() . PHP_EOL; @@ -30,7 +38,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_second_file_body = file_get_contents('/path/to/second_file'); -$upload_second_file_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_second_file_headers, $upload_second_file_body); +$upload_second_file_request = new Request('POST', $apiUrl.'/upload', $upload_second_file_headers, $upload_second_file_body); $upload_second_file_res = $upload_second_file_client->sendAsync($upload_second_file_request)->wait(); echo $upload_second_file_res->getBody() . PHP_EOL; @@ -48,6 +56,6 @@ 'Content-Type' => 'application/json' ]; $merge_body = '{"id":["'.$uploaded_first_file_id.'", "'.$uploaded_second_file_id.'"], "type":["id","id"], "pages": [1,1]}'; -$merge_request = new Request('POST', 'https://api.pdfrest.com/merged-pdf', $merge_headers, $merge_body); +$merge_request = new Request('POST', $apiUrl.'/merged-pdf', $merge_headers, $merge_body); $merge_res = $merge_client->sendAsync($merge_request)->wait(); echo $merge_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-info.php b/PHP/Endpoint Examples/JSON Payload/pdf-info.php index e4f0ac14..ade0eac4 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-info.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-info.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $info_body = '{"id":"'.$uploaded_id.'", "queries":"title,page_count"}'; -$info_request = new Request('POST', 'https://api.pdfrest.com/pdf-info', $info_headers, $info_body); +$info_request = new Request('POST', $apiUrl.'/pdf-info', $info_headers, $info_body); $info_res = $info_client->sendAsync($info_request)->wait(); echo $info_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-acroforms.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-acroforms.php index 4fcd3333..b8e97c4e 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-acroforms.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-acroforms.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $acroform_body = '{"id":"'.$uploaded_id.'"}'; -$acroform_request = new Request('POST', 'https://api.pdfrest.com/pdf-with-acroforms', $acroform_headers, $acroform_body); +$acroform_request = new Request('POST', $apiUrl.'/pdf-with-acroforms', $acroform_headers, $acroform_body); $acroform_res = $acroform_client->sendAsync($acroform_request)->wait(); echo $acroform_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-added-attachment.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-added-attachment.php index 557741ca..6b8842c9 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-added-attachment.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-added-attachment.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_pdf_client = new Client(['http_errors' => false]); $upload_pdf_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_pdf_body = file_get_contents('/path/to/pdf_file'); -$upload_pdf_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_pdf_headers, $upload_pdf_body); +$upload_pdf_request = new Request('POST', $apiUrl.'/upload', $upload_pdf_headers, $upload_pdf_body); $upload_pdf_res = $upload_pdf_client->sendAsync($upload_pdf_request)->wait(); echo $upload_pdf_res->getBody() . PHP_EOL; @@ -30,7 +38,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_attachment_body = file_get_contents('/path/to/attachment_file'); -$upload_attachment_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_attachment_headers, $upload_attachment_body); +$upload_attachment_request = new Request('POST', $apiUrl.'/upload', $upload_attachment_headers, $upload_attachment_body); $upload_attachment_res = $upload_attachment_client->sendAsync($upload_attachment_request)->wait(); echo $upload_attachment_res->getBody() . PHP_EOL; @@ -48,6 +56,6 @@ 'Content-Type' => 'application/json' ]; $add_attachment_body = '{"id":"'.$uploaded_pdf_id.'", "id_to_attach": "'.$uploaded_attachment_id.'"}'; -$add_attachment_request = new Request('POST', 'https://api.pdfrest.com/pdf-with-added-attachment', $add_attachment_headers, $add_attachment_body); +$add_attachment_request = new Request('POST', $apiUrl.'/pdf-with-added-attachment', $add_attachment_headers, $add_attachment_body); $add_attachment_res = $add_attachment_client->sendAsync($add_attachment_request)->wait(); echo $add_attachment_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-added-image.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-added-image.php index f4a32310..f3cce1c7 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-added-image.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-added-image.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_pdf_client = new Client(['http_errors' => false]); $upload_pdf_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_pdf_body = file_get_contents('/path/to/pdf_file'); -$upload_pdf_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_pdf_headers, $upload_pdf_body); +$upload_pdf_request = new Request('POST', $apiUrl.'/upload', $upload_pdf_headers, $upload_pdf_body); $upload_pdf_res = $upload_pdf_client->sendAsync($upload_pdf_request)->wait(); echo $upload_pdf_res->getBody() . PHP_EOL; @@ -30,7 +38,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_image_body = file_get_contents('/path/to/image_file); -$upload_image_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_image_headers, $upload_image_body); +$upload_image_request = new Request('POST', $apiUrl.'/upload', $upload_image_headers, $upload_image_body); $upload_image_res = $upload_image_client->sendAsync($upload_image_request)->wait(); echo $upload_image_res->getBody() . PHP_EOL; @@ -48,6 +56,6 @@ 'Content-Type' => 'application/json' ]; $add_image_body = '{"id":"'.$uploaded_pdf_id.'", "image_id": "'.$uploaded_image_id.'", "x":0, "y":0, "page":1}'; -$add_image_request = new Request('POST', 'https://api.pdfrest.com/pdf-with-added-image', $add_image_headers, $add_image_body); +$add_image_request = new Request('POST', $apiUrl.'/pdf-with-added-image', $add_image_headers, $add_image_body); $add_image_res = $add_image_client->sendAsync($add_image_request)->wait(); echo $add_image_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-added-text.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-added-text.php index 5528f830..81acabee 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-added-text.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-added-text.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -29,6 +37,6 @@ 'Content-Type' => 'application/json' ]; $add_text_body = '{"id":"'.$uploaded_id.'", "text_objects":"'.$text_options.'"}'; -$add_text_request = new Request('POST', 'https://api.pdfrest.com/pdf-with-added-text', $add_text_headers, $add_text_body); +$add_text_request = new Request('POST', $apiUrl.'/pdf-with-added-text', $add_text_headers, $add_text_body); $add_text_res = $add_text_client->sendAsync($add_text_request)->wait(); echo $add_text_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-converted-colors.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-converted-colors.php index b171b0de..35b27507 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-converted-colors.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-converted-colors.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $convert_colors_body = '{"id":"'.$uploaded_id.'", "color_profile": "srgb"}'; -$convert_colors_request = new Request('POST', 'https://api.pdfrest.com/pdf-with-converted-colors', $convert_colors_headers, $convert_colors_body); +$convert_colors_request = new Request('POST', $apiUrl.'/pdf-with-converted-colors', $convert_colors_headers, $convert_colors_body); $convert_colors_res = $convert_colors_client->sendAsync($convert_colors_request)->wait(); echo $convert_colors_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.php index 0bbe9462..91d4282a 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_pdf_client = new Client(['http_errors' => false]); $upload_pdf_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_pdf_body = file_get_contents('/path/to/pdf_file'); -$upload_pdf_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_pdf_headers, $upload_pdf_body); +$upload_pdf_request = new Request('POST', $apiUrl.'/upload', $upload_pdf_headers, $upload_pdf_body); $upload_pdf_res = $upload_pdf_client->sendAsync($upload_pdf_request)->wait(); echo $upload_pdf_res->getBody() . PHP_EOL; @@ -30,7 +38,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_data_body = file_get_contents('/path/to/data_file'); -$upload_data_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_data_headers, $upload_data_body); +$upload_data_request = new Request('POST', $apiUrl.'/upload', $upload_data_headers, $upload_data_body); $upload_data_res = $upload_data_client->sendAsync($upload_data_request)->wait(); echo $upload_data_res->getBody() . PHP_EOL; @@ -48,6 +56,6 @@ 'Content-Type' => 'application/json' ]; $import_data_body = '{"id":"'.$uploaded_pdf_id.'", "data_file_id": "'.$uploaded_data_id.'"}'; -$import_data_request = new Request('POST', 'https://api.pdfrest.com/pdf-with-imported-form-data', $import_data_headers, $import_data_body); +$import_data_request = new Request('POST', $apiUrl.'/pdf-with-imported-form-data', $import_data_headers, $import_data_body); $import_data_res = $import_data_client->sendAsync($import_data_request)->wait(); echo $import_data_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-ocr-text.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-ocr-text.php index 971ee057..c82c264e 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-ocr-text.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-ocr-text.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $pdf_with_ocr_text_body = '{"id":"'.$uploaded_id.'"}'; -$pdf_with_ocr_text_request = new Request('POST', 'https://api.pdfrest.com/pdf-with-ocr-text', $pdf_with_ocr_text_headers, $pdf_with_ocr_text_body); +$pdf_with_ocr_text_request = new Request('POST', $apiUrl.'/pdf-with-ocr-text', $pdf_with_ocr_text_headers, $pdf_with_ocr_text_body); $pdf_with_ocr_text_res = $pdf_with_ocr_text_client->sendAsync($pdf_with_ocr_text_request)->wait(); echo $pdf_with_ocr_text_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.php index 0c347afd..9846afec 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -29,6 +37,6 @@ 'Content-Type' => 'application/json' ]; $boxes_body = '{"id":"'.$uploaded_id.'", "boxes":"'.$box_options.'"}'; -$boxes_request = new Request('POST', 'https://api.pdfrest.com/pdf-with-page-boxes-set', $boxes_headers, $boxes_body); +$boxes_request = new Request('POST', $apiUrl.'/pdf-with-page-boxes-set', $boxes_headers, $boxes_body); $boxes_res = $boxes_client->sendAsync($boxes_request)->wait(); echo $boxes_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.php index 77a08a99..af61704b 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; @@ -15,7 +23,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -31,16 +39,16 @@ 'Content-Type' => 'application/json' ]; $pdf_with_redacted_text_body = '{"id":"'.$uploaded_id.'"}'; -$pdf_with_redacted_text_request = new Request('POST', 'https://api.pdfrest.com/pdf-with-redacted-text-applied', $pdf_with_redacted_text_headers, $pdf_with_redacted_text_body); +$pdf_with_redacted_text_request = new Request('POST', $apiUrl.'/pdf-with-redacted-text-applied', $pdf_with_redacted_text_headers, $pdf_with_redacted_text_body); $pdf_with_redacted_text_res = $pdf_with_redacted_text_client->sendAsync($pdf_with_redacted_text_request)->wait(); $applied_body_str = (string)$pdf_with_redacted_text_res->getBody(); echo $applied_body_str . PHP_EOL; $applied_response_json = json_decode($applied_body_str); $output_id = $applied_response_json->{'outputId'} ?? ''; -// All files uploaded or generated are automatically deleted based on the -// File Retention Period as shown on https://pdfrest.com/pricing. -// For immediate deletion of files, particularly when sensitive data +// All files uploaded or generated are automatically deleted based on the +// File Retention Period as shown on https://pdfrest.com/pricing. +// For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -52,7 +60,7 @@ 'Content-Type' => 'application/json' ]; $delete_body = '{"ids":"' . $uploaded_id . ', ' . $output_id . '"}'; - $delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); + $delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; } diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.php index 2ce866f1..38fd79a7 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; @@ -15,7 +23,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -32,14 +40,14 @@ 'Content-Type' => 'application/json' ]; $redact_text_body = '{"id":"'.$uploaded_id.'", "redactions":"'.$redaction_options.'"}'; -$redact_text_request = new Request('POST', 'https://api.pdfrest.com/pdf-with-redacted-text-preview', $redact_text_headers, $redact_text_body); +$redact_text_request = new Request('POST', $apiUrl.'/pdf-with-redacted-text-preview', $redact_text_headers, $redact_text_body); $redact_text_res = $redact_text_client->sendAsync($redact_text_request)->wait(); $preview_body_str = (string)$redact_text_res->getBody(); echo $preview_body_str . PHP_EOL; -// All files uploaded or generated are automatically deleted based on the -// File Retention Period as shown on https://pdfrest.com/pricing. -// For immediate deletion of files, particularly when sensitive data +// All files uploaded or generated are automatically deleted based on the +// File Retention Period as shown on https://pdfrest.com/pricing. +// For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -55,7 +63,7 @@ $preview_json = json_decode($preview_body_str, true); $preview_id = isset($preview_json['outputId']) ? $preview_json['outputId'] : ''; $delete_body = json_encode([ 'ids' => $uploaded_id . ', ' . $preview_id ]); - $delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); + $delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; } diff --git a/PHP/Endpoint Examples/JSON Payload/pdf.php b/PHP/Endpoint Examples/JSON Payload/pdf.php index 03200e87..c4536679 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $pdf_body = '{"id":"'.$uploaded_id.'"}'; -$pdf_request = new Request('POST', 'https://api.pdfrest.com/pdf', $pdf_headers, $pdf_body); +$pdf_request = new Request('POST', $apiUrl.'/pdf', $pdf_headers, $pdf_body); $pdf_res = $pdf_client->sendAsync($pdf_request)->wait(); echo $pdf_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/pdfa.php b/PHP/Endpoint Examples/JSON Payload/pdfa.php index ca52948f..5ebc16aa 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdfa.php +++ b/PHP/Endpoint Examples/JSON Payload/pdfa.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $pdfa_body = '{"id":"'.$uploaded_id.'", "output_type":"PDF/A-2b"}'; -$pdfa_request = new Request('POST', 'https://api.pdfrest.com/pdfa', $pdfa_headers, $pdfa_body); +$pdfa_request = new Request('POST', $apiUrl.'/pdfa', $pdfa_headers, $pdfa_body); $pdfa_res = $pdfa_client->sendAsync($pdfa_request)->wait(); echo $pdfa_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/pdfx.php b/PHP/Endpoint Examples/JSON Payload/pdfx.php index e8094b4a..4a2b9ee5 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdfx.php +++ b/PHP/Endpoint Examples/JSON Payload/pdfx.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $pdfx_body = '{"id":"'.$uploaded_id.'", "output_type":"PDF/X-1a"}'; -$pdfx_request = new Request('POST', 'https://api.pdfrest.com/pdfx', $pdfx_headers, $pdfx_body); +$pdfx_request = new Request('POST', $apiUrl.'/pdfx', $pdfx_headers, $pdfx_body); $pdfx_res = $pdfx_client->sendAsync($pdfx_request)->wait(); echo $pdfx_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/png.php b/PHP/Endpoint Examples/JSON Payload/png.php index a6089fd7..7517a0b3 100644 --- a/PHP/Endpoint Examples/JSON Payload/png.php +++ b/PHP/Endpoint Examples/JSON Payload/png.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $png_body = '{"id":"'.$uploaded_id.'"}'; -$png_request = new Request('POST', 'https://api.pdfrest.com/png', $png_headers, $png_body); +$png_request = new Request('POST', $apiUrl.'/png', $png_headers, $png_body); $png_res = $png_client->sendAsync($png_request)->wait(); echo $png_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/powerpoint.php b/PHP/Endpoint Examples/JSON Payload/powerpoint.php index da16c5db..843a0fff 100644 --- a/PHP/Endpoint Examples/JSON Payload/powerpoint.php +++ b/PHP/Endpoint Examples/JSON Payload/powerpoint.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $powerpoint_body = '{"id":"'.$uploaded_id.'"}'; -$powerpoint_request = new Request('POST', 'https://api.pdfrest.com/powerpoint', $powerpoint_headers, $powerpoint_body); +$powerpoint_request = new Request('POST', $apiUrl.'/powerpoint', $powerpoint_headers, $powerpoint_body); $powerpoint_res = $powerpoint_client->sendAsync($powerpoint_request)->wait(); echo $powerpoint_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/rasterized-pdf.php b/PHP/Endpoint Examples/JSON Payload/rasterized-pdf.php index 1db075fb..2baf5737 100644 --- a/PHP/Endpoint Examples/JSON Payload/rasterized-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/rasterized-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $rasterize_body = '{"id":"'.$uploaded_id.'"}'; -$rasterize_request = new Request('POST', 'https://api.pdfrest.com/rasterized-pdf', $rasterize_headers, $rasterize_body); +$rasterize_request = new Request('POST', $apiUrl.'/rasterized-pdf', $rasterize_headers, $rasterize_body); $rasterize_res = $rasterize_client->sendAsync($rasterize_request)->wait(); echo $rasterize_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/restricted-pdf.php b/PHP/Endpoint Examples/JSON Payload/restricted-pdf.php index 53b2e01b..da4b7a37 100644 --- a/PHP/Endpoint Examples/JSON Payload/restricted-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/restricted-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; @@ -15,7 +23,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -31,16 +39,16 @@ 'Content-Type' => 'application/json' ]; $restrict_body = '{"id":"'.$uploaded_id.'", "new_permissions_password":"password"}'; -$restrict_request = new Request('POST', 'https://api.pdfrest.com/restricted-pdf', $restrict_headers, $restrict_body); +$restrict_request = new Request('POST', $apiUrl.'/restricted-pdf', $restrict_headers, $restrict_body); $restrict_res = $restrict_client->sendAsync($restrict_request)->wait(); $restrict_body_str = (string)$restrict_res->getBody(); echo $restrict_body_str . PHP_EOL; $restrict_response_json = json_decode($restrict_body_str); $output_id = $restrict_response_json->{'outputId'} ?? ''; -// All files uploaded or generated are automatically deleted based on the -// File Retention Period as shown on https://pdfrest.com/pricing. -// For immediate deletion of files, particularly when sensitive data +// All files uploaded or generated are automatically deleted based on the +// File Retention Period as shown on https://pdfrest.com/pricing. +// For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -52,7 +60,7 @@ 'Content-Type' => 'application/json' ]; $delete_body = '{"ids":"' . $uploaded_id . ', ' . $output_id . '"}'; - $delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); + $delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; } diff --git a/PHP/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.php b/PHP/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.php index 64c4432f..26dcbc6d 100644 --- a/PHP/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.php +++ b/PHP/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $input_upload_headers = [ 'api-key' => 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $input_upload_body = file_get_contents('/path/to/file'); -$input_upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $input_upload_headers, $input_upload_body); +$input_upload_request = new Request('POST', $apiUrl.'/upload', $input_upload_headers, $input_upload_body); $input_upload_res = $upload_client->sendAsync($input_upload_request)->wait(); echo $input_upload_res->getBody() . PHP_EOL; @@ -28,7 +36,7 @@ 'Content-Type' => 'application/octet-stream' ]; $certificate_upload_body = file_get_contents('/path/to/file'); -$certificate_upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $certificate_upload_headers, $certificate_upload_body); +$certificate_upload_request = new Request('POST', $apiUrl.'/upload', $certificate_upload_headers, $certificate_upload_body); $certificate_upload_res = $upload_client->sendAsync($certificate_upload_request)->wait(); echo $certificate_upload_res->getBody() . PHP_EOL; @@ -44,7 +52,7 @@ 'Content-Type' => 'application/octet-stream' ]; $private_key_upload_body = file_get_contents('/path/to/file'); -$private_key_upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $private_key_upload_headers, $private_key_upload_body); +$private_key_upload_request = new Request('POST', $apiUrl.'/upload', $private_key_upload_headers, $private_key_upload_body); $private_key_upload_res = $upload_client->sendAsync($private_key_upload_request)->wait(); echo $private_key_upload_res->getBody() . PHP_EOL; @@ -61,6 +69,6 @@ 'Content-Type' => 'application/json' ]; $signing_body = '{"id":"'.$uploaded_input_id.'", "certificate_id":"'.$uploaded_certificate_id.'", "private_key_id":"'.$uploaded_private_key_id.'", "signature_configuration":"'.$signature_config.'"}'; -$signing_request = new Request('POST', 'https://api.pdfrest.com/signed-pdf', $signing_headers, $signing_body); +$signing_request = new Request('POST', $apiUrl.'/signed-pdf', $signing_headers, $signing_body); $signing_res = $signing_client->sendAsync($signing_request)->wait(); echo $signing_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/signed-pdf.php b/PHP/Endpoint Examples/JSON Payload/signed-pdf.php index 9cff80e8..2de2c2cc 100644 --- a/PHP/Endpoint Examples/JSON Payload/signed-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/signed-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $input_upload_headers = [ 'api-key' => 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $input_upload_body = file_get_contents('/path/to/file'); -$input_upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $input_upload_headers, $input_upload_body); +$input_upload_request = new Request('POST', $apiUrl.'/upload', $input_upload_headers, $input_upload_body); $input_upload_res = $upload_client->sendAsync($input_upload_request)->wait(); echo $input_upload_res->getBody() . PHP_EOL; @@ -28,7 +36,7 @@ 'Content-Type' => 'application/octet-stream' ]; $credentials_upload_body = file_get_contents('/path/to/file'); -$credentials_upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $credentials_upload_headers, $credentials_upload_body); +$credentials_upload_request = new Request('POST', $apiUrl.'/upload', $credentials_upload_headers, $credentials_upload_body); $credentials_upload_res = $upload_client->sendAsync($credentials_upload_request)->wait(); echo $credentials_upload_res->getBody() . PHP_EOL; @@ -44,7 +52,7 @@ 'Content-Type' => 'application/octet-stream' ]; $passphrase_upload_body = file_get_contents('/path/to/file'); -$passphrase_upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $passphrase_upload_headers, $passphrase_upload_body); +$passphrase_upload_request = new Request('POST', $apiUrl.'/upload', $passphrase_upload_headers, $passphrase_upload_body); $passphrase_upload_res = $upload_client->sendAsync($passphrase_upload_request)->wait(); echo $passphrase_upload_res->getBody() . PHP_EOL; @@ -60,7 +68,7 @@ 'Content-Type' => 'application/octet-stream' ]; $logo_upload_body = file_get_contents('/path/to/file'); -$logo_upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $logo_upload_headers, $logo_upload_body); +$logo_upload_request = new Request('POST', $apiUrl.'/upload', $logo_upload_headers, $logo_upload_body); $logo_upload_res = $upload_client->sendAsync($logo_upload_request)->wait(); echo $logo_upload_res->getBody() . PHP_EOL; @@ -77,6 +85,6 @@ 'Content-Type' => 'application/json' ]; $signing_body = '{"id":"'.$uploaded_input_id.'", "pfx_credential_id":"'.$uploaded_credentials_id.'", "pfx_passphrase_id":"'.$uploaded_passphrase_id.'", "logo_id":"'.$uploaded_logo_id.'", "signature_configuration":"'.$signature_config.'"}'; -$signing_request = new Request('POST', 'https://api.pdfrest.com/signed-pdf', $signing_headers, $signing_body); +$signing_request = new Request('POST', $apiUrl.'/signed-pdf', $signing_headers, $signing_body); $signing_res = $signing_client->sendAsync($signing_request)->wait(); echo $signing_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/split-pdf.php b/PHP/Endpoint Examples/JSON Payload/split-pdf.php index b576b90c..7cd1cc25 100644 --- a/PHP/Endpoint Examples/JSON Payload/split-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/split-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $split_body = '{"id":"'.$uploaded_id.'"}'; -$split_request = new Request('POST', 'https://api.pdfrest.com/split-pdf', $split_headers, $split_body); +$split_request = new Request('POST', $apiUrl.'/split-pdf', $split_headers, $split_body); $split_res = $split_client->sendAsync($split_request)->wait(); echo $split_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/tif.php b/PHP/Endpoint Examples/JSON Payload/tif.php index bcf131a1..331accf2 100644 --- a/PHP/Endpoint Examples/JSON Payload/tif.php +++ b/PHP/Endpoint Examples/JSON Payload/tif.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $tif_body = '{"id":"'.$uploaded_id.'"}'; -$tif_request = new Request('POST', 'https://api.pdfrest.com/tif', $tif_headers, $tif_body); +$tif_request = new Request('POST', $apiUrl.'/tif', $tif_headers, $tif_body); $tif_res = $tif_client->sendAsync($tif_request)->wait(); echo $tif_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/unrestricted-pdf.php b/PHP/Endpoint Examples/JSON Payload/unrestricted-pdf.php index b0c45605..45c06a37 100644 --- a/PHP/Endpoint Examples/JSON Payload/unrestricted-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/unrestricted-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; @@ -15,7 +23,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -31,14 +39,14 @@ 'Content-Type' => 'application/json' ]; $unrestrict_body = '{"id":"'.$uploaded_id.'", "current_permissions_password":"password"}'; -$unrestrict_request = new Request('POST', 'https://api.pdfrest.com/unrestricted-pdf', $unrestrict_headers, $unrestrict_body); +$unrestrict_request = new Request('POST', $apiUrl.'/unrestricted-pdf', $unrestrict_headers, $unrestrict_body); $unrestrict_res = $unrestrict_client->sendAsync($unrestrict_request)->wait(); $unrestrict_body = (string) $unrestrict_res->getBody(); echo $unrestrict_body . PHP_EOL; -// All files uploaded or generated are automatically deleted based on the -// File Retention Period as shown on https://pdfrest.com/pricing. -// For immediate deletion of files, particularly when sensitive data +// All files uploaded or generated are automatically deleted based on the +// File Retention Period as shown on https://pdfrest.com/pricing. +// For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -51,7 +59,7 @@ ]; $unrestrict_json = json_decode($unrestrict_body, true); $delete_body = '{"ids":"'.$uploaded_id.', '.$unrestrict_json['outputId'].'"}'; - $delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); + $delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; } diff --git a/PHP/Endpoint Examples/JSON Payload/unzip.php b/PHP/Endpoint Examples/JSON Payload/unzip.php index f08f5cc8..833080a2 100644 --- a/PHP/Endpoint Examples/JSON Payload/unzip.php +++ b/PHP/Endpoint Examples/JSON Payload/unzip.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $unzip_body = '{"id":"'.$uploaded_id.'"}'; -$unzip_request = new Request('POST', 'https://api.pdfrest.com/unzip', $unzip_headers, $unzip_body); +$unzip_request = new Request('POST', $apiUrl.'/unzip', $unzip_headers, $unzip_body); $unzip_res = $unzip_client->sendAsync($unzip_request)->wait(); echo $unzip_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/up-toolkit.php b/PHP/Endpoint Examples/JSON Payload/up-toolkit.php index 47be1ea4..3471f128 100644 --- a/PHP/Endpoint Examples/JSON Payload/up-toolkit.php +++ b/PHP/Endpoint Examples/JSON Payload/up-toolkit.php @@ -1,8 +1,14 @@ false]); $headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,6 +20,6 @@ 'Content-Type' => 'application/octet-stream' ]; $body = file_get_contents('/path/to/file'); -$request = new Request('POST', 'https://api.pdfrest.com/upload', $headers, $body); +$request = new Request('POST', $apiUrl.'/upload', $headers, $body); $res = $client->sendAsync($request)->wait(); echo $res->getBody(); diff --git a/PHP/Endpoint Examples/JSON Payload/watermarked-pdf.php b/PHP/Endpoint Examples/JSON Payload/watermarked-pdf.php index 230b5b8d..60e9fbab 100644 --- a/PHP/Endpoint Examples/JSON Payload/watermarked-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/watermarked-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; @@ -15,7 +23,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -31,16 +39,16 @@ 'Content-Type' => 'application/json' ]; $watermark_body = '{"id":"'.$uploaded_id.'", "watermark_text":"TEXT"}'; -$watermark_request = new Request('POST', 'https://api.pdfrest.com/watermarked-pdf', $watermark_headers, $watermark_body); +$watermark_request = new Request('POST', $apiUrl.'/watermarked-pdf', $watermark_headers, $watermark_body); $watermark_res = $watermark_client->sendAsync($watermark_request)->wait(); $watermark_body_str = (string)$watermark_res->getBody(); echo $watermark_body_str . PHP_EOL; $watermark_response_json = json_decode($watermark_body_str); $output_id = $watermark_response_json->{'outputId'} ?? ''; -// All files uploaded or generated are automatically deleted based on the -// File Retention Period as shown on https://pdfrest.com/pricing. -// For immediate deletion of files, particularly when sensitive data +// All files uploaded or generated are automatically deleted based on the +// File Retention Period as shown on https://pdfrest.com/pricing. +// For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -52,7 +60,7 @@ 'Content-Type' => 'application/json' ]; $delete_body = '{"ids":"' . $uploaded_id . ', ' . $output_id . '"}'; - $delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); + $delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; } diff --git a/PHP/Endpoint Examples/JSON Payload/word.php b/PHP/Endpoint Examples/JSON Payload/word.php index 6d8aeca6..da2663c7 100644 --- a/PHP/Endpoint Examples/JSON Payload/word.php +++ b/PHP/Endpoint Examples/JSON Payload/word.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_client = new Client(['http_errors' => false]); $upload_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_body = file_get_contents('/path/to/file'); -$upload_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_headers, $upload_body); +$upload_request = new Request('POST', $apiUrl.'/upload', $upload_headers, $upload_body); $upload_res = $upload_client->sendAsync($upload_request)->wait(); echo $upload_res->getBody() . PHP_EOL; @@ -28,6 +36,6 @@ 'Content-Type' => 'application/json' ]; $word_body = '{"id":"'.$uploaded_id.'"}'; -$word_request = new Request('POST', 'https://api.pdfrest.com/word', $word_headers, $word_body); +$word_request = new Request('POST', $apiUrl.'/word', $word_headers, $word_body); $word_res = $word_client->sendAsync($word_request)->wait(); echo $word_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/JSON Payload/zip.php b/PHP/Endpoint Examples/JSON Payload/zip.php index 99ab05a4..935f4eb5 100644 --- a/PHP/Endpoint Examples/JSON Payload/zip.php +++ b/PHP/Endpoint Examples/JSON Payload/zip.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $upload_first_file_client = new Client(['http_errors' => false]); $upload_first_file_headers = [ 'api-key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', @@ -12,7 +20,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_first_file_body = file_get_contents('/path/to/first_file'); -$upload_first_file_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_first_file_headers, $upload_first_file_body); +$upload_first_file_request = new Request('POST', $apiUrl.'/upload', $upload_first_file_headers, $upload_first_file_body); $upload_first_file_res = $upload_first_file_client->sendAsync($upload_first_file_request)->wait(); echo $upload_first_file_res->getBody() . PHP_EOL; @@ -30,7 +38,7 @@ 'Content-Type' => 'application/octet-stream' ]; $upload_second_file_body = file_get_contents('/path/to/second_file'); -$upload_second_file_request = new Request('POST', 'https://api.pdfrest.com/upload', $upload_second_file_headers, $upload_second_file_body); +$upload_second_file_request = new Request('POST', $apiUrl.'/upload', $upload_second_file_headers, $upload_second_file_body); $upload_second_file_res = $upload_second_file_client->sendAsync($upload_second_file_request)->wait(); echo $upload_second_file_res->getBody() . PHP_EOL; @@ -48,6 +56,6 @@ 'Content-Type' => 'application/json' ]; $zip_body = '{"id":["'.$uploaded_first_file_id.'", "'.$uploaded_second_file_id.'"]}'; -$zip_request = new Request('POST', 'https://api.pdfrest.com/zip', $zip_headers, $zip_body); +$zip_request = new Request('POST', $apiUrl.'/zip', $zip_headers, $zip_body); $zip_res = $zip_client->sendAsync($zip_request)->wait(); echo $zip_res->getBody() . PHP_EOL; diff --git a/PHP/Endpoint Examples/Multipart Payload/batch-delete.php b/PHP/Endpoint Examples/Multipart Payload/batch-delete.php index 23a4e2c6..1ba30b89 100644 --- a/PHP/Endpoint Examples/Multipart Payload/batch-delete.php +++ b/PHP/Endpoint Examples/Multipart Payload/batch-delete.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -20,7 +28,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/delete', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/delete', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/bmp.php b/PHP/Endpoint Examples/Multipart Payload/bmp.php index 0210d2d0..597b9a8e 100644 --- a/PHP/Endpoint Examples/Multipart Payload/bmp.php +++ b/PHP/Endpoint Examples/Multipart Payload/bmp.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -40,7 +48,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/bmp', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/bmp', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/compressed-pdf.php b/PHP/Endpoint Examples/Multipart Payload/compressed-pdf.php index 3ffba620..ca71664d 100644 --- a/PHP/Endpoint Examples/Multipart Payload/compressed-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/compressed-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -32,7 +40,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/compressed-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/compressed-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/decrypted-pdf.php b/PHP/Endpoint Examples/Multipart Payload/decrypted-pdf.php index 6ab640c4..18b4e52a 100644 --- a/PHP/Endpoint Examples/Multipart Payload/decrypted-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/decrypted-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; @@ -35,16 +43,16 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/decrypted-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/decrypted-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. $body = (string) $res->getBody(); echo $body; // Output the response body -// All files uploaded or generated are automatically deleted based on the -// File Retention Period as shown on https://pdfrest.com/pricing. -// For immediate deletion of files, particularly when sensitive data +// All files uploaded or generated are automatically deleted based on the +// File Retention Period as shown on https://pdfrest.com/pricing. +// For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -59,7 +67,7 @@ $input_id = isset($json['inputId']) ? $json['inputId'] : ''; $output_id = isset($json['outputId']) ? $json['outputId'] : ''; $delete_body = json_encode([ 'ids' => $input_id . ', ' . $output_id ]); - $delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); + $delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; } diff --git a/PHP/Endpoint Examples/Multipart Payload/delete-resource.php b/PHP/Endpoint Examples/Multipart Payload/delete-resource.php index 0ff24cff..1271455f 100644 --- a/PHP/Endpoint Examples/Multipart Payload/delete-resource.php +++ b/PHP/Endpoint Examples/Multipart Payload/delete-resource.php @@ -1,9 +1,17 @@ 'https://api.pdfrest.com/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', + CURLOPT_URL => $apiUrl.'/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, diff --git a/PHP/Endpoint Examples/Multipart Payload/encrypted-pdf.php b/PHP/Endpoint Examples/Multipart Payload/encrypted-pdf.php index 1ed2e37f..a3a58f0a 100644 --- a/PHP/Endpoint Examples/Multipart Payload/encrypted-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/encrypted-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; @@ -35,16 +43,16 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/encrypted-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/encrypted-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. $body_str = (string)$res->getBody(); echo $body_str; // Output the response body, which contains the encrypted PDF content. -// All files uploaded or generated are automatically deleted based on the -// File Retention Period as shown on https://pdfrest.com/pricing. -// For immediate deletion of files, particularly when sensitive data +// All files uploaded or generated are automatically deleted based on the +// File Retention Period as shown on https://pdfrest.com/pricing. +// For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -59,7 +67,7 @@ $input_id = isset($parsed['inputId']) ? $parsed['inputId'] : ''; $output_id = isset($parsed['outputId']) ? $parsed['outputId'] : ''; $delete_body = json_encode([ 'ids' => "$input_id, $output_id" ]); - $delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); + $delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; } diff --git a/PHP/Endpoint Examples/Multipart Payload/excel.php b/PHP/Endpoint Examples/Multipart Payload/excel.php index 127257b3..72fe7847 100644 --- a/PHP/Endpoint Examples/Multipart Payload/excel.php +++ b/PHP/Endpoint Examples/Multipart Payload/excel.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -28,7 +36,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/excel', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/excel', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/exported-form-data.php b/PHP/Endpoint Examples/Multipart Payload/exported-form-data.php index 2a10f29a..4916a6e8 100644 --- a/PHP/Endpoint Examples/Multipart Payload/exported-form-data.php +++ b/PHP/Endpoint Examples/Multipart Payload/exported-form-data.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -32,7 +40,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/exported-form-data', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/exported-form-data', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/extracted-images.php b/PHP/Endpoint Examples/Multipart Payload/extracted-images.php index 9a5ce48d..09c0777a 100644 --- a/PHP/Endpoint Examples/Multipart Payload/extracted-images.php +++ b/PHP/Endpoint Examples/Multipart Payload/extracted-images.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -32,7 +40,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/extracted-images', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/extracted-images', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/extracted-text.php b/PHP/Endpoint Examples/Multipart Payload/extracted-text.php index 708a101a..65f6533a 100644 --- a/PHP/Endpoint Examples/Multipart Payload/extracted-text.php +++ b/PHP/Endpoint Examples/Multipart Payload/extracted-text.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -28,7 +36,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/extracted-text', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/extracted-text', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.php b/PHP/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.php index 0986e670..bb9c2452 100644 --- a/PHP/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -28,7 +36,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/flattened-annotations-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/flattened-annotations-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/flattened-forms-pdf.php b/PHP/Endpoint Examples/Multipart Payload/flattened-forms-pdf.php index ab1f243c..3d774830 100644 --- a/PHP/Endpoint Examples/Multipart Payload/flattened-forms-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/flattened-forms-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); $headers = [ 'Api-Key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' @@ -25,7 +33,7 @@ ] ]]; -$request = new Request('POST', 'https://api.pdfrest.com/flattened-forms-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/flattened-forms-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/flattened-layers-pdf.php b/PHP/Endpoint Examples/Multipart Payload/flattened-layers-pdf.php index 19867564..da11bd2d 100644 --- a/PHP/Endpoint Examples/Multipart Payload/flattened-layers-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/flattened-layers-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -28,7 +36,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/flattened-layers-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/flattened-layers-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.php b/PHP/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.php index e4228493..9824c626 100644 --- a/PHP/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -32,7 +40,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/flattened-transparencies-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/flattened-transparencies-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/get-resource.php b/PHP/Endpoint Examples/Multipart Payload/get-resource.php index 3d1f1f74..fbefa2d3 100644 --- a/PHP/Endpoint Examples/Multipart Payload/get-resource.php +++ b/PHP/Endpoint Examples/Multipart Payload/get-resource.php @@ -1,13 +1,23 @@ sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/jpg.php b/PHP/Endpoint Examples/Multipart Payload/jpg.php index bce4a13c..02fe751b 100644 --- a/PHP/Endpoint Examples/Multipart Payload/jpg.php +++ b/PHP/Endpoint Examples/Multipart Payload/jpg.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -44,7 +52,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/jpg', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/jpg', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/linearized-pdf.php b/PHP/Endpoint Examples/Multipart Payload/linearized-pdf.php index 7cf3bca0..13a45e41 100644 --- a/PHP/Endpoint Examples/Multipart Payload/linearized-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/linearized-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -28,7 +36,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/linearized-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/linearized-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/markdown.php b/PHP/Endpoint Examples/Multipart Payload/markdown.php index 2c17cc27..6e1908c8 100644 --- a/PHP/Endpoint Examples/Multipart Payload/markdown.php +++ b/PHP/Endpoint Examples/Multipart Payload/markdown.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -28,8 +36,8 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/markdown', $headers); // Create a new HTTP POST request with the updated /markdown endpoint and headers. +$request = new Request('POST', $apiUrl.'/markdown', $headers); // Create a new HTTP POST request with the updated /markdown endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. -echo $res->getBody(); // Output the response body, which contains the generated markdown from the document. \ No newline at end of file +echo $res->getBody(); // Output the response body, which contains the generated markdown from the document. diff --git a/PHP/Endpoint Examples/Multipart Payload/merged-pdf.php b/PHP/Endpoint Examples/Multipart Payload/merged-pdf.php index 035f71d2..b7b2a8b6 100644 --- a/PHP/Endpoint Examples/Multipart Payload/merged-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/merged-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -64,7 +72,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/merged-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/merged-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-info.php b/PHP/Endpoint Examples/Multipart Payload/pdf-info.php index ed482865..b5d7fa55 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-info.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-info.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -28,7 +36,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/pdf-info', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/pdf-info', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-acroforms.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-acroforms.php index 87dbf734..99f1ddff 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-acroforms.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-acroforms.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -28,7 +36,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/pdf-with-acroforms', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/pdf-with-acroforms', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.php index f1dad929..c2b4d7b4 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -36,7 +44,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/pdf-with-added-attachment', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/pdf-with-added-attachment', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-image.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-image.php index 19fae81b..07e64487 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-image.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-image.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -48,7 +56,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/pdf-with-added-image', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/pdf-with-added-image', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-text.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-text.php index 80fd0086..4df43c03 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-text.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-text.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -32,7 +40,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/pdf-with-added-text', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/pdf-with-added-text', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.php index bb107ac4..4e40dce9 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -32,7 +40,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/pdf-with-converted-colors', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/pdf-with-converted-colors', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.php index 303a0b87..ffc2e61d 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); $headers = [ 'Api-Key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' @@ -33,7 +41,7 @@ ] ]]; -$request = new Request('POST', 'https://api.pdfrest.com/pdf-with-imported-form-data', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/pdf-with-imported-form-data', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.php index 76073f25..af136f42 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -28,7 +36,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/pdf-with-ocr-text', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/pdf-with-ocr-text', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.php index 22ee6e1d..a8b0f3e7 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -32,7 +40,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/pdf-with-page-boxes-set', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/pdf-with-page-boxes-set', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.php index e4d34afd..485ee921 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; @@ -31,16 +39,16 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/pdf-with-redacted-text-applied', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/pdf-with-redacted-text-applied', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. $body_str = (string)$res->getBody(); echo $body_str; // Output the response body, which contains the document with finalized text redactions. -// All files uploaded or generated are automatically deleted based on the -// File Retention Period as shown on https://pdfrest.com/pricing. -// For immediate deletion of files, particularly when sensitive data +// All files uploaded or generated are automatically deleted based on the +// File Retention Period as shown on https://pdfrest.com/pricing. +// For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -55,7 +63,7 @@ $input_id = isset($parsed['inputId']) ? $parsed['inputId'] : ''; $output_id = isset($parsed['outputId']) ? $parsed['outputId'] : ''; $delete_body = json_encode([ 'ids' => "$input_id, $output_id" ]); - $delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); + $delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; } diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.php index 227ca619..9aeed32a 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; @@ -35,16 +43,16 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/pdf-with-redacted-text-preview', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/pdf-with-redacted-text-preview', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. $body_str = (string)$res->getBody(); echo $body_str; // Output the response body, which contains the PDF with redaction preview annotations. -// All files uploaded or generated are automatically deleted based on the -// File Retention Period as shown on https://pdfrest.com/pricing. -// For immediate deletion of files, particularly when sensitive data +// All files uploaded or generated are automatically deleted based on the +// File Retention Period as shown on https://pdfrest.com/pricing. +// For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -61,7 +69,7 @@ // IMPORTANT: Do not delete the $output_id (the preview PDF) file until after the redaction is applied // with the /pdf-with-redacted-text-applied endpoint. $delete_body = json_encode([ 'ids' => $input_id . ', ' . $output_id ]); - $delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); + $delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; } diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf.php b/PHP/Endpoint Examples/Multipart Payload/pdf.php index b1e030aa..a6c46443 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -40,7 +48,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdfa.php b/PHP/Endpoint Examples/Multipart Payload/pdfa.php index 1651c8ca..65a459ee 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdfa.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdfa.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -32,7 +40,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/pdfa', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/pdfa', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdfx.php b/PHP/Endpoint Examples/Multipart Payload/pdfx.php index b5c2d992..fa1b2659 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdfx.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdfx.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -32,7 +40,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/pdfx', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/pdfx', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/png.php b/PHP/Endpoint Examples/Multipart Payload/png.php index 8a570e4f..507d045e 100644 --- a/PHP/Endpoint Examples/Multipart Payload/png.php +++ b/PHP/Endpoint Examples/Multipart Payload/png.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -40,7 +48,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/png', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/png', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/powerpoint.php b/PHP/Endpoint Examples/Multipart Payload/powerpoint.php index b4c188f1..fb94af78 100644 --- a/PHP/Endpoint Examples/Multipart Payload/powerpoint.php +++ b/PHP/Endpoint Examples/Multipart Payload/powerpoint.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -28,7 +36,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/powerpoint', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/powerpoint', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/rasterized-pdf.php b/PHP/Endpoint Examples/Multipart Payload/rasterized-pdf.php index 25b8ff67..ca86df92 100644 --- a/PHP/Endpoint Examples/Multipart Payload/rasterized-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/rasterized-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -28,7 +36,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/rasterized-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/rasterized-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/request-status.php b/PHP/Endpoint Examples/Multipart Payload/request-status.php index e6136c04..eac7facc 100644 --- a/PHP/Endpoint Examples/Multipart Payload/request-status.php +++ b/PHP/Endpoint Examples/Multipart Payload/request-status.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client $apiKey = 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; // Your API key goes here. @@ -28,7 +36,7 @@ ]; // Using /png as an arbitrary example, send a request with the Request-Type header. -$pngRequest = new Request('POST', 'https://api.pdfrest.com/png', $headers); +$pngRequest = new Request('POST', $apiUrl.'/png', $headers); $pngResponse = $client->sendAsync($pngRequest, $pngOptions)->wait(); @@ -39,7 +47,7 @@ $requestId = json_decode($pngResponse->getBody())->{'requestId'}; // Get the status of the PNG request by its ID. -$request_status_endpoint_url = 'https://api.pdfrest.com/request-status/'.$requestId; +$request_status_endpoint_url = $apiUrl.'/request-status/'.$requestId; $headers = [ 'Api-Key' => $apiKey diff --git a/PHP/Endpoint Examples/Multipart Payload/restricted-pdf.php b/PHP/Endpoint Examples/Multipart Payload/restricted-pdf.php index c7dca3a3..4831e8d2 100644 --- a/PHP/Endpoint Examples/Multipart Payload/restricted-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/restricted-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; @@ -47,16 +55,16 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/restricted-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/restricted-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. $body_str = (string)$res->getBody(); echo $body_str; // Output the response body, which contains the restricted PDF with specified permissions. -// All files uploaded or generated are automatically deleted based on the -// File Retention Period as shown on https://pdfrest.com/pricing. -// For immediate deletion of files, particularly when sensitive data +// All files uploaded or generated are automatically deleted based on the +// File Retention Period as shown on https://pdfrest.com/pricing. +// For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -71,7 +79,7 @@ $input_id = isset($parsed['inputId']) ? $parsed['inputId'] : ''; $output_id = isset($parsed['outputId']) ? $parsed['outputId'] : ''; $delete_body = json_encode([ 'ids' => "$input_id, $output_id" ]); - $delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); + $delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; } diff --git a/PHP/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.php b/PHP/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.php index c554b781..1da70412 100644 --- a/PHP/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.php +++ b/PHP/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -48,7 +56,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/signed-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/signed-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/signed-pdf.php b/PHP/Endpoint Examples/Multipart Payload/signed-pdf.php index f225edac..efd875e7 100644 --- a/PHP/Endpoint Examples/Multipart Payload/signed-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/signed-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -56,7 +64,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/signed-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/signed-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/split-pdf.php b/PHP/Endpoint Examples/Multipart Payload/split-pdf.php index f07e2535..3d4246d8 100644 --- a/PHP/Endpoint Examples/Multipart Payload/split-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/split-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -40,7 +48,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/split-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/split-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/tif.php b/PHP/Endpoint Examples/Multipart Payload/tif.php index 779904b4..05a44dad 100644 --- a/PHP/Endpoint Examples/Multipart Payload/tif.php +++ b/PHP/Endpoint Examples/Multipart Payload/tif.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -40,7 +48,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/tif', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/tif', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/unrestricted-pdf.php b/PHP/Endpoint Examples/Multipart Payload/unrestricted-pdf.php index c6ac74bc..66794c99 100644 --- a/PHP/Endpoint Examples/Multipart Payload/unrestricted-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/unrestricted-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; @@ -35,16 +43,16 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/unrestricted-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/unrestricted-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. $body = (string) $res->getBody(); echo $body; // Output the response body -// All files uploaded or generated are automatically deleted based on the -// File Retention Period as shown on https://pdfrest.com/pricing. -// For immediate deletion of files, particularly when sensitive data +// All files uploaded or generated are automatically deleted based on the +// File Retention Period as shown on https://pdfrest.com/pricing. +// For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -59,7 +67,7 @@ $input_id = isset($json['inputId']) ? $json['inputId'] : ''; $output_id = isset($json['outputId']) ? $json['outputId'] : ''; $delete_body = json_encode([ 'ids' => $input_id . ', ' . $output_id ]); - $delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); + $delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; } diff --git a/PHP/Endpoint Examples/Multipart Payload/unzip.php b/PHP/Endpoint Examples/Multipart Payload/unzip.php index 9b4b06fb..d108df4f 100644 --- a/PHP/Endpoint Examples/Multipart Payload/unzip.php +++ b/PHP/Endpoint Examples/Multipart Payload/unzip.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -24,7 +32,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/unzip', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/unzip', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/up-toolkit.php b/PHP/Endpoint Examples/Multipart Payload/up-toolkit.php index 47be1ea4..940e7370 100644 --- a/PHP/Endpoint Examples/Multipart Payload/up-toolkit.php +++ b/PHP/Endpoint Examples/Multipart Payload/up-toolkit.php @@ -1,8 +1,17 @@ sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/watermarked-pdf.php b/PHP/Endpoint Examples/Multipart Payload/watermarked-pdf.php index b9d00175..d138f895 100644 --- a/PHP/Endpoint Examples/Multipart Payload/watermarked-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/watermarked-pdf.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; @@ -35,16 +43,16 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/watermarked-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/watermarked-pdf', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. $body_str = (string)$res->getBody(); echo $body_str; // Output the response body, which contains the watermarked PDF content. -// All files uploaded or generated are automatically deleted based on the -// File Retention Period as shown on https://pdfrest.com/pricing. -// For immediate deletion of files, particularly when sensitive data +// All files uploaded or generated are automatically deleted based on the +// File Retention Period as shown on https://pdfrest.com/pricing. +// For immediate deletion of files, particularly when sensitive data // is involved, an explicit delete call can be made to the API. // // Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -59,7 +67,7 @@ $input_id = $parsed['inputId'][0]; $output_id = isset($parsed['outputId']) ? $parsed['outputId'] : ''; $delete_body = json_encode([ 'ids' => "$input_id, $output_id" ]); - $delete_request = new Request('POST', 'https://api.pdfrest.com/delete', $delete_headers, $delete_body); + $delete_request = new Request('POST', $apiUrl.'/delete', $delete_headers, $delete_body); $delete_res = $delete_client->sendAsync($delete_request)->wait(); echo $delete_res->getBody() . PHP_EOL; } diff --git a/PHP/Endpoint Examples/Multipart Payload/word.php b/PHP/Endpoint Examples/Multipart Payload/word.php index df442c7c..93d5347b 100644 --- a/PHP/Endpoint Examples/Multipart Payload/word.php +++ b/PHP/Endpoint Examples/Multipart Payload/word.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); // Create a new instance of the Guzzle HTTP client. $headers = [ @@ -28,7 +36,7 @@ ] ]; -$request = new Request('POST', 'https://api.pdfrest.com/word', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/word', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. diff --git a/PHP/Endpoint Examples/Multipart Payload/zip.php b/PHP/Endpoint Examples/Multipart Payload/zip.php index ca8ec69a..a575d508 100644 --- a/PHP/Endpoint Examples/Multipart Payload/zip.php +++ b/PHP/Endpoint Examples/Multipart Payload/zip.php @@ -5,6 +5,14 @@ use GuzzleHttp\Psr7\Request; // Import the PSR-7 Request class. use GuzzleHttp\Psr7\Utils; // Import the PSR-7 Utils class for working with streams. +// By default, we use the US-based API service. This is the primary endpoint for global use. +$apiUrl = "https://api.pdfrest.com"; + +/* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work + */ +//$apiUrl "https://eu-api.pdfrest.com"; + $client = new Client(); $headers = [ 'Api-Key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' @@ -37,7 +45,7 @@ ] ]]; -$request = new Request('POST', 'https://api.pdfrest.com/zip', $headers); // Create a new HTTP POST request with the API endpoint and headers. +$request = new Request('POST', $apiUrl.'/zip', $headers); // Create a new HTTP POST request with the API endpoint and headers. $res = $client->sendAsync($request, $options)->wait(); // Send the asynchronous request and wait for the response. From 0642a2e195e0a93311fe194c0a2e9d3c7955481c Mon Sep 17 00:00:00 2001 From: Taylor Smith Date: Wed, 10 Sep 2025 14:05:06 -0500 Subject: [PATCH 05/11] Add eu/gdpr comment to Python samples --- .../decrypt-add-reencrypt.py | 13 ++++++++++--- .../merge-different-file-types.py | 11 +++++++++-- .../ocr-with-extract-text.py | 13 ++++++++++--- .../pdfa-3b-with-attachment.py | 11 +++++++++-- .../preserve-word-document.py | 11 +++++++++-- .../protected-watermark.py | 11 +++++++++-- .../redact-preview-and-finalize.py | 11 +++++++++-- .../JSON Payload/batch-delete.py | 9 ++++++++- Python/Endpoint Examples/JSON Payload/bmp.py | 11 +++++++++-- .../JSON Payload/compressed-pdf.py | 11 +++++++++-- .../JSON Payload/decrypted-pdf.py | 19 +++++++++++++------ .../JSON Payload/delete-resource.py | 9 ++++++++- .../JSON Payload/encrypted-pdf.py | 19 +++++++++++++------ .../Endpoint Examples/JSON Payload/excel.py | 11 +++++++++-- .../JSON Payload/exported-form-data.py | 11 +++++++++-- .../JSON Payload/extracted-images.py | 11 +++++++++-- .../JSON Payload/extracted-text.py | 11 +++++++++-- .../JSON Payload/flattened-annotations-pdf.py | 11 +++++++++-- .../JSON Payload/flattened-forms-pdf.py | 11 +++++++++-- .../JSON Payload/flattened-layers-pdf.py | 11 +++++++++-- .../flattened-transparencies-pdf.py | 11 +++++++++-- .../JSON Payload/get-resource.py | 11 +++++++++-- Python/Endpoint Examples/JSON Payload/gif.py | 11 +++++++++-- Python/Endpoint Examples/JSON Payload/jpg.py | 11 +++++++++-- .../JSON Payload/linearized-pdf.py | 11 +++++++++-- .../JSON Payload/markdown.py | 13 ++++++++++--- .../JSON Payload/merged-pdf.py | 13 ++++++++++--- .../JSON Payload/pdf-with-added-text.py | 11 +++++++++-- .../JSON Payload/pdf-with-converted-colors.py | 11 +++++++++-- .../pdf-with-imported-form-data.py | 13 ++++++++++--- .../JSON Payload/pdf-with-ocr-text.py | 11 +++++++++-- .../JSON Payload/pdf-with-page-boxes-set.py | 11 +++++++++-- .../pdf-with-redacted-text-applied.py | 19 +++++++++++++------ .../pdf-with-redacted-text-preview.py | 19 +++++++++++++------ Python/Endpoint Examples/JSON Payload/pdf.py | 11 +++++++++-- Python/Endpoint Examples/JSON Payload/pdfa.py | 11 +++++++++-- Python/Endpoint Examples/JSON Payload/pdfx.py | 11 +++++++++-- Python/Endpoint Examples/JSON Payload/png.py | 11 +++++++++-- .../JSON Payload/powerpoint.py | 11 +++++++++-- .../JSON Payload/rasterized-pdf.py | 11 +++++++++-- .../JSON Payload/restricted-pdf.py | 19 +++++++++++++------ .../JSON Payload/signed-pdf-non-pfx.py | 11 +++++++++-- .../JSON Payload/signed-pdf.py | 11 +++++++++-- .../JSON Payload/split-pdf.py | 11 +++++++++-- Python/Endpoint Examples/JSON Payload/tif.py | 11 +++++++++-- .../JSON Payload/unrestricted-pdf.py | 19 +++++++++++++------ .../Endpoint Examples/JSON Payload/unzip.py | 11 +++++++++-- .../JSON Payload/up-toolkit.py | 7 +++++++ .../Endpoint Examples/JSON Payload/upload.py | 9 ++++++++- .../JSON Payload/watermarked-pdf.py | 19 +++++++++++++------ Python/Endpoint Examples/JSON Payload/word.py | 11 +++++++++-- Python/Endpoint Examples/JSON Payload/zip.py | 13 ++++++++++--- .../Multipart Payload/batch-delete.py | 9 ++++++++- .../Multipart Payload/bmp.py | 9 ++++++++- .../Multipart Payload/compressed-pdf.py | 9 ++++++++- .../Multipart Payload/decrypted-pdf.py | 17 ++++++++++++----- .../Multipart Payload/delete-resource.py | 9 ++++++++- .../Multipart Payload/encrypted-pdf.py | 17 ++++++++++++----- .../Multipart Payload/excel.py | 9 ++++++++- .../Multipart Payload/exported-form-data.py | 9 ++++++++- .../Multipart Payload/extracted-images.py | 9 ++++++++- .../Multipart Payload/extracted-text.py | 9 ++++++++- .../flattened-annotations-pdf.py | 9 ++++++++- .../Multipart Payload/flattened-forms-pdf.py | 9 ++++++++- .../Multipart Payload/flattened-layers-pdf.py | 9 ++++++++- .../flattened-transparencies-pdf.py | 9 ++++++++- .../Multipart Payload/get-resource.py | 11 +++++++++-- .../Multipart Payload/gif.py | 9 ++++++++- .../Multipart Payload/html.py | 9 ++++++++- .../Multipart Payload/jpg.py | 9 ++++++++- .../Multipart Payload/linearized-pdf.py | 9 ++++++++- .../Multipart Payload/markdown.py | 11 +++++++++-- .../Multipart Payload/merged-pdf.py | 9 ++++++++- .../Multipart Payload/pdf-info.py | 9 ++++++++- .../Multipart Payload/pdf-with-acroforms.py | 9 ++++++++- .../pdf-with-added-attachment.py | 9 ++++++++- .../Multipart Payload/pdf-with-added-image.py | 9 ++++++++- .../Multipart Payload/pdf-with-added-text.py | 9 ++++++++- .../pdf-with-converted-colors.py | 9 ++++++++- .../pdf-with-imported-form-data.py | 9 ++++++++- .../Multipart Payload/pdf-with-ocr-text.py | 9 ++++++++- .../pdf-with-page-boxes-set.py | 9 ++++++++- .../pdf-with-redacted-text-applied.py | 17 ++++++++++++----- .../pdf-with-redacted-text-preview.py | 17 ++++++++++++----- .../Multipart Payload/pdf.py | 9 ++++++++- .../Multipart Payload/pdfa.py | 9 ++++++++- .../Multipart Payload/pdfx.py | 9 ++++++++- .../Multipart Payload/png.py | 9 ++++++++- .../Multipart Payload/powerpoint.py | 9 ++++++++- .../Multipart Payload/rasterized-pdf.py | 9 ++++++++- .../Multipart Payload/request-status.py | 13 ++++++++++--- .../Multipart Payload/restricted-pdf.py | 17 ++++++++++++----- .../Multipart Payload/signed-pdf-non-pfx.py | 9 ++++++++- .../Multipart Payload/signed-pdf.py | 9 ++++++++- .../Multipart Payload/split-pdf.py | 9 ++++++++- .../Multipart Payload/tif.py | 9 ++++++++- .../Multipart Payload/unrestricted-pdf.py | 17 ++++++++++++----- .../Multipart Payload/unzip.py | 9 ++++++++- .../Multipart Payload/up-toolkit.py | 9 ++++++++- .../Multipart Payload/upload.py | 9 ++++++++- .../Multipart Payload/watermarked-pdf.py | 17 ++++++++++++----- .../Multipart Payload/word.py | 9 ++++++++- .../Multipart Payload/zip.py | 9 ++++++++- 103 files changed, 937 insertions(+), 216 deletions(-) diff --git a/Python/Complex Flow Examples/decrypt-add-reencrypt.py b/Python/Complex Flow Examples/decrypt-add-reencrypt.py index 324ceb1e..3821cd84 100644 --- a/Python/Complex Flow Examples/decrypt-add-reencrypt.py +++ b/Python/Complex Flow Examples/decrypt-add-reencrypt.py @@ -10,9 +10,16 @@ # and then sending the output with the new image through /encrypted-pdf to # lock it up again. +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + api_key = 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # place your api key here -decrypted_pdf_endpoint_url = 'https://api.pdfrest.com/decrypted-pdf' +decrypted_pdf_endpoint_url = api_url+'/decrypted-pdf' mp_encoder_decryptedPdf = MultipartEncoder( fields={ @@ -37,7 +44,7 @@ decrypted_id = response_json["outputId"] - pdf_with_added_image_endpoint_url = 'https://api.pdfrest.com/pdf-with-added-image' + pdf_with_added_image_endpoint_url = api_url+'/pdf-with-added-image' mp_encoder_pdfWithAddedImage = MultipartEncoder( fields={ @@ -64,7 +71,7 @@ response_json = response.json() added_image_id = response_json["outputId"] - encrypted_pdf_endpoint_url = 'https://api.pdfrest.com/encrypted-pdf' + encrypted_pdf_endpoint_url = api_url+'/encrypted-pdf' mp_encoder_encryptedPdf = MultipartEncoder( fields={ diff --git a/Python/Complex Flow Examples/merge-different-file-types.py b/Python/Complex Flow Examples/merge-different-file-types.py index 1dd98f29..cc6623e0 100644 --- a/Python/Complex Flow Examples/merge-different-file-types.py +++ b/Python/Complex Flow Examples/merge-different-file-types.py @@ -14,9 +14,16 @@ # this sample could be easily used to convert and combine any two file types # that the /pdf route takes as inputs. +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + api_key = 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # place your api key here -pdf_endpoint_url = 'https://api.pdfrest.com/pdf' +pdf_endpoint_url = api_url+'/pdf' mp_encoder_image_pdf = MultipartEncoder( fields={ 'file': ('file_name.png', open('/path/to/file.png', 'rb'), 'image/png'), @@ -65,7 +72,7 @@ ppt_id = response_json["outputId"] print("Got the second output ID: " + image_id) - merged_pdf_endpoint_url = 'https://api.pdfrest.com/merged-pdf' + merged_pdf_endpoint_url = api_url+'/merged-pdf' merge_request_data = [('id', image_id), ('pages', '1-last'), ('type', 'id'), ('id', ppt_id), ('pages', '1-last'), ('type', 'id'), ('output', 'multiple_file_types')] mp_encoder_merge = MultipartEncoder( diff --git a/Python/Complex Flow Examples/ocr-with-extract-text.py b/Python/Complex Flow Examples/ocr-with-extract-text.py index 3f80b82b..eca01b66 100644 --- a/Python/Complex Flow Examples/ocr-with-extract-text.py +++ b/Python/Complex Flow Examples/ocr-with-extract-text.py @@ -10,9 +10,16 @@ # output ID. Then, we will send the output ID to the /extracted-text route, which will # return the newly added text. +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + api_key = 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # place your api key here -ocr_endpoint_url = 'https://api.pdfrest.com/pdf-with-ocr-text' +ocr_endpoint_url = api_url+'/pdf-with-ocr-text' mp_encoder_pdf = MultipartEncoder( fields={ 'file': ('file_name.pdf', open('/path/to/file.pdf', 'rb'), 'application/pdf'), @@ -36,7 +43,7 @@ ocr_pdf_id = response_json["outputId"] print("Got the output ID: " + ocr_pdf_id) - extract_endpoint_url = 'https://api.pdfrest.com/extracted-text' + extract_endpoint_url = api_url+'/extracted-text' mp_encoder_extract_text = MultipartEncoder( fields={ @@ -64,4 +71,4 @@ else: - print(response.text) \ No newline at end of file + print(response.text) diff --git a/Python/Complex Flow Examples/pdfa-3b-with-attachment.py b/Python/Complex Flow Examples/pdfa-3b-with-attachment.py index c9dcc6c8..da0f54e9 100644 --- a/Python/Complex Flow Examples/pdfa-3b-with-attachment.py +++ b/Python/Complex Flow Examples/pdfa-3b-with-attachment.py @@ -11,9 +11,16 @@ # Note that there is nothing special about attaching an xml file, and any appropriate # file may be attached and wrapped into the PDF/A conversion. +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + api_key = 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # place your api key here -pdf_with_added_attachment_endpoint_url = 'https://api.pdfrest.com/pdf-with-added-attachment' +pdf_with_added_attachment_endpoint_url = api_url+'/pdf-with-added-attachment' mp_encoder_pdfWithAddedAttachment = MultipartEncoder( fields={ @@ -38,7 +45,7 @@ response_json = response.json() pdfWithAddedAttachment_id = response_json["outputId"] - pdfa_endpoint_url = 'https://api.pdfrest.com/pdfa' + pdfa_endpoint_url = api_url+'/pdfa' mp_encoder_pdfa = MultipartEncoder( fields={ diff --git a/Python/Complex Flow Examples/preserve-word-document.py b/Python/Complex Flow Examples/preserve-word-document.py index 541af595..c9b8a83c 100644 --- a/Python/Complex Flow Examples/preserve-word-document.py +++ b/Python/Complex Flow Examples/preserve-word-document.py @@ -8,9 +8,16 @@ # a PDF with a call to the /pdf route. Then, we will take that converted PDF # and convert it to the PDF/A format for long-term storage. +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + api_key = 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # place your api key here -pdf_endpoint_url = 'https://api.pdfrest.com/pdf' +pdf_endpoint_url = api_url+'/pdf' mp_encoder_pdf = MultipartEncoder( fields={ @@ -34,7 +41,7 @@ pdf_id = response_json["outputId"] - pdfa_endpoint_url = 'https://api.pdfrest.com/pdfa' + pdfa_endpoint_url = api_url+'/pdfa' mp_encoder_pdfa = MultipartEncoder( fields={ diff --git a/Python/Complex Flow Examples/protected-watermark.py b/Python/Complex Flow Examples/protected-watermark.py index fd058b54..ccc2f00a 100644 --- a/Python/Complex Flow Examples/protected-watermark.py +++ b/Python/Complex Flow Examples/protected-watermark.py @@ -9,9 +9,16 @@ # We will be running the input file through /watermarked-pdf to apply the watermark # and then /restricted-pdf to lock the watermark in. +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + api_key = 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # place your api key here -watermarked_pdf_endpoint_url = 'https://api.pdfrest.com/watermarked-pdf' +watermarked_pdf_endpoint_url = api_url+'/watermarked-pdf' mp_encoder_watermarkedPDF = MultipartEncoder( fields={ @@ -36,7 +43,7 @@ watermarked_id = response_json["outputId"] - restricted_pdf_endpoint_url = 'https://api.pdfrest.com/restricted-pdf' + restricted_pdf_endpoint_url = api_url+'/restricted-pdf' mp_encoder_restrictedPdf = MultipartEncoder( fields=[ diff --git a/Python/Complex Flow Examples/redact-preview-and-finalize.py b/Python/Complex Flow Examples/redact-preview-and-finalize.py index c6e2a844..8ee900b6 100644 --- a/Python/Complex Flow Examples/redact-preview-and-finalize.py +++ b/Python/Complex Flow Examples/redact-preview-and-finalize.py @@ -8,9 +8,16 @@ # the preview stage before utilizing this workflow to ensure that content is # redacted as intended. +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + api_key = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # place your api key here -pdf_endpoint_url = 'https://api.pdfrest.com/pdf-with-redacted-text-preview' +pdf_endpoint_url = api_url+'/pdf-with-redacted-text-preview' redaction_options = [ { @@ -43,7 +50,7 @@ pdf_id = response_json["outputId"] - applied_endpoint_url = 'https://api.pdfrest.com/pdf-with-redacted-text-applied' + applied_endpoint_url = api_url+'/pdf-with-redacted-text-applied' mp_encoder_applied = MultipartEncoder( fields={ diff --git a/Python/Endpoint Examples/JSON Payload/batch-delete.py b/Python/Endpoint Examples/JSON Payload/batch-delete.py index 3eca985a..387e8d33 100644 --- a/Python/Endpoint Examples/JSON Payload/batch-delete.py +++ b/Python/Endpoint Examples/JSON Payload/batch-delete.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + delete_data = { "ids" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } print("Processing files...") -delete_response = requests.post(url='https://api.pdfrest.com/delete', +delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/bmp.py b/Python/Endpoint Examples/JSON Payload/bmp.py index 38fc76b4..977caf5c 100644 --- a/Python/Endpoint Examples/JSON Payload/bmp.py +++ b/Python/Endpoint Examples/JSON Payload/bmp.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - bmp_response = requests.post(url='https://api.pdfrest.com/bmp', + bmp_response = requests.post(url=api_url+'/bmp', data=json.dumps(bmp_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/compressed-pdf.py b/Python/Endpoint Examples/JSON Payload/compressed-pdf.py index 435ae471..c537ebf6 100644 --- a/Python/Endpoint Examples/JSON Payload/compressed-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/compressed-pdf.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - compress_response = requests.post(url='https://api.pdfrest.com/compressed-pdf', + compress_response = requests.post(url=api_url+'/compressed-pdf', data=json.dumps(compress_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/decrypted-pdf.py b/Python/Endpoint Examples/JSON Payload/decrypted-pdf.py index 8dedd598..d3081e86 100644 --- a/Python/Endpoint Examples/JSON Payload/decrypted-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/decrypted-pdf.py @@ -1,6 +1,13 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Toggle deletion of sensitive files (default: False) DELETE_SENSITIVE_FILES = False @@ -8,7 +15,7 @@ upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -25,7 +32,7 @@ print("Processing file...") - decrypt_response = requests.post(url='https://api.pdfrest.com/decrypted-pdf', + decrypt_response = requests.post(url=api_url+'/decrypted-pdf', data=json.dumps(decrypt_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -36,9 +43,9 @@ decrypt_response_json = decrypt_response.json() print(json.dumps(decrypt_response_json, indent = 2)) - # All files uploaded or generated are automatically deleted based on the - # File Retention Period as shown on https://pdfrest.com/pricing. - # For immediate deletion of files, particularly when sensitive data + # All files uploaded or generated are automatically deleted based on the + # File Retention Period as shown on https://pdfrest.com/pricing. + # For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # # Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -46,7 +53,7 @@ if DELETE_SENSITIVE_FILES: result_id = decrypt_response_json['outputId'] delete_data = { "ids": f"{uploaded_id}, {result_id}" } - delete_response = requests.post(url='https://api.pdfrest.com/delete', + delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) print(json.dumps(delete_response.json(), indent = 2)) diff --git a/Python/Endpoint Examples/JSON Payload/delete-resource.py b/Python/Endpoint Examples/JSON Payload/delete-resource.py index cdefb36e..9134d70e 100644 --- a/Python/Endpoint Examples/JSON Payload/delete-resource.py +++ b/Python/Endpoint Examples/JSON Payload/delete-resource.py @@ -1,6 +1,13 @@ import requests -url = "https://api.pdfrest.com/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +url = f"{api_url}/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" payload = {} headers = { diff --git a/Python/Endpoint Examples/JSON Payload/encrypted-pdf.py b/Python/Endpoint Examples/JSON Payload/encrypted-pdf.py index 5e1f3c05..c132f4ad 100644 --- a/Python/Endpoint Examples/JSON Payload/encrypted-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/encrypted-pdf.py @@ -1,6 +1,13 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Toggle deletion of sensitive files (default: False) DELETE_SENSITIVE_FILES = False @@ -8,7 +15,7 @@ upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -24,7 +31,7 @@ print(json.dumps(encrypt_data, indent = 2)) print("Processing file...") - encrypt_response = requests.post(url='https://api.pdfrest.com/encrypted-pdf', + encrypt_response = requests.post(url=api_url+'/encrypted-pdf', data=json.dumps(encrypt_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -35,9 +42,9 @@ encrypt_response_json = encrypt_response.json() print(json.dumps(encrypt_response_json, indent = 2)) - # All files uploaded or generated are automatically deleted based on the - # File Retention Period as shown on https://pdfrest.com/pricing. - # For immediate deletion of files, particularly when sensitive data + # All files uploaded or generated are automatically deleted based on the + # File Retention Period as shown on https://pdfrest.com/pricing. + # For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # # Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -45,7 +52,7 @@ if DELETE_SENSITIVE_FILES: encrypted_output_id = encrypt_response_json['outputId'] delete_data = { "ids": f"{uploaded_id}, {encrypted_output_id}" } - delete_response = requests.post(url='https://api.pdfrest.com/delete', + delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) if delete_response.ok: diff --git a/Python/Endpoint Examples/JSON Payload/excel.py b/Python/Endpoint Examples/JSON Payload/excel.py index 92512a37..a1a64db6 100644 --- a/Python/Endpoint Examples/JSON Payload/excel.py +++ b/Python/Endpoint Examples/JSON Payload/excel.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - excel_response = requests.post(url='https://api.pdfrest.com/excel', + excel_response = requests.post(url=api_url+'/excel', data=json.dumps(excel_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/exported-form-data.py b/Python/Endpoint Examples/JSON Payload/exported-form-data.py index d534d531..45faef62 100644 --- a/Python/Endpoint Examples/JSON Payload/exported-form-data.py +++ b/Python/Endpoint Examples/JSON Payload/exported-form-data.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - export_response = requests.post(url='https://api.pdfrest.com/exported-form-data', + export_response = requests.post(url=api_url+'/exported-form-data', data=json.dumps(export_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/extracted-images.py b/Python/Endpoint Examples/JSON Payload/extracted-images.py index 20355bba..720f6b51 100644 --- a/Python/Endpoint Examples/JSON Payload/extracted-images.py +++ b/Python/Endpoint Examples/JSON Payload/extracted-images.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - extract_response = requests.post(url='https://api.pdfrest.com/extracted-images', + extract_response = requests.post(url=api_url+'/extracted-images', data=json.dumps(extract_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/extracted-text.py b/Python/Endpoint Examples/JSON Payload/extracted-text.py index 56f40961..2bfcc7b2 100644 --- a/Python/Endpoint Examples/JSON Payload/extracted-text.py +++ b/Python/Endpoint Examples/JSON Payload/extracted-text.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - extract_response = requests.post(url='https://api.pdfrest.com/extracted-text', + extract_response = requests.post(url=api_url+'/extracted-text', data=json.dumps(extract_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/flattened-annotations-pdf.py b/Python/Endpoint Examples/JSON Payload/flattened-annotations-pdf.py index e9890c8e..3699ae73 100644 --- a/Python/Endpoint Examples/JSON Payload/flattened-annotations-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/flattened-annotations-pdf.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - flatten_response = requests.post(url='https://api.pdfrest.com/flattened-annotations-pdf', + flatten_response = requests.post(url=api_url+'/flattened-annotations-pdf', data=json.dumps(flatten_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/flattened-forms-pdf.py b/Python/Endpoint Examples/JSON Payload/flattened-forms-pdf.py index 0e8df489..54ef6b9b 100644 --- a/Python/Endpoint Examples/JSON Payload/flattened-forms-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/flattened-forms-pdf.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - flatten_response = requests.post(url='https://api.pdfrest.com/flattened-forms-pdf', + flatten_response = requests.post(url=api_url+'/flattened-forms-pdf', data=json.dumps(flatten_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/flattened-layers-pdf.py b/Python/Endpoint Examples/JSON Payload/flattened-layers-pdf.py index 1eed1b10..540f5458 100644 --- a/Python/Endpoint Examples/JSON Payload/flattened-layers-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/flattened-layers-pdf.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - flatten_response = requests.post(url='https://api.pdfrest.com/flattened-layers-pdf', + flatten_response = requests.post(url=api_url+'/flattened-layers-pdf', data=json.dumps(flatten_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.py b/Python/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.py index 8d73b717..076597df 100644 --- a/Python/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - flatten_response = requests.post(url='https://api.pdfrest.com/flattened-transparencies-pdf', + flatten_response = requests.post(url=api_url+'/flattened-transparencies-pdf', data=json.dumps(flatten_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/get-resource.py b/Python/Endpoint Examples/JSON Payload/get-resource.py index 35ae3ab2..9eba381d 100644 --- a/Python/Endpoint Examples/JSON Payload/get-resource.py +++ b/Python/Endpoint Examples/JSON Payload/get-resource.py @@ -1,15 +1,22 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Resource UUIDs can be found in the JSON response of POST requests as "outputId". Resource UUIDs usually look like this: '0950b9bdf-0465-4d3f-8ea3-d2894f1ae839'. id = 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # place resource uuid here -# The response format can be 'file' or 'url'. +# The response format can be 'file' or 'url'. # If 'url', then JSON containing the url of the resource file is returned. # If 'file', then the file itself is returned. format = 'file' -resource_url = f"https://api.pdfrest.com/resource/{id}?format={format}" +resource_url = f"{api_url}/resource/{id}?format={format}" print("Sending GET request to /resource/{id} endpoint...") response = requests.get(resource_url) diff --git a/Python/Endpoint Examples/JSON Payload/gif.py b/Python/Endpoint Examples/JSON Payload/gif.py index dbd0eb23..6f8e47c6 100644 --- a/Python/Endpoint Examples/JSON Payload/gif.py +++ b/Python/Endpoint Examples/JSON Payload/gif.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - gif_response = requests.post(url='https://api.pdfrest.com/gif', + gif_response = requests.post(url=api_url+'/gif', data=json.dumps(gif_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/jpg.py b/Python/Endpoint Examples/JSON Payload/jpg.py index 8c58ad1b..9c94b147 100644 --- a/Python/Endpoint Examples/JSON Payload/jpg.py +++ b/Python/Endpoint Examples/JSON Payload/jpg.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - jpg_response = requests.post(url='https://api.pdfrest.com/jpg', + jpg_response = requests.post(url=api_url+'/jpg', data=json.dumps(jpg_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/linearized-pdf.py b/Python/Endpoint Examples/JSON Payload/linearized-pdf.py index 97cb2232..24c2418e 100644 --- a/Python/Endpoint Examples/JSON Payload/linearized-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/linearized-pdf.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - linearize_response = requests.post(url='https://api.pdfrest.com/linearized-pdf', + linearize_response = requests.post(url=api_url+'/linearized-pdf', data=json.dumps(linearize_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/markdown.py b/Python/Endpoint Examples/JSON Payload/markdown.py index 630b5008..171c5107 100644 --- a/Python/Endpoint Examples/JSON Payload/markdown.py +++ b/Python/Endpoint Examples/JSON Payload/markdown.py @@ -1,12 +1,19 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") upload_response = requests.post( - url='https://api.pdfrest.com/upload', + url=api_url+'/upload', data=upload_data, headers={ 'Content-Type': 'application/octet-stream', @@ -27,7 +34,7 @@ print("Processing file...") markdown_response = requests.post( - url='https://api.pdfrest.com/markdown', + url=api_url+'/markdown', data=json.dumps(markdown_data), headers={ 'Content-Type': 'application/json', @@ -42,4 +49,4 @@ else: print(markdown_response.text) else: - print(upload_response.text) \ No newline at end of file + print(upload_response.text) diff --git a/Python/Endpoint Examples/JSON Payload/merged-pdf.py b/Python/Endpoint Examples/JSON Payload/merged-pdf.py index 20c08195..9dc6302a 100644 --- a/Python/Endpoint Examples/JSON Payload/merged-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/merged-pdf.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/first_file', 'rb') as f: upload_first_file_data = f.read() print("Uploading first PDF file...") -upload_first_file_response = requests.post(url='https://api.pdfrest.com/upload', +upload_first_file_response = requests.post(url=api_url+'/upload', data=upload_first_file_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'first_file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -16,7 +23,7 @@ upload_second_file_data = f.read() print("Uploading second PDF file...") -upload_second_file_response = requests.post(url='https://api.pdfrest.com/upload', +upload_second_file_response = requests.post(url=api_url+'/upload', data=upload_second_file_data , headers={'Content-Type': 'application/octet-stream', 'content-filename': 'second_file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -37,7 +44,7 @@ print("Processing file...") - merge_response = requests.post(url='https://api.pdfrest.com/merged-pdf', + merge_response = requests.post(url=api_url+'/merged-pdf', data=json.dumps(merge_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/pdf-with-added-text.py b/Python/Endpoint Examples/JSON Payload/pdf-with-added-text.py index 52af194a..96e40c4b 100644 --- a/Python/Endpoint Examples/JSON Payload/pdf-with-added-text.py +++ b/Python/Endpoint Examples/JSON Payload/pdf-with-added-text.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -35,7 +42,7 @@ print("Processing file...") - add_text_response = requests.post(url='https://api.pdfrest.com/pdf-with-added-text', + add_text_response = requests.post(url=api_url+'/pdf-with-added-text', data=json.dumps(add_text_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/pdf-with-converted-colors.py b/Python/Endpoint Examples/JSON Payload/pdf-with-converted-colors.py index 1704dc6e..aa2241b9 100644 --- a/Python/Endpoint Examples/JSON Payload/pdf-with-converted-colors.py +++ b/Python/Endpoint Examples/JSON Payload/pdf-with-converted-colors.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - convert_colors_response = requests.post(url='https://api.pdfrest.com/pdf-with-converted-colors', + convert_colors_response = requests.post(url=api_url+'/pdf-with-converted-colors', data=json.dumps(convert_colors_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.py b/Python/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.py index 0c63b0a9..85036177 100644 --- a/Python/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.py +++ b/Python/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/pdf_file', 'rb') as f: upload_pdf_data = f.read() print("Uploading PDF file...") -upload_pdf_response = requests.post(url='https://api.pdfrest.com/upload', +upload_pdf_response = requests.post(url=api_url+'/upload', data=upload_pdf_data, headers={'Content-Type': 'application/octet-stream', 'content-filename': 'pdf_file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -16,7 +23,7 @@ upload_data_data = f.read() print("Uploading data file...") -upload_data_response = requests.post(url='https://api.pdfrest.com/upload', +upload_data_response = requests.post(url=api_url+'/upload', data=upload_data_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'data_file.xml', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -37,7 +44,7 @@ print("Processing file...") - added_image_response = requests.post(url='https://api.pdfrest.com/pdf-with-imported-form-data', + added_image_response = requests.post(url=api_url+'/pdf-with-imported-form-data', data=json.dumps(added_image_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/pdf-with-ocr-text.py b/Python/Endpoint Examples/JSON Payload/pdf-with-ocr-text.py index cb48f00a..2712d9d2 100644 --- a/Python/Endpoint Examples/JSON Payload/pdf-with-ocr-text.py +++ b/Python/Endpoint Examples/JSON Payload/pdf-with-ocr-text.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - pdf_with_ocr_text_response = requests.post(url='https://api.pdfrest.com/pdf-with-ocr-text', + pdf_with_ocr_text_response = requests.post(url=api_url+'/pdf-with-ocr-text', data=json.dumps(pdf_with_ocr_text_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.py b/Python/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.py index c706e44e..007e2d3c 100644 --- a/Python/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.py +++ b/Python/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -39,7 +46,7 @@ print("Processing file...") - boxes_response = requests.post(url='https://api.pdfrest.com/pdf-with-page-boxes-set', + boxes_response = requests.post(url=api_url+'/pdf-with-page-boxes-set', data=json.dumps(boxes_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.py b/Python/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.py index 8ff00ec6..6cdb6bfe 100644 --- a/Python/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.py +++ b/Python/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.py @@ -1,6 +1,13 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Toggle deletion of sensitive files (default: False) DELETE_SENSITIVE_FILES = False @@ -8,7 +15,7 @@ upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -25,7 +32,7 @@ print("Processing file...") - pdf_with_redacted_text_response = requests.post(url='https://api.pdfrest.com/pdf-with-redacted-text-applied', + pdf_with_redacted_text_response = requests.post(url=api_url+'/pdf-with-redacted-text-applied', data=json.dumps(pdf_with_redacted_text_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -36,9 +43,9 @@ pdf_with_redacted_text_response_json = pdf_with_redacted_text_response.json() print(json.dumps(pdf_with_redacted_text_response_json, indent = 2)) - # All files uploaded or generated are automatically deleted based on the - # File Retention Period as shown on https://pdfrest.com/pricing. - # For immediate deletion of files, particularly when sensitive data + # All files uploaded or generated are automatically deleted based on the + # File Retention Period as shown on https://pdfrest.com/pricing. + # For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # # Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -46,7 +53,7 @@ if DELETE_SENSITIVE_FILES: redacted_output_id = pdf_with_redacted_text_response_json['outputId'] delete_data = { "ids": f"{uploaded_id}, {redacted_output_id}" } - delete_response = requests.post(url='https://api.pdfrest.com/delete', + delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) if delete_response.ok: diff --git a/Python/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.py b/Python/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.py index 682da527..b9fb676c 100644 --- a/Python/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.py +++ b/Python/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.py @@ -1,6 +1,13 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Toggle deletion of sensitive files (default: False) DELETE_SENSITIVE_FILES = False @@ -8,7 +15,7 @@ upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -38,7 +45,7 @@ print("Processing file...") - redact_text_response = requests.post(url='https://api.pdfrest.com/pdf-with-redacted-text-preview', + redact_text_response = requests.post(url=api_url+'/pdf-with-redacted-text-preview', data=json.dumps(redact_text_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -49,9 +56,9 @@ redact_text_response_json = redact_text_response.json() print(json.dumps(redact_text_response_json, indent = 2)) - # All files uploaded or generated are automatically deleted based on the - # File Retention Period as shown on https://pdfrest.com/pricing. - # For immediate deletion of files, particularly when sensitive data + # All files uploaded or generated are automatically deleted based on the + # File Retention Period as shown on https://pdfrest.com/pricing. + # For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # # Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -61,7 +68,7 @@ preview_id = redact_text_response_json['outputId'] if DELETE_SENSITIVE_FILES: delete_data = { "ids": uploaded_id + ", " + preview_id } - delete_response = requests.post(url='https://api.pdfrest.com/delete', + delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) if delete_response.ok: diff --git a/Python/Endpoint Examples/JSON Payload/pdf.py b/Python/Endpoint Examples/JSON Payload/pdf.py index 90b7b9aa..d9b7d3bf 100644 --- a/Python/Endpoint Examples/JSON Payload/pdf.py +++ b/Python/Endpoint Examples/JSON Payload/pdf.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.png', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - pdf_response = requests.post(url='https://api.pdfrest.com/pdf', + pdf_response = requests.post(url=api_url+'/pdf', data=json.dumps(pdf_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/pdfa.py b/Python/Endpoint Examples/JSON Payload/pdfa.py index 238ae056..2d9baf92 100644 --- a/Python/Endpoint Examples/JSON Payload/pdfa.py +++ b/Python/Endpoint Examples/JSON Payload/pdfa.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - pdfa_response = requests.post(url='https://api.pdfrest.com/pdfa', + pdfa_response = requests.post(url=api_url+'/pdfa', data=json.dumps(pdfa_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/pdfx.py b/Python/Endpoint Examples/JSON Payload/pdfx.py index f6b84574..f3b5ccd1 100644 --- a/Python/Endpoint Examples/JSON Payload/pdfx.py +++ b/Python/Endpoint Examples/JSON Payload/pdfx.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - pdfx_response = requests.post(url='https://api.pdfrest.com/pdfx', + pdfx_response = requests.post(url=api_url+'/pdfx', data=json.dumps(pdfx_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/png.py b/Python/Endpoint Examples/JSON Payload/png.py index ba73bd7d..05bf5e50 100644 --- a/Python/Endpoint Examples/JSON Payload/png.py +++ b/Python/Endpoint Examples/JSON Payload/png.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - png_response = requests.post(url='https://api.pdfrest.com/png', + png_response = requests.post(url=api_url+'/png', data=json.dumps(png_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/powerpoint.py b/Python/Endpoint Examples/JSON Payload/powerpoint.py index 69b5989e..542e5a99 100644 --- a/Python/Endpoint Examples/JSON Payload/powerpoint.py +++ b/Python/Endpoint Examples/JSON Payload/powerpoint.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - powerpoint_response = requests.post(url='https://api.pdfrest.com/powerpoint', + powerpoint_response = requests.post(url=api_url+'/powerpoint', data=json.dumps(powerpoint_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/rasterized-pdf.py b/Python/Endpoint Examples/JSON Payload/rasterized-pdf.py index 01d63e37..f1300db3 100644 --- a/Python/Endpoint Examples/JSON Payload/rasterized-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/rasterized-pdf.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - rasterize_response = requests.post(url='https://api.pdfrest.com/rasterized-pdf', + rasterize_response = requests.post(url=api_url+'/rasterized-pdf', data=json.dumps(rasterize_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/restricted-pdf.py b/Python/Endpoint Examples/JSON Payload/restricted-pdf.py index e0b185c1..97014eed 100644 --- a/Python/Endpoint Examples/JSON Payload/restricted-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/restricted-pdf.py @@ -1,6 +1,13 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Toggle deletion of sensitive files (default: False) DELETE_SENSITIVE_FILES = False @@ -8,7 +15,7 @@ upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -26,7 +33,7 @@ print("Processing file...") - restrict_response = requests.post(url='https://api.pdfrest.com/restricted-pdf', + restrict_response = requests.post(url=api_url+'/restricted-pdf', data=json.dumps(restrict_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -37,9 +44,9 @@ restrict_response_json = restrict_response.json() print(json.dumps(restrict_response_json, indent = 2)) - # All files uploaded or generated are automatically deleted based on the - # File Retention Period as shown on https://pdfrest.com/pricing. - # For immediate deletion of files, particularly when sensitive data + # All files uploaded or generated are automatically deleted based on the + # File Retention Period as shown on https://pdfrest.com/pricing. + # For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # # Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -47,7 +54,7 @@ if DELETE_SENSITIVE_FILES: restricted_output_id = restrict_response_json['outputId'] delete_data = { "ids": f"{uploaded_id}, {restricted_output_id}" } - delete_response = requests.post(url='https://api.pdfrest.com/delete', + delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) if delete_response.ok: diff --git a/Python/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.py b/Python/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.py index 9ff1e7e9..6532dfa3 100644 --- a/Python/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.py +++ b/Python/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + def upload_file(file_path, file_name): with open(file_path, 'rb') as f: upload_data = f.read() print("Uploading file...") - upload_response = requests.post(url='https://api.pdfrest.com/upload', + upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': file_name, "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) print("Upload response status code: " + str(upload_response.status_code)) @@ -46,7 +53,7 @@ def upload_file(file_path, file_name): print("Processing file...") -boxes_response = requests.post(url='https://api.pdfrest.com/signed-pdf', +boxes_response = requests.post(url=api_url+'/signed-pdf', data=json.dumps(boxes_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/signed-pdf.py b/Python/Endpoint Examples/JSON Payload/signed-pdf.py index e8b18900..3795ecae 100644 --- a/Python/Endpoint Examples/JSON Payload/signed-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/signed-pdf.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + def upload_file(file_path, file_name): with open(file_path, 'rb') as f: upload_data = f.read() print("Uploading file...") - upload_response = requests.post(url='https://api.pdfrest.com/upload', + upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': file_name, "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) print("Upload response status code: " + str(upload_response.status_code)) @@ -55,7 +62,7 @@ def upload_file(file_path, file_name): print("Processing file...") -boxes_response = requests.post(url='https://api.pdfrest.com/signed-pdf', +boxes_response = requests.post(url=api_url+'/signed-pdf', data=json.dumps(boxes_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/split-pdf.py b/Python/Endpoint Examples/JSON Payload/split-pdf.py index f1240093..b633999a 100644 --- a/Python/Endpoint Examples/JSON Payload/split-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/split-pdf.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -23,7 +30,7 @@ print("Processing file...") - split_response = requests.post(url='https://api.pdfrest.com/split-pdf', + split_response = requests.post(url=api_url+'/split-pdf', data=json.dumps(split_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/tif.py b/Python/Endpoint Examples/JSON Payload/tif.py index 8d49dc56..ab9945c2 100644 --- a/Python/Endpoint Examples/JSON Payload/tif.py +++ b/Python/Endpoint Examples/JSON Payload/tif.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - tif_response = requests.post(url='https://api.pdfrest.com/tif', + tif_response = requests.post(url=api_url+'/tif', data=json.dumps(tif_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/unrestricted-pdf.py b/Python/Endpoint Examples/JSON Payload/unrestricted-pdf.py index df222bb8..0d7e27c5 100644 --- a/Python/Endpoint Examples/JSON Payload/unrestricted-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/unrestricted-pdf.py @@ -1,6 +1,13 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Toggle deletion of sensitive files (default: False) DELETE_SENSITIVE_FILES = False @@ -8,7 +15,7 @@ upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -26,7 +33,7 @@ print("Processing file...") - unrestrict_response = requests.post(url='https://api.pdfrest.com/unrestricted-pdf', + unrestrict_response = requests.post(url=api_url+'/unrestricted-pdf', data=json.dumps(unrestrict_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -37,9 +44,9 @@ unrestrict_response_json = unrestrict_response.json() print(json.dumps(unrestrict_response_json, indent = 2)) - # All files uploaded or generated are automatically deleted based on the - # File Retention Period as shown on https://pdfrest.com/pricing. - # For immediate deletion of files, particularly when sensitive data + # All files uploaded or generated are automatically deleted based on the + # File Retention Period as shown on https://pdfrest.com/pricing. + # For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # # Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -47,7 +54,7 @@ if DELETE_SENSITIVE_FILES: result_id = unrestrict_response_json['outputId'] delete_data = { "ids": f"{uploaded_id}, {result_id}" } - delete_response = requests.post(url='https://api.pdfrest.com/delete', + delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) print(json.dumps(delete_response.json(), indent = 2)) diff --git a/Python/Endpoint Examples/JSON Payload/unzip.py b/Python/Endpoint Examples/JSON Payload/unzip.py index 74b26683..dddbc7ae 100644 --- a/Python/Endpoint Examples/JSON Payload/unzip.py +++ b/Python/Endpoint Examples/JSON Payload/unzip.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read()aaa print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.zip', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - unzip_response = requests.post(url='https://api.pdfrest.com/unzip', + unzip_response = requests.post(url=api_url+'/unzip', data=json.dumps(unzip_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/up-toolkit.py b/Python/Endpoint Examples/JSON Payload/up-toolkit.py index ba27e235..f5e0a854 100644 --- a/Python/Endpoint Examples/JSON Payload/up-toolkit.py +++ b/Python/Endpoint Examples/JSON Payload/up-toolkit.py @@ -1,6 +1,13 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +up_url = f"https://api.pdfrest.com/up-toolkit" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#up_url = f"https://eu-api.pdfrest.com/up-toolkit" + # up-forms and up-office can be used to query the other tools up_url = f"https://api.pdfrest.com/up-toolkit" diff --git a/Python/Endpoint Examples/JSON Payload/upload.py b/Python/Endpoint Examples/JSON Payload/upload.py index fc1a72fe..c72691f7 100644 --- a/Python/Endpoint Examples/JSON Payload/upload.py +++ b/Python/Endpoint Examples/JSON Payload/upload.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/watermarked-pdf.py b/Python/Endpoint Examples/JSON Payload/watermarked-pdf.py index aaf56e26..a20a982c 100644 --- a/Python/Endpoint Examples/JSON Payload/watermarked-pdf.py +++ b/Python/Endpoint Examples/JSON Payload/watermarked-pdf.py @@ -1,6 +1,13 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Toggle deletion of sensitive files (default: False) DELETE_SENSITIVE_FILES = False @@ -8,7 +15,7 @@ upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -26,7 +33,7 @@ print("Processing file...") - watermark_response = requests.post(url='https://api.pdfrest.com/watermarked-pdf', + watermark_response = requests.post(url=api_url+'/watermarked-pdf', data=json.dumps(watermark_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -37,9 +44,9 @@ watermark_response_json = watermark_response.json() print(json.dumps(watermark_response_json, indent = 2)) - # All files uploaded or generated are automatically deleted based on the - # File Retention Period as shown on https://pdfrest.com/pricing. - # For immediate deletion of files, particularly when sensitive data + # All files uploaded or generated are automatically deleted based on the + # File Retention Period as shown on https://pdfrest.com/pricing. + # For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # # Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -47,7 +54,7 @@ if DELETE_SENSITIVE_FILES: watermarked_output_id = watermark_response_json['outputId'] delete_data = { "ids": f"{uploaded_id}, {watermarked_output_id}" } - delete_response = requests.post(url='https://api.pdfrest.com/delete', + delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) if delete_response.ok: diff --git a/Python/Endpoint Examples/JSON Payload/word.py b/Python/Endpoint Examples/JSON Payload/word.py index f31e6247..db72e0eb 100644 --- a/Python/Endpoint Examples/JSON Payload/word.py +++ b/Python/Endpoint Examples/JSON Payload/word.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/file', 'rb') as f: upload_data = f.read() print("Uploading file...") -upload_response = requests.post(url='https://api.pdfrest.com/upload', +upload_response = requests.post(url=api_url+'/upload', data=upload_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'file.pdf', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -22,7 +29,7 @@ print("Processing file...") - word_response = requests.post(url='https://api.pdfrest.com/word', + word_response = requests.post(url=api_url+'/word', data=json.dumps(word_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/JSON Payload/zip.py b/Python/Endpoint Examples/JSON Payload/zip.py index a6cc10b9..0e91bc70 100644 --- a/Python/Endpoint Examples/JSON Payload/zip.py +++ b/Python/Endpoint Examples/JSON Payload/zip.py @@ -1,11 +1,18 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + with open('/path/to/first_file', 'rb') as f: # Note that the full file name plus extension needs to be reflected in 'Content-Filename below' upload_first_file_data = f.read() print("Uploading first file...") -upload_first_file_response = requests.post(url='https://api.pdfrest.com/upload', +upload_first_file_response = requests.post(url=api_url+'/upload', data=upload_first_file_data, headers={'Content-Type': 'application/octet-stream', 'Content-Filename': 'first_file', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -16,7 +23,7 @@ upload_second_file_data = f.read() print("Uploading second file...") -upload_second_file_response = requests.post(url='https://api.pdfrest.com/upload', +upload_second_file_response = requests.post(url=api_url+'/upload', data=upload_second_file_data, headers={'Content-Type': 'application/octet-stream', 'content-filename': 'second_file', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) @@ -37,7 +44,7 @@ print("Processing file...") - zip_response = requests.post(url='https://api.pdfrest.com/zip', + zip_response = requests.post(url=api_url+'/zip', data=json.dumps(zip_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) diff --git a/Python/Endpoint Examples/Multipart Payload/batch-delete.py b/Python/Endpoint Examples/Multipart Payload/batch-delete.py index 5b82a4e9..9ccbfd45 100644 --- a/Python/Endpoint Examples/Multipart Payload/batch-delete.py +++ b/Python/Endpoint Examples/Multipart Payload/batch-delete.py @@ -2,7 +2,14 @@ import requests import json -delete_endpoint_url = 'https://api.pdfrest.com/delete' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +delete_endpoint_url = api_url+'/delete' mp_encoder_delete = MultipartEncoder( fields={ diff --git a/Python/Endpoint Examples/Multipart Payload/bmp.py b/Python/Endpoint Examples/Multipart Payload/bmp.py index 80ea9dbb..8fb944a7 100644 --- a/Python/Endpoint Examples/Multipart Payload/bmp.py +++ b/Python/Endpoint Examples/Multipart Payload/bmp.py @@ -2,7 +2,14 @@ import requests import json -bmp_endpoint_url = 'https://api.pdfrest.com/bmp' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +bmp_endpoint_url = api_url+'/bmp' # The /bmp endpoint can take a single PDF file or id as input and turn them into BMP image files. # This sample takes in a PDF and converts all pages into grayscale BMP files. diff --git a/Python/Endpoint Examples/Multipart Payload/compressed-pdf.py b/Python/Endpoint Examples/Multipart Payload/compressed-pdf.py index 6fa692d4..9752782e 100644 --- a/Python/Endpoint Examples/Multipart Payload/compressed-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/compressed-pdf.py @@ -2,7 +2,14 @@ import requests import json -compressed_pdf_endpoint_url = 'https://api.pdfrest.com/compressed-pdf' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +compressed_pdf_endpoint_url = api_url+'/compressed-pdf' # The /compressed-pdf endpoint can take a single PDF file or id as input. # This sample demonstrates setting compression_level to 'medium'. diff --git a/Python/Endpoint Examples/Multipart Payload/decrypted-pdf.py b/Python/Endpoint Examples/Multipart Payload/decrypted-pdf.py index 2a823db7..b7103080 100644 --- a/Python/Endpoint Examples/Multipart Payload/decrypted-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/decrypted-pdf.py @@ -2,10 +2,17 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Toggle deletion of sensitive files (default: False) DELETE_SENSITIVE_FILES = False -decrypted_pdf_endpoint_url = 'https://api.pdfrest.com/decrypted-pdf' +decrypted_pdf_endpoint_url = api_url+'/decrypted-pdf' # The /decrypted-pdf endpoint can take a single PDF file or id as input. # This sample demonstrates decryption of a PDF with the password 'password'. @@ -38,9 +45,9 @@ # If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.py' sample. -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # # Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -48,7 +55,7 @@ if DELETE_SENSITIVE_FILES and response.ok: result_id = response_json['outputId'] delete_data = { "ids": f"{response_json['inputId']}, {result_id}" } - delete_response = requests.post(url='https://api.pdfrest.com/delete', + delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) print("Delete response status code: " + str(delete_response.status_code)) diff --git a/Python/Endpoint Examples/Multipart Payload/delete-resource.py b/Python/Endpoint Examples/Multipart Payload/delete-resource.py index cdefb36e..9134d70e 100644 --- a/Python/Endpoint Examples/Multipart Payload/delete-resource.py +++ b/Python/Endpoint Examples/Multipart Payload/delete-resource.py @@ -1,6 +1,13 @@ import requests -url = "https://api.pdfrest.com/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +url = f"{api_url}/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" payload = {} headers = { diff --git a/Python/Endpoint Examples/Multipart Payload/encrypted-pdf.py b/Python/Endpoint Examples/Multipart Payload/encrypted-pdf.py index caf99c9c..39dadf27 100644 --- a/Python/Endpoint Examples/Multipart Payload/encrypted-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/encrypted-pdf.py @@ -2,10 +2,17 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Toggle deletion of sensitive files (default: False) DELETE_SENSITIVE_FILES = False -encrypted_pdf_endpoint_url = 'https://api.pdfrest.com/encrypted-pdf' +encrypted_pdf_endpoint_url = api_url+'/encrypted-pdf' # The /encrypted-pdf endpoint can take a single PDF file or id as input. # This sample demonstrates encryption of a PDF with the password 'password'. @@ -38,16 +45,16 @@ # If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.py' sample. -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # # Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. if DELETE_SENSITIVE_FILES and response.ok: delete_data = { "ids": f"{response_json['inputId']}, {response_json['outputId']}" } - delete_response = requests.post(url='https://api.pdfrest.com/delete', + delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) print("Delete response status code: " + str(delete_response.status_code)) diff --git a/Python/Endpoint Examples/Multipart Payload/excel.py b/Python/Endpoint Examples/Multipart Payload/excel.py index e1b5a4af..dbf75d89 100644 --- a/Python/Endpoint Examples/Multipart Payload/excel.py +++ b/Python/Endpoint Examples/Multipart Payload/excel.py @@ -2,7 +2,14 @@ import requests import json -excel_endpoint_url = 'https://api.pdfrest.com/excel' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +excel_endpoint_url = api_url+'/excel' # The /excel endpoint can take a single PDF file or id as input. # This sample demonstrates converting a PDF to an Excel document. diff --git a/Python/Endpoint Examples/Multipart Payload/exported-form-data.py b/Python/Endpoint Examples/Multipart Payload/exported-form-data.py index 11066208..e5a7d2aa 100644 --- a/Python/Endpoint Examples/Multipart Payload/exported-form-data.py +++ b/Python/Endpoint Examples/Multipart Payload/exported-form-data.py @@ -2,7 +2,14 @@ import requests import json -exported_form_data_endpoint_url = 'https://api.pdfrest.com/exported-form-data' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +exported_form_data_endpoint_url = api_url+'/exported-form-data' # The /exported-form-data endpoint can take a single PDF file or id as input. # This sample demonstrates encryption of a PDF with the password 'password'. diff --git a/Python/Endpoint Examples/Multipart Payload/extracted-images.py b/Python/Endpoint Examples/Multipart Payload/extracted-images.py index b1da2374..eb9a2117 100644 --- a/Python/Endpoint Examples/Multipart Payload/extracted-images.py +++ b/Python/Endpoint Examples/Multipart Payload/extracted-images.py @@ -2,7 +2,14 @@ import requests import json -extracted_images_endpoint_url = 'https://api.pdfrest.com/extracted-images' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +extracted_images_endpoint_url = api_url+'/extracted-images' # The /extracted-images endpoint can take a single PDF file or id as input. # This sample demonstrates image extraction from all pages of a document. diff --git a/Python/Endpoint Examples/Multipart Payload/extracted-text.py b/Python/Endpoint Examples/Multipart Payload/extracted-text.py index 15ca8bb5..d68efb94 100644 --- a/Python/Endpoint Examples/Multipart Payload/extracted-text.py +++ b/Python/Endpoint Examples/Multipart Payload/extracted-text.py @@ -2,7 +2,14 @@ import requests import json -extract_text_endpoint_url = 'https://api.pdfrest.com/extracted-text' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +extract_text_endpoint_url = api_url+'/extracted-text' # The /extracted-text endpoint can take a single PDF file or id as input. #This sample demonstrates extracting the text from a document to return as JSON diff --git a/Python/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.py b/Python/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.py index 1a4e1d1b..25b1dcdd 100644 --- a/Python/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.py @@ -2,7 +2,14 @@ import requests import json -flattened_annotations_pdf_endpoint_url = 'https://api.pdfrest.com/flattened-annotations-pdf' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +flattened_annotations_pdf_endpoint_url = api_url+'/flattened-annotations-pdf' mp_encoder_flattenedPDF = MultipartEncoder( fields={ diff --git a/Python/Endpoint Examples/Multipart Payload/flattened-forms-pdf.py b/Python/Endpoint Examples/Multipart Payload/flattened-forms-pdf.py index 3c849866..b50fdd5c 100644 --- a/Python/Endpoint Examples/Multipart Payload/flattened-forms-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/flattened-forms-pdf.py @@ -2,7 +2,14 @@ import requests import json -flattened_forms_pdf_endpoint_url = 'https://api.pdfrest.com/flattened-forms-pdf' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +flattened_forms_pdf_endpoint_url = api_url+'/flattened-forms-pdf' mp_encoder_flattenedPDF = MultipartEncoder( fields={ diff --git a/Python/Endpoint Examples/Multipart Payload/flattened-layers-pdf.py b/Python/Endpoint Examples/Multipart Payload/flattened-layers-pdf.py index ad88e172..b3a6e153 100644 --- a/Python/Endpoint Examples/Multipart Payload/flattened-layers-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/flattened-layers-pdf.py @@ -2,7 +2,14 @@ import requests import json -flattened_layers_pdf_endpoint_url = 'https://api.pdfrest.com/flattened-layers-pdf' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +flattened_layers_pdf_endpoint_url = api_url+'/flattened-layers-pdf' mp_encoder_flattenedPDF = MultipartEncoder( fields={ diff --git a/Python/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.py b/Python/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.py index 64ff129d..33bde8c9 100644 --- a/Python/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.py @@ -2,7 +2,14 @@ import requests import json -flatten_transparencies_pdf_endpoint_url = 'https://api.pdfrest.com/flattened-transparencies-pdf' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +flatten_transparencies_pdf_endpoint_url = api_url+'/flattened-transparencies-pdf' # The /flattened-transparencies-pdf endpoint can take a single PDF file or id as input. # This sample demonstrates setting quality to 'medium'. diff --git a/Python/Endpoint Examples/Multipart Payload/get-resource.py b/Python/Endpoint Examples/Multipart Payload/get-resource.py index 35ae3ab2..9eba381d 100644 --- a/Python/Endpoint Examples/Multipart Payload/get-resource.py +++ b/Python/Endpoint Examples/Multipart Payload/get-resource.py @@ -1,15 +1,22 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Resource UUIDs can be found in the JSON response of POST requests as "outputId". Resource UUIDs usually look like this: '0950b9bdf-0465-4d3f-8ea3-d2894f1ae839'. id = 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # place resource uuid here -# The response format can be 'file' or 'url'. +# The response format can be 'file' or 'url'. # If 'url', then JSON containing the url of the resource file is returned. # If 'file', then the file itself is returned. format = 'file' -resource_url = f"https://api.pdfrest.com/resource/{id}?format={format}" +resource_url = f"{api_url}/resource/{id}?format={format}" print("Sending GET request to /resource/{id} endpoint...") response = requests.get(resource_url) diff --git a/Python/Endpoint Examples/Multipart Payload/gif.py b/Python/Endpoint Examples/Multipart Payload/gif.py index fbdf3e4c..5c29289a 100644 --- a/Python/Endpoint Examples/Multipart Payload/gif.py +++ b/Python/Endpoint Examples/Multipart Payload/gif.py @@ -2,7 +2,14 @@ import requests import json -gif_endpoint_url = 'https://api.pdfrest.com/gif' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +gif_endpoint_url = api_url+'/gif' # The /gif endpoint can take a single PDF file or id as input and turn them into GIF image files. # This sample takes in a PDF and converts all pages into grayscale GIF files. diff --git a/Python/Endpoint Examples/Multipart Payload/html.py b/Python/Endpoint Examples/Multipart Payload/html.py index f33835fc..d6f9f75d 100644 --- a/Python/Endpoint Examples/Multipart Payload/html.py +++ b/Python/Endpoint Examples/Multipart Payload/html.py @@ -2,7 +2,14 @@ import requests import json -html_endpoint_url = 'https://api.pdfrest.com/html' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +html_endpoint_url = api_url+'/html' # The /html endpoint can take a string of HTML content and convert it to a HTML (.html) file. # This sample takes in a string of HTML content that displays "Hello World!" and turns it into a HTML file. diff --git a/Python/Endpoint Examples/Multipart Payload/jpg.py b/Python/Endpoint Examples/Multipart Payload/jpg.py index e71a00d3..47e7c20b 100644 --- a/Python/Endpoint Examples/Multipart Payload/jpg.py +++ b/Python/Endpoint Examples/Multipart Payload/jpg.py @@ -2,7 +2,14 @@ import requests import json -jpg_endpoint_url = 'https://api.pdfrest.com/jpg' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +jpg_endpoint_url = api_url+'/jpg' # The /jpg endpoint can take a single PDF file or id as input and turn them into JPEG image files. # This sample takes in a PDF and converts all pages into JPEG files. diff --git a/Python/Endpoint Examples/Multipart Payload/linearized-pdf.py b/Python/Endpoint Examples/Multipart Payload/linearized-pdf.py index 1c0238f6..9bde0f8c 100644 --- a/Python/Endpoint Examples/Multipart Payload/linearized-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/linearized-pdf.py @@ -2,7 +2,14 @@ import requests import json -linearized_pdf_endpoint_url = 'https://api.pdfrest.com/linearized-pdf' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +linearized_pdf_endpoint_url = api_url+'/linearized-pdf' # The /linearized-pdf endpoint can take a single PDF file or id as input. # This sample demonstrates linearizing a PDF file. diff --git a/Python/Endpoint Examples/Multipart Payload/markdown.py b/Python/Endpoint Examples/Multipart Payload/markdown.py index fdb69eb0..dc9af8bb 100644 --- a/Python/Endpoint Examples/Multipart Payload/markdown.py +++ b/Python/Endpoint Examples/Multipart Payload/markdown.py @@ -2,7 +2,14 @@ import requests import json -markdown_endpoint_url = 'https://api.pdfrest.com/markdown' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +markdown_endpoint_url = api_url+'/markdown' # The /markdown endpoint can take a single PDF file or id as input. # This sample demonstrates converting the document to markdown and returning it as JSON. @@ -30,4 +37,4 @@ response_json = response.json() print(json.dumps(response_json, indent=2)) else: - print(response.text) \ No newline at end of file + print(response.text) diff --git a/Python/Endpoint Examples/Multipart Payload/merged-pdf.py b/Python/Endpoint Examples/Multipart Payload/merged-pdf.py index 80474bbd..cd05a8e5 100644 --- a/Python/Endpoint Examples/Multipart Payload/merged-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/merged-pdf.py @@ -2,7 +2,14 @@ import requests import json -merged_pdf_endpoint_url = 'https://api.pdfrest.com/merged-pdf' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +merged_pdf_endpoint_url = api_url+'/merged-pdf' # The /merged-pdf endpoint can take one or more PDF files or ids as input. # This sample takes 2 PDF files and merges all the pages in the document into a single document. diff --git a/Python/Endpoint Examples/Multipart Payload/pdf-info.py b/Python/Endpoint Examples/Multipart Payload/pdf-info.py index 63b315e2..5f1c8877 100644 --- a/Python/Endpoint Examples/Multipart Payload/pdf-info.py +++ b/Python/Endpoint Examples/Multipart Payload/pdf-info.py @@ -2,7 +2,14 @@ import requests import json -pdf_info_endpoint_url = 'https://api.pdfrest.com/pdf-info' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +pdf_info_endpoint_url = api_url+'/pdf-info' # The /pdf-info endpoint can take a single PDF file or id as input. #This sample demonstrates querying the title, page count, document language and author diff --git a/Python/Endpoint Examples/Multipart Payload/pdf-with-acroforms.py b/Python/Endpoint Examples/Multipart Payload/pdf-with-acroforms.py index fc1b639d..a2329807 100644 --- a/Python/Endpoint Examples/Multipart Payload/pdf-with-acroforms.py +++ b/Python/Endpoint Examples/Multipart Payload/pdf-with-acroforms.py @@ -2,7 +2,14 @@ import requests import json -acroform_endpoint_url = 'https://api.pdfrest.com/pdf-with-acroforms' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +acroform_endpoint_url = api_url+'/pdf-with-acroforms' # The /pdf-with-acroforms endpoint can take a single PDF file or id as input. # This sample demonstrates converting an XFA PDF to an acroform document. diff --git a/Python/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.py b/Python/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.py index f760ad44..c15dd9b9 100644 --- a/Python/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.py +++ b/Python/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.py @@ -2,7 +2,14 @@ import requests import json -pdf_with_added_attachment_endpoint_url = 'https://api.pdfrest.com/pdf-with-added-attachment' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +pdf_with_added_attachment_endpoint_url = api_url+'/pdf-with-added-attachment' mp_encoder_pdfWithAddedAttachment = MultipartEncoder( fields={ diff --git a/Python/Endpoint Examples/Multipart Payload/pdf-with-added-image.py b/Python/Endpoint Examples/Multipart Payload/pdf-with-added-image.py index 56fad3b3..0a99f5d0 100644 --- a/Python/Endpoint Examples/Multipart Payload/pdf-with-added-image.py +++ b/Python/Endpoint Examples/Multipart Payload/pdf-with-added-image.py @@ -2,7 +2,14 @@ import requests import json -pdf_with_added_image_endpoint_url = 'https://api.pdfrest.com/pdf-with-added-image' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +pdf_with_added_image_endpoint_url = api_url+'/pdf-with-added-image' mp_encoder_pdfWithAddedImage = MultipartEncoder( fields={ diff --git a/Python/Endpoint Examples/Multipart Payload/pdf-with-added-text.py b/Python/Endpoint Examples/Multipart Payload/pdf-with-added-text.py index 51d65e6b..6c0f5a59 100644 --- a/Python/Endpoint Examples/Multipart Payload/pdf-with-added-text.py +++ b/Python/Endpoint Examples/Multipart Payload/pdf-with-added-text.py @@ -2,7 +2,14 @@ import requests import json -pdf_with_added_text_endpoint_url = 'https://api.pdfrest.com/pdf-with-added-text' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +pdf_with_added_text_endpoint_url = api_url+'/pdf-with-added-text' text_options = [{ "font":"Times New Roman", diff --git a/Python/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.py b/Python/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.py index 42502b08..05acfa45 100644 --- a/Python/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.py +++ b/Python/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.py @@ -2,7 +2,14 @@ import requests import json -pdf_with_converted_colors_endpoint_url = 'https://api.pdfrest.com/pdf-with-converted-colors' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +pdf_with_converted_colors_endpoint_url = api_url+'/pdf-with-converted-colors' # The /pdf-with-converted-colors endpoint can take a single PDF file or id as input. # This sample demonstrates setting color_profile to 'srgb'. diff --git a/Python/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.py b/Python/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.py index 8590bcf6..35e7763a 100644 --- a/Python/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.py +++ b/Python/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.py @@ -2,7 +2,14 @@ import requests import json -import_form_data_endpoint_url = 'https://api.pdfrest.com/pdf-with-imported-form-data' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +import_form_data_endpoint_url = api_url+'/pdf-with-imported-form-data' mp_encoder_importFormData = MultipartEncoder( fields={ diff --git a/Python/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.py b/Python/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.py index d51cda96..204c6846 100644 --- a/Python/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.py +++ b/Python/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.py @@ -2,7 +2,14 @@ import requests import json -pdf_with_ocr_text_endpoint_url = 'https://api.pdfrest.com/pdf-with-ocr-text' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +pdf_with_ocr_text_endpoint_url = api_url+'/pdf-with-ocr-text' # The /pdf-with-ocr-text endpoint can take a single PDF file or id as input. # This sample demonstrates a request to add text to a document by using OCR on images of text. diff --git a/Python/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.py b/Python/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.py index 5a242e21..df6d87b7 100644 --- a/Python/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.py +++ b/Python/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.py @@ -2,7 +2,14 @@ import requests import json -pdf_with_page_boxes_endpoint_url = 'https://api.pdfrest.com/pdf-with-page-boxes-set' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +pdf_with_page_boxes_endpoint_url = api_url+'/pdf-with-page-boxes-set' box_options = { "boxes": [ diff --git a/Python/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.py b/Python/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.py index 60522b04..b4551222 100644 --- a/Python/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.py +++ b/Python/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.py @@ -2,10 +2,17 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Toggle deletion of sensitive files (default: False) DELETE_SENSITIVE_FILES = False -pdf_with_redacted_text_endpoint_url = 'https://api.pdfrest.com/pdf-with-redacted-text-applied' +pdf_with_redacted_text_endpoint_url = api_url+'/pdf-with-redacted-text-applied' # The /pdf-with-redacted-text-applied endpoint can take a single PDF file or id as input. # This sample demonstrates a request to redact text on a document that was processed by /pdf-with-redacted-text-preview @@ -37,16 +44,16 @@ # If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.py' sample. -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # # Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. if DELETE_SENSITIVE_FILES and response.ok: delete_data = { "ids": f"{response_json['inputId']}, {response_json['outputId']}" } - delete_response = requests.post(url='https://api.pdfrest.com/delete', + delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) print("Delete response status code: " + str(delete_response.status_code)) diff --git a/Python/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.py b/Python/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.py index 626bac84..470c14ea 100644 --- a/Python/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.py +++ b/Python/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.py @@ -2,10 +2,17 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Toggle deletion of sensitive files (default: False) DELETE_SENSITIVE_FILES = False -pdf_with_redacted_text_endpoint_url = 'https://api.pdfrest.com/pdf-with-redacted-text-preview' +pdf_with_redacted_text_endpoint_url = api_url+'/pdf-with-redacted-text-preview' redaction_options = [{ "type": "preset", @@ -45,9 +52,9 @@ else: print(response.text) -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # # Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -56,7 +63,7 @@ # IMPORTANT: Do not delete the outputId (the preview PDF) file until after the redaction is applied # with the /pdf-with-redacted-text-applied endpoint. delete_data = { "ids": response_json['inputId'] + ", " + response_json['outputId'] } - delete_response = requests.post(url='https://api.pdfrest.com/delete', + delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) print("Delete response status code: " + str(delete_response.status_code)) diff --git a/Python/Endpoint Examples/Multipart Payload/pdf.py b/Python/Endpoint Examples/Multipart Payload/pdf.py index f21d4142..2422766a 100644 --- a/Python/Endpoint Examples/Multipart Payload/pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/pdf.py @@ -2,7 +2,14 @@ import requests import json -pdf_endpoint_url = 'https://api.pdfrest.com/pdf' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +pdf_endpoint_url = api_url+'/pdf' # The /pdf endpoint can take a single file, id, or url as input. # This sample passes a tif file to the endpoint, but there's a variety of input file types that are accepted by this endpoint. diff --git a/Python/Endpoint Examples/Multipart Payload/pdfa.py b/Python/Endpoint Examples/Multipart Payload/pdfa.py index dc391235..aa9f520d 100644 --- a/Python/Endpoint Examples/Multipart Payload/pdfa.py +++ b/Python/Endpoint Examples/Multipart Payload/pdfa.py @@ -2,7 +2,14 @@ import requests import json -pdfa_endpoint_url = 'https://api.pdfrest.com/pdfa' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +pdfa_endpoint_url = api_url+'/pdfa' # The /pdfa endpoint can take a single PDF file or id as input. mp_encoder_pdfa = MultipartEncoder( diff --git a/Python/Endpoint Examples/Multipart Payload/pdfx.py b/Python/Endpoint Examples/Multipart Payload/pdfx.py index ef2aa6f6..c6b70351 100644 --- a/Python/Endpoint Examples/Multipart Payload/pdfx.py +++ b/Python/Endpoint Examples/Multipart Payload/pdfx.py @@ -2,7 +2,14 @@ import requests import json -pdfx_endpoint_url = 'https://api.pdfrest.com/pdfx' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +pdfx_endpoint_url = api_url+'/pdfx' # The /pdfx endpoint can take a single PDF file or id as input. mp_encoder_pdfx = MultipartEncoder( diff --git a/Python/Endpoint Examples/Multipart Payload/png.py b/Python/Endpoint Examples/Multipart Payload/png.py index 6f6600f9..64658fc7 100644 --- a/Python/Endpoint Examples/Multipart Payload/png.py +++ b/Python/Endpoint Examples/Multipart Payload/png.py @@ -2,7 +2,14 @@ import requests import json -png_endpoint_url = 'https://api.pdfrest.com/png' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +png_endpoint_url = api_url+'/png' # The /png endpoint can take a single PDF file or id as input and turn them into PNG image files. # This sample takes in a PDF and converts all pages into grayscale PNG files. diff --git a/Python/Endpoint Examples/Multipart Payload/powerpoint.py b/Python/Endpoint Examples/Multipart Payload/powerpoint.py index a807e387..f668d6b8 100644 --- a/Python/Endpoint Examples/Multipart Payload/powerpoint.py +++ b/Python/Endpoint Examples/Multipart Payload/powerpoint.py @@ -2,7 +2,14 @@ import requests import json -powerpoint_endpoint_url = 'https://api.pdfrest.com/powerpoint' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +powerpoint_endpoint_url = api_url+'/powerpoint' # The /powerpoint endpoint can take a single PDF file or id as input. # This sample demonstrates converting a PDF to a PowerPoint document. diff --git a/Python/Endpoint Examples/Multipart Payload/rasterized-pdf.py b/Python/Endpoint Examples/Multipart Payload/rasterized-pdf.py index eb64edd6..96ea94eb 100644 --- a/Python/Endpoint Examples/Multipart Payload/rasterized-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/rasterized-pdf.py @@ -2,7 +2,14 @@ import requests import json -rasterize_endpoint_url = 'https://api.pdfrest.com/rasterized-pdf' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +rasterize_endpoint_url = api_url+'/rasterized-pdf' # The /rasterized endpoint can take a single PDF file or id as input and turn it into a rasterized PDF file. mp_encoder_rasterize = MultipartEncoder( diff --git a/Python/Endpoint Examples/Multipart Payload/request-status.py b/Python/Endpoint Examples/Multipart Payload/request-status.py index 7082de10..5aca258c 100644 --- a/Python/Endpoint Examples/Multipart Payload/request-status.py +++ b/Python/Endpoint Examples/Multipart Payload/request-status.py @@ -3,9 +3,16 @@ import json import time +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + api_key = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # place your api key here -pdfa_endpoint_url = 'https://api.pdfrest.com/pdfa' +pdfa_endpoint_url = api_url+'/pdfa' mp_encoder_pdfa = MultipartEncoder( fields={ @@ -29,9 +36,9 @@ if response.ok: - response_json = response.json() + response_json = response.json() request_id = response_json["requestId"] - api_polling_endpoint_url = f'https://api.pdfrest.com/request-status/{request_id}' + api_polling_endpoint_url = f'{api_url}/request-status/{request_id}' headers = { 'Api-Key': api_key diff --git a/Python/Endpoint Examples/Multipart Payload/restricted-pdf.py b/Python/Endpoint Examples/Multipart Payload/restricted-pdf.py index 890887d5..24e88dff 100644 --- a/Python/Endpoint Examples/Multipart Payload/restricted-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/restricted-pdf.py @@ -2,10 +2,17 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Toggle deletion of sensitive files (default: False) DELETE_SENSITIVE_FILES = False -restricted_pdf_endpoint_url = 'https://api.pdfrest.com/restricted-pdf' +restricted_pdf_endpoint_url = api_url+'/restricted-pdf' # The /restricted-pdf endpoint can take a single PDF file or id as input. # This sample demonstrates setting the permissions password to 'password' and adding restrictions. @@ -41,16 +48,16 @@ # If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.py' sample. -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # # Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. if DELETE_SENSITIVE_FILES and response.ok: delete_data = { "ids": f"{response_json['inputId']}, {response_json['outputId']}" } - delete_response = requests.post(url='https://api.pdfrest.com/delete', + delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) print("Delete response status code: " + str(delete_response.status_code)) diff --git a/Python/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.py b/Python/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.py index eaa13cfb..d70b7352 100644 --- a/Python/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.py +++ b/Python/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.py @@ -2,7 +2,14 @@ import requests import json -signed_pdf_endpoint_url = 'https://api.pdfrest.com/signed-pdf' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +signed_pdf_endpoint_url = api_url+'/signed-pdf' signature_config = { "type": "new", diff --git a/Python/Endpoint Examples/Multipart Payload/signed-pdf.py b/Python/Endpoint Examples/Multipart Payload/signed-pdf.py index 92d3fb85..e56c6afc 100644 --- a/Python/Endpoint Examples/Multipart Payload/signed-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/signed-pdf.py @@ -2,7 +2,14 @@ import requests import json -signed_pdf_endpoint_url = 'https://api.pdfrest.com/signed-pdf' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +signed_pdf_endpoint_url = api_url+'/signed-pdf' signature_config = { "type": "new", diff --git a/Python/Endpoint Examples/Multipart Payload/split-pdf.py b/Python/Endpoint Examples/Multipart Payload/split-pdf.py index f6d402bc..d556d044 100644 --- a/Python/Endpoint Examples/Multipart Payload/split-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/split-pdf.py @@ -2,7 +2,14 @@ import requests import json -split_pdf_endpoint_url = 'https://api.pdfrest.com/split-pdf' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +split_pdf_endpoint_url = api_url+'/split-pdf' # The /split-pdf endpoint can take one PDF file or id as input. # This sample takes one PDF file that has at least 5 pages and splits it into two documents when given two page ranges. diff --git a/Python/Endpoint Examples/Multipart Payload/tif.py b/Python/Endpoint Examples/Multipart Payload/tif.py index 3a992028..f23e9526 100644 --- a/Python/Endpoint Examples/Multipart Payload/tif.py +++ b/Python/Endpoint Examples/Multipart Payload/tif.py @@ -2,7 +2,14 @@ import requests import json -tif_endpoint_url = 'https://api.pdfrest.com/tif' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +tif_endpoint_url = api_url+'/tif' # The /tif endpoint can take a single PDF file or id as input and turn them into TIFF image files. # This sample takes in a PDF and converts all pages into grayscale TIFF files. diff --git a/Python/Endpoint Examples/Multipart Payload/unrestricted-pdf.py b/Python/Endpoint Examples/Multipart Payload/unrestricted-pdf.py index b9580af3..19354b3f 100644 --- a/Python/Endpoint Examples/Multipart Payload/unrestricted-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/unrestricted-pdf.py @@ -2,10 +2,17 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Toggle deletion of sensitive files (default: False) DELETE_SENSITIVE_FILES = False -unrestricted_pdf_endpoint_url = 'https://api.pdfrest.com/unrestricted-pdf' +unrestricted_pdf_endpoint_url = api_url+'/unrestricted-pdf' # The /unrestricted-pdf endpoint can take a single PDF file or id as input. # This sample demonstrates removing security restrictions from a PDF. @@ -38,9 +45,9 @@ # If you would like to download the file instead of getting the JSON response, please see the 'get-resource-id-endpoint.py' sample. -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # # Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. @@ -48,7 +55,7 @@ result_id = response_json['outputId'] if DELETE_SENSITIVE_FILES and response.ok: delete_data = { "ids": f"{response_json['inputId']}, {result_id}" } - delete_response = requests.post(url='https://api.pdfrest.com/delete', + delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) print("Delete response status code: " + str(delete_response.status_code)) diff --git a/Python/Endpoint Examples/Multipart Payload/unzip.py b/Python/Endpoint Examples/Multipart Payload/unzip.py index 8ebeae18..e052353e 100644 --- a/Python/Endpoint Examples/Multipart Payload/unzip.py +++ b/Python/Endpoint Examples/Multipart Payload/unzip.py @@ -2,7 +2,14 @@ import requests import json -unzip_endpoint_url = 'https://api.pdfrest.com/unzip' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +unzip_endpoint_url = api_url+'/unzip' mp_encoder_unzip = MultipartEncoder( fields={ diff --git a/Python/Endpoint Examples/Multipart Payload/up-toolkit.py b/Python/Endpoint Examples/Multipart Payload/up-toolkit.py index ba27e235..2cb49f69 100644 --- a/Python/Endpoint Examples/Multipart Payload/up-toolkit.py +++ b/Python/Endpoint Examples/Multipart Payload/up-toolkit.py @@ -1,8 +1,15 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # up-forms and up-office can be used to query the other tools -up_url = f"https://api.pdfrest.com/up-toolkit" +up_url = f"{api_url}/up-toolkit" print("Sending GET request to /up-toolkit endpoint...") response = requests.get(up_url) diff --git a/Python/Endpoint Examples/Multipart Payload/upload.py b/Python/Endpoint Examples/Multipart Payload/upload.py index 60bb3a1b..448453ad 100644 --- a/Python/Endpoint Examples/Multipart Payload/upload.py +++ b/Python/Endpoint Examples/Multipart Payload/upload.py @@ -2,7 +2,14 @@ import requests import json -upload_endpoint_url = 'https://api.pdfrest.com/upload' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +upload_endpoint_url = api_url+'/upload' # The /upload endpoint can take one or more files or urls as input and transfers them to the pdfRest server for processing. # This sample takes 3 files and uploads it to the pdfRest service. diff --git a/Python/Endpoint Examples/Multipart Payload/watermarked-pdf.py b/Python/Endpoint Examples/Multipart Payload/watermarked-pdf.py index b8a347c5..80e59949 100644 --- a/Python/Endpoint Examples/Multipart Payload/watermarked-pdf.py +++ b/Python/Endpoint Examples/Multipart Payload/watermarked-pdf.py @@ -2,10 +2,17 @@ import requests import json +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + # Toggle deletion of sensitive files (default: False) DELETE_SENSITIVE_FILES = False -watermarked_pdf_endpoint_url = 'https://api.pdfrest.com/watermarked-pdf' +watermarked_pdf_endpoint_url = api_url+'/watermarked-pdf' mp_encoder_watermarkedPDF = MultipartEncoder( fields={ @@ -32,16 +39,16 @@ else: print(response.text) -# All files uploaded or generated are automatically deleted based on the -# File Retention Period as shown on https://pdfrest.com/pricing. -# For immediate deletion of files, particularly when sensitive data +# All files uploaded or generated are automatically deleted based on the +# File Retention Period as shown on https://pdfrest.com/pricing. +# For immediate deletion of files, particularly when sensitive data # is involved, an explicit delete call can be made to the API. # # Deletes all files in the workflow, including outputs. Save all desired files before enabling this step. if DELETE_SENSITIVE_FILES and response.ok: delete_data = { "ids": f"{response_json['inputId'][0]}, {response_json['outputId']}" } - delete_response = requests.post(url='https://api.pdfrest.com/delete', + delete_response = requests.post(url=api_url+'/delete', data=json.dumps(delete_data), headers={'Content-Type': 'application/json', "API-Key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}) print("Delete response status code: " + str(delete_response.status_code)) diff --git a/Python/Endpoint Examples/Multipart Payload/word.py b/Python/Endpoint Examples/Multipart Payload/word.py index b6530d3f..35635a15 100644 --- a/Python/Endpoint Examples/Multipart Payload/word.py +++ b/Python/Endpoint Examples/Multipart Payload/word.py @@ -2,7 +2,14 @@ import requests import json -word_endpoint_url = 'https://api.pdfrest.com/word' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +word_endpoint_url = api_url+'/word' # The /word endpoint can take a single PDF file or id as input. # This sample demonstrates converting a PDF to a Word document. diff --git a/Python/Endpoint Examples/Multipart Payload/zip.py b/Python/Endpoint Examples/Multipart Payload/zip.py index 066ee9d6..4e00c38c 100644 --- a/Python/Endpoint Examples/Multipart Payload/zip.py +++ b/Python/Endpoint Examples/Multipart Payload/zip.py @@ -2,7 +2,14 @@ import requests import json -zip_endpoint_url = 'https://api.pdfrest.com/zip' +# By default, we use the US-based API service. This is the primary endpoint for global use. +api_url = "https://api.pdfrest.com" + +# For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. +# For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work +#api_url = "https://eu-api.pdfrest.com" + +zip_endpoint_url = api_url+'/zip' # The /zip endpoint can take one or more file or ids as input and compresses them into a .zip. # This sample takes 2 files and compresses them into a zip file. From 78e74f939bbbe4e34ab54fbeeba7e2ca7a2a6fa7 Mon Sep 17 00:00:00 2001 From: Taylor Smith Date: Wed, 10 Sep 2025 15:07:16 -0500 Subject: [PATCH 06/11] clean up Java samples --- Java/Complex Flow Examples/DecryptAddReencrypt.java | 5 +++-- Java/Complex Flow Examples/MergeDifferentFileTypes.java | 5 +++-- Java/Complex Flow Examples/OcrWithExtractText.java | 5 +++-- Java/Complex Flow Examples/PDFA3bWithAttachment.java | 5 +++-- Java/Complex Flow Examples/PreserveWordDocument.java | 5 +++-- Java/Complex Flow Examples/ProtectedWatermark.java | 5 +++-- Java/Complex Flow Examples/RedactPreviewAndFinalize.java | 5 +++-- Java/Endpoint Examples/JSON Payload/BatchDelete.java | 5 +++-- Java/Endpoint Examples/JSON Payload/Bmp.java | 5 +++-- Java/Endpoint Examples/JSON Payload/CompressedPDF.java | 5 +++-- Java/Endpoint Examples/JSON Payload/DecryptedPDF.java | 5 +++-- Java/Endpoint Examples/JSON Payload/DeleteResource.java | 5 +++-- Java/Endpoint Examples/JSON Payload/EncryptedPDF.java | 5 +++-- Java/Endpoint Examples/JSON Payload/Excel.java | 5 +++-- Java/Endpoint Examples/JSON Payload/ExportedFormData.java | 5 +++-- Java/Endpoint Examples/JSON Payload/ExtractedImages.java | 5 +++-- Java/Endpoint Examples/JSON Payload/ExtractedText.java | 5 +++-- .../JSON Payload/FlattenedAnnotationsPDF.java | 5 +++-- .../Endpoint Examples/JSON Payload/FlattenedFormsPDF.java | 5 +++-- .../JSON Payload/FlattenedLayersPDF.java | 5 +++-- .../JSON Payload/FlattenedTransparenciesPDF.java | 5 +++-- Java/Endpoint Examples/JSON Payload/GetResource.java | 8 ++++---- Java/Endpoint Examples/JSON Payload/Gif.java | 5 +++-- Java/Endpoint Examples/JSON Payload/Jpg.java | 5 +++-- Java/Endpoint Examples/JSON Payload/LinearizedPDF.java | 5 +++-- Java/Endpoint Examples/JSON Payload/Markdown.java | 5 +++-- Java/Endpoint Examples/JSON Payload/MergedPDF.java | 5 +++-- Java/Endpoint Examples/JSON Payload/PDF.java | 5 +++-- Java/Endpoint Examples/JSON Payload/PDFA.java | 5 +++-- Java/Endpoint Examples/JSON Payload/PDFInfo.java | 5 +++-- Java/Endpoint Examples/JSON Payload/PDFWithAcroforms.java | 5 +++-- .../JSON Payload/PDFWithAddedAttachment.java | 5 +++-- .../Endpoint Examples/JSON Payload/PDFWithAddedImage.java | 5 +++-- Java/Endpoint Examples/JSON Payload/PDFWithAddedText.java | 5 +++-- .../JSON Payload/PDFWithConvertedColors.java | 5 +++-- .../JSON Payload/PDFWithImportedFormData.java | 5 +++-- Java/Endpoint Examples/JSON Payload/PDFWithOCRText.java | 5 +++-- .../JSON Payload/PDFWithPageBoxesSet.java | 5 +++-- .../JSON Payload/PDFWithRedactedTextApplied.java | 5 +++-- .../JSON Payload/PDFWithRedactedTextPreview.java | 5 +++-- Java/Endpoint Examples/JSON Payload/PDFX.java | 5 +++-- Java/Endpoint Examples/JSON Payload/Png.java | 5 +++-- Java/Endpoint Examples/JSON Payload/Powerpoint.java | 5 +++-- Java/Endpoint Examples/JSON Payload/RasterizedPDF.java | 5 +++-- Java/Endpoint Examples/JSON Payload/RestrictedPDF.java | 5 +++-- Java/Endpoint Examples/JSON Payload/SignedPDF.java | 5 +++-- Java/Endpoint Examples/JSON Payload/SignedPDFNonPFX.java | 5 +++-- Java/Endpoint Examples/JSON Payload/SplitPDF.java | 5 +++-- Java/Endpoint Examples/JSON Payload/Tif.java | 5 +++-- Java/Endpoint Examples/JSON Payload/UnrestrictedPDF.java | 5 +++-- Java/Endpoint Examples/JSON Payload/Unzip.java | 5 +++-- Java/Endpoint Examples/JSON Payload/UpToolkit.java | 5 +++-- Java/Endpoint Examples/JSON Payload/Upload.java | 5 +++-- Java/Endpoint Examples/JSON Payload/WatermarkedPDF.java | 5 +++-- Java/Endpoint Examples/JSON Payload/Word.java | 5 +++-- Java/Endpoint Examples/JSON Payload/Zip.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/BatchDelete.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/Bmp.java | 5 +++-- .../Multipart Payload/CompressedPDF.java | 5 +++-- .../Endpoint Examples/Multipart Payload/DecryptedPDF.java | 5 +++-- .../Multipart Payload/DeleteResource.java | 5 +++-- .../Endpoint Examples/Multipart Payload/EncryptedPDF.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/Excel.java | 5 +++-- .../Multipart Payload/ExportedFormData.java | 5 +++-- .../Multipart Payload/ExtractedImages.java | 5 +++-- .../Multipart Payload/ExtractedText.java | 5 +++-- .../Multipart Payload/FlattenedAnnotationsPDF.java | 5 +++-- .../Multipart Payload/FlattenedFormsPDF.java | 5 +++-- .../Multipart Payload/FlattenedLayersPDF.java | 5 +++-- .../Multipart Payload/FlattenedTransparenciesPDF.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/GetResource.java | 8 ++++---- Java/Endpoint Examples/Multipart Payload/Gif.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/Jpg.java | 5 +++-- .../Multipart Payload/LinearizedPDF.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/Markdown.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/MergedPDF.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/PDF.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/PDFA.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/PDFInfo.java | 5 +++-- .../Multipart Payload/PDFWithAcroforms.java | 5 +++-- .../Multipart Payload/PDFWithAddedAttachment.java | 5 +++-- .../Multipart Payload/PDFWithAddedImage.java | 5 +++-- .../Multipart Payload/PDFWithAddedText.java | 5 +++-- .../Multipart Payload/PDFWithConvertedColors.java | 5 +++-- .../Multipart Payload/PDFWithImportedFormData.java | 5 +++-- .../Multipart Payload/PDFWithOCRText.java | 5 +++-- .../Multipart Payload/PDFWithPageBoxesSet.java | 5 +++-- .../Multipart Payload/PDFWithRedactedTextApplied.java | 5 +++-- .../Multipart Payload/PDFWithRedactedTextPreview.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/PDFX.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/Png.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/Powerpoint.java | 5 +++-- .../Multipart Payload/RasterizedPDF.java | 5 +++-- .../Multipart Payload/RequestStatus.java | 5 +++-- .../Multipart Payload/RestrictedPDF.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/SignedPDF.java | 5 +++-- .../Multipart Payload/SignedPDFNonPFX.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/SplitPDF.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/Tif.java | 5 +++-- .../Multipart Payload/UnrestrictedPDF.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/Unzip.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/UpToolkit.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/Upload.java | 5 +++-- .../Multipart Payload/WatermarkedPDF.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/Word.java | 5 +++-- Java/Endpoint Examples/Multipart Payload/Zip.java | 5 +++-- 106 files changed, 320 insertions(+), 216 deletions(-) diff --git a/Java/Complex Flow Examples/DecryptAddReencrypt.java b/Java/Complex Flow Examples/DecryptAddReencrypt.java index 0312a807..1ae1f9ab 100644 --- a/Java/Complex Flow Examples/DecryptAddReencrypt.java +++ b/Java/Complex Flow Examples/DecryptAddReencrypt.java @@ -19,9 +19,10 @@ public class DecryptAddReencrypt { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your PDF file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Complex Flow Examples/MergeDifferentFileTypes.java b/Java/Complex Flow Examples/MergeDifferentFileTypes.java index a4b92674..92c25424 100644 --- a/Java/Complex Flow Examples/MergeDifferentFileTypes.java +++ b/Java/Complex Flow Examples/MergeDifferentFileTypes.java @@ -22,9 +22,10 @@ public class MergeDifferentFileTypes { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your first file here, or as the first argument when running the program. private static final String DEFAULT_FIRST_FILE_PATH = "/path/to/file.png"; diff --git a/Java/Complex Flow Examples/OcrWithExtractText.java b/Java/Complex Flow Examples/OcrWithExtractText.java index 8e02d2fb..6e857e40 100644 --- a/Java/Complex Flow Examples/OcrWithExtractText.java +++ b/Java/Complex Flow Examples/OcrWithExtractText.java @@ -19,9 +19,10 @@ public class OcrWithExtractText { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your PDF file here, or as the first argument when running the program. private static final String DEFAULT_PDF_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Complex Flow Examples/PDFA3bWithAttachment.java b/Java/Complex Flow Examples/PDFA3bWithAttachment.java index 462535c1..90bb771a 100644 --- a/Java/Complex Flow Examples/PDFA3bWithAttachment.java +++ b/Java/Complex Flow Examples/PDFA3bWithAttachment.java @@ -20,9 +20,10 @@ public class PDFA3bWithAttachment { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Complex Flow Examples/PreserveWordDocument.java b/Java/Complex Flow Examples/PreserveWordDocument.java index be92bd6d..aa19ac58 100644 --- a/Java/Complex Flow Examples/PreserveWordDocument.java +++ b/Java/Complex Flow Examples/PreserveWordDocument.java @@ -17,9 +17,10 @@ public class PreserveWordDocument { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Complex Flow Examples/ProtectedWatermark.java b/Java/Complex Flow Examples/ProtectedWatermark.java index e84ee3ab..0541440b 100644 --- a/Java/Complex Flow Examples/ProtectedWatermark.java +++ b/Java/Complex Flow Examples/ProtectedWatermark.java @@ -17,9 +17,10 @@ public class ProtectedWatermark { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Complex Flow Examples/RedactPreviewAndFinalize.java b/Java/Complex Flow Examples/RedactPreviewAndFinalize.java index e7be2eae..3b8b94c4 100644 --- a/Java/Complex Flow Examples/RedactPreviewAndFinalize.java +++ b/Java/Complex Flow Examples/RedactPreviewAndFinalize.java @@ -18,9 +18,10 @@ public class RedactPreviewAndFinalize { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file"; diff --git a/Java/Endpoint Examples/JSON Payload/BatchDelete.java b/Java/Endpoint Examples/JSON Payload/BatchDelete.java index 2d194315..d2987c95 100644 --- a/Java/Endpoint Examples/JSON Payload/BatchDelete.java +++ b/Java/Endpoint Examples/JSON Payload/BatchDelete.java @@ -9,9 +9,10 @@ public class BatchDelete { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com" + // private static final String API_URL = "https://eu-api.pdfrest.com" // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. diff --git a/Java/Endpoint Examples/JSON Payload/Bmp.java b/Java/Endpoint Examples/JSON Payload/Bmp.java index 34c1149b..9300d1a6 100644 --- a/Java/Endpoint Examples/JSON Payload/Bmp.java +++ b/Java/Endpoint Examples/JSON Payload/Bmp.java @@ -11,9 +11,10 @@ public class Bmp { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/CompressedPDF.java b/Java/Endpoint Examples/JSON Payload/CompressedPDF.java index abbce23a..f1cdc709 100644 --- a/Java/Endpoint Examples/JSON Payload/CompressedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/CompressedPDF.java @@ -11,9 +11,10 @@ public class CompressedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/DecryptedPDF.java b/Java/Endpoint Examples/JSON Payload/DecryptedPDF.java index 3299f964..266e3bd4 100644 --- a/Java/Endpoint Examples/JSON Payload/DecryptedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/DecryptedPDF.java @@ -11,9 +11,10 @@ public class DecryptedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/DeleteResource.java b/Java/Endpoint Examples/JSON Payload/DeleteResource.java index c7c93ab7..7edc4114 100644 --- a/Java/Endpoint Examples/JSON Payload/DeleteResource.java +++ b/Java/Endpoint Examples/JSON Payload/DeleteResource.java @@ -8,9 +8,10 @@ public class DeleteResource { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Resource UUIDs can be found in the JSON response of POST requests as "outputId". // Resource UUIDs usually look like this: '0950b9bdf-0465-4d3f-8ea3-d2894f1ae839'. diff --git a/Java/Endpoint Examples/JSON Payload/EncryptedPDF.java b/Java/Endpoint Examples/JSON Payload/EncryptedPDF.java index a134d940..c3fc1568 100644 --- a/Java/Endpoint Examples/JSON Payload/EncryptedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/EncryptedPDF.java @@ -11,9 +11,10 @@ public class EncryptedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/Excel.java b/Java/Endpoint Examples/JSON Payload/Excel.java index 71cde304..92c594d8 100644 --- a/Java/Endpoint Examples/JSON Payload/Excel.java +++ b/Java/Endpoint Examples/JSON Payload/Excel.java @@ -11,9 +11,10 @@ public class Excel { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/ExportedFormData.java b/Java/Endpoint Examples/JSON Payload/ExportedFormData.java index 3e31c9cb..eb40e0e0 100644 --- a/Java/Endpoint Examples/JSON Payload/ExportedFormData.java +++ b/Java/Endpoint Examples/JSON Payload/ExportedFormData.java @@ -11,9 +11,10 @@ public class ExportedFormData { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/ExtractedImages.java b/Java/Endpoint Examples/JSON Payload/ExtractedImages.java index bd73a344..a4feb334 100644 --- a/Java/Endpoint Examples/JSON Payload/ExtractedImages.java +++ b/Java/Endpoint Examples/JSON Payload/ExtractedImages.java @@ -11,9 +11,10 @@ public class ExtractedImages { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/ExtractedText.java b/Java/Endpoint Examples/JSON Payload/ExtractedText.java index 70d88aab..e97e81b6 100644 --- a/Java/Endpoint Examples/JSON Payload/ExtractedText.java +++ b/Java/Endpoint Examples/JSON Payload/ExtractedText.java @@ -11,9 +11,10 @@ public class ExtractedText { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/FlattenedAnnotationsPDF.java b/Java/Endpoint Examples/JSON Payload/FlattenedAnnotationsPDF.java index 0fa12169..f9f5346b 100644 --- a/Java/Endpoint Examples/JSON Payload/FlattenedAnnotationsPDF.java +++ b/Java/Endpoint Examples/JSON Payload/FlattenedAnnotationsPDF.java @@ -11,9 +11,10 @@ public class FlattenedAnnotationsPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/FlattenedFormsPDF.java b/Java/Endpoint Examples/JSON Payload/FlattenedFormsPDF.java index 549f549d..5e81070f 100644 --- a/Java/Endpoint Examples/JSON Payload/FlattenedFormsPDF.java +++ b/Java/Endpoint Examples/JSON Payload/FlattenedFormsPDF.java @@ -11,9 +11,10 @@ public class FlattenedFormsPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/FlattenedLayersPDF.java b/Java/Endpoint Examples/JSON Payload/FlattenedLayersPDF.java index 192aa52b..2a0a6f96 100644 --- a/Java/Endpoint Examples/JSON Payload/FlattenedLayersPDF.java +++ b/Java/Endpoint Examples/JSON Payload/FlattenedLayersPDF.java @@ -11,9 +11,10 @@ public class FlattenedLayersPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/FlattenedTransparenciesPDF.java b/Java/Endpoint Examples/JSON Payload/FlattenedTransparenciesPDF.java index 6fa25b69..c96757b3 100644 --- a/Java/Endpoint Examples/JSON Payload/FlattenedTransparenciesPDF.java +++ b/Java/Endpoint Examples/JSON Payload/FlattenedTransparenciesPDF.java @@ -11,9 +11,10 @@ public class FlattenedTransparenciesPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/GetResource.java b/Java/Endpoint Examples/JSON Payload/GetResource.java index 9007dc19..b538a619 100644 --- a/Java/Endpoint Examples/JSON Payload/GetResource.java +++ b/Java/Endpoint Examples/JSON Payload/GetResource.java @@ -10,9 +10,10 @@ public class GetResource { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Resource UUIDs can be found in the JSON response of POST requests as "outputId". // Resource UUIDs usually look like this: '0950b9bdf-0465-4d3f-8ea3-d2894f1ae839'. @@ -26,8 +27,7 @@ public class GetResource { public static void main(String[] args) { try { - String urlString = - String.format(API_URL + "/resource/%s?format=%2s", FILE_ID, OUTPUT_FORMAT); + String urlString = String.format(API_URL + "/resource/%s?format=%2s", FILE_ID, OUTPUT_FORMAT); InputStream in = new URL(urlString).openStream(); Files.copy(in, Paths.get("/path/to/write/file")); // Set a path for the file to be written } catch (IOException e) { diff --git a/Java/Endpoint Examples/JSON Payload/Gif.java b/Java/Endpoint Examples/JSON Payload/Gif.java index 9e49b27a..0c1c4177 100644 --- a/Java/Endpoint Examples/JSON Payload/Gif.java +++ b/Java/Endpoint Examples/JSON Payload/Gif.java @@ -11,9 +11,10 @@ public class Gif { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/Jpg.java b/Java/Endpoint Examples/JSON Payload/Jpg.java index d243060f..903e6841 100644 --- a/Java/Endpoint Examples/JSON Payload/Jpg.java +++ b/Java/Endpoint Examples/JSON Payload/Jpg.java @@ -11,9 +11,10 @@ public class Jpg { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/LinearizedPDF.java b/Java/Endpoint Examples/JSON Payload/LinearizedPDF.java index 4f2a3b43..577cc084 100644 --- a/Java/Endpoint Examples/JSON Payload/LinearizedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/LinearizedPDF.java @@ -11,9 +11,10 @@ public class LinearizedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/Markdown.java b/Java/Endpoint Examples/JSON Payload/Markdown.java index 1b6047ba..ffc19776 100644 --- a/Java/Endpoint Examples/JSON Payload/Markdown.java +++ b/Java/Endpoint Examples/JSON Payload/Markdown.java @@ -11,9 +11,10 @@ public class Markdown { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/MergedPDF.java b/Java/Endpoint Examples/JSON Payload/MergedPDF.java index f1aafe60..a0a642ea 100644 --- a/Java/Endpoint Examples/JSON Payload/MergedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/MergedPDF.java @@ -11,9 +11,10 @@ public class MergedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; private static final String[] DEFAULT_FILE_PATHS = new String[] {"/path/to/file1.pdf", "/path/to/file2.pdf"}; diff --git a/Java/Endpoint Examples/JSON Payload/PDF.java b/Java/Endpoint Examples/JSON Payload/PDF.java index 5d723fa1..6e5e50d8 100644 --- a/Java/Endpoint Examples/JSON Payload/PDF.java +++ b/Java/Endpoint Examples/JSON Payload/PDF.java @@ -11,9 +11,10 @@ public class PDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.png"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFA.java b/Java/Endpoint Examples/JSON Payload/PDFA.java index 8a042bae..3ee74f09 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFA.java +++ b/Java/Endpoint Examples/JSON Payload/PDFA.java @@ -11,9 +11,10 @@ public class PDFA { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFInfo.java b/Java/Endpoint Examples/JSON Payload/PDFInfo.java index c23f760f..36350d7f 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFInfo.java +++ b/Java/Endpoint Examples/JSON Payload/PDFInfo.java @@ -11,9 +11,10 @@ public class PDFInfo { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithAcroforms.java b/Java/Endpoint Examples/JSON Payload/PDFWithAcroforms.java index a6bfc752..c5e1eca6 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithAcroforms.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithAcroforms.java @@ -11,9 +11,10 @@ public class PDFWithAcroforms { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithAddedAttachment.java b/Java/Endpoint Examples/JSON Payload/PDFWithAddedAttachment.java index b28bdb5c..1c4f3aaa 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithAddedAttachment.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithAddedAttachment.java @@ -11,9 +11,10 @@ public class PDFWithAddedAttachment { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithAddedImage.java b/Java/Endpoint Examples/JSON Payload/PDFWithAddedImage.java index ba3a3e33..74b6685a 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithAddedImage.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithAddedImage.java @@ -11,9 +11,10 @@ public class PDFWithAddedImage { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithAddedText.java b/Java/Endpoint Examples/JSON Payload/PDFWithAddedText.java index f7bce60f..75d73cc6 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithAddedText.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithAddedText.java @@ -11,9 +11,10 @@ public class PDFWithAddedText { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithConvertedColors.java b/Java/Endpoint Examples/JSON Payload/PDFWithConvertedColors.java index 4302e77a..f40f3ee0 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithConvertedColors.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithConvertedColors.java @@ -11,9 +11,10 @@ public class PDFWithConvertedColors { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithImportedFormData.java b/Java/Endpoint Examples/JSON Payload/PDFWithImportedFormData.java index 185322a7..7761e1f3 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithImportedFormData.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithImportedFormData.java @@ -11,9 +11,10 @@ public class PDFWithImportedFormData { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithOCRText.java b/Java/Endpoint Examples/JSON Payload/PDFWithOCRText.java index c1ce6703..6841e53a 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithOCRText.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithOCRText.java @@ -11,9 +11,10 @@ public class PDFWithOCRText { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithPageBoxesSet.java b/Java/Endpoint Examples/JSON Payload/PDFWithPageBoxesSet.java index 78756eba..a0008e6e 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithPageBoxesSet.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithPageBoxesSet.java @@ -11,9 +11,10 @@ public class PDFWithPageBoxesSet { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextApplied.java b/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextApplied.java index 27584c07..ca46264c 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextApplied.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextApplied.java @@ -11,9 +11,10 @@ public class PDFWithRedactedTextApplied { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextPreview.java b/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextPreview.java index 5303f442..07c01bdc 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextPreview.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextPreview.java @@ -11,9 +11,10 @@ public class PDFWithRedactedTextPreview { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFX.java b/Java/Endpoint Examples/JSON Payload/PDFX.java index d9e0e563..fb1dd0d1 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFX.java +++ b/Java/Endpoint Examples/JSON Payload/PDFX.java @@ -11,9 +11,10 @@ public class PDFX { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/Png.java b/Java/Endpoint Examples/JSON Payload/Png.java index bd17ad42..bd69f3e7 100644 --- a/Java/Endpoint Examples/JSON Payload/Png.java +++ b/Java/Endpoint Examples/JSON Payload/Png.java @@ -11,9 +11,10 @@ public class Png { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/Powerpoint.java b/Java/Endpoint Examples/JSON Payload/Powerpoint.java index 3bf2b6a4..9a0cfa5f 100644 --- a/Java/Endpoint Examples/JSON Payload/Powerpoint.java +++ b/Java/Endpoint Examples/JSON Payload/Powerpoint.java @@ -11,9 +11,10 @@ public class Powerpoint { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/RasterizedPDF.java b/Java/Endpoint Examples/JSON Payload/RasterizedPDF.java index af0d3046..0c21a78b 100644 --- a/Java/Endpoint Examples/JSON Payload/RasterizedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/RasterizedPDF.java @@ -11,9 +11,10 @@ public class RasterizedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/RestrictedPDF.java b/Java/Endpoint Examples/JSON Payload/RestrictedPDF.java index 3a57b58d..43b7fdcc 100644 --- a/Java/Endpoint Examples/JSON Payload/RestrictedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/RestrictedPDF.java @@ -11,9 +11,10 @@ public class RestrictedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/SignedPDF.java b/Java/Endpoint Examples/JSON Payload/SignedPDF.java index 4f095b29..6774118c 100644 --- a/Java/Endpoint Examples/JSON Payload/SignedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/SignedPDF.java @@ -11,9 +11,10 @@ public class SignedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. diff --git a/Java/Endpoint Examples/JSON Payload/SignedPDFNonPFX.java b/Java/Endpoint Examples/JSON Payload/SignedPDFNonPFX.java index acfc7a79..8945476e 100644 --- a/Java/Endpoint Examples/JSON Payload/SignedPDFNonPFX.java +++ b/Java/Endpoint Examples/JSON Payload/SignedPDFNonPFX.java @@ -11,9 +11,10 @@ public class SignedPDFNonPFX { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. diff --git a/Java/Endpoint Examples/JSON Payload/SplitPDF.java b/Java/Endpoint Examples/JSON Payload/SplitPDF.java index 957dba43..6232623e 100644 --- a/Java/Endpoint Examples/JSON Payload/SplitPDF.java +++ b/Java/Endpoint Examples/JSON Payload/SplitPDF.java @@ -11,9 +11,10 @@ public class SplitPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/Tif.java b/Java/Endpoint Examples/JSON Payload/Tif.java index 73eddf47..dd161383 100644 --- a/Java/Endpoint Examples/JSON Payload/Tif.java +++ b/Java/Endpoint Examples/JSON Payload/Tif.java @@ -11,9 +11,10 @@ public class Tif { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/UnrestrictedPDF.java b/Java/Endpoint Examples/JSON Payload/UnrestrictedPDF.java index 5e0f6e05..7bbfb8c8 100644 --- a/Java/Endpoint Examples/JSON Payload/UnrestrictedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/UnrestrictedPDF.java @@ -11,9 +11,10 @@ public class UnrestrictedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/Unzip.java b/Java/Endpoint Examples/JSON Payload/Unzip.java index 7c5c4adc..1e7e932b 100644 --- a/Java/Endpoint Examples/JSON Payload/Unzip.java +++ b/Java/Endpoint Examples/JSON Payload/Unzip.java @@ -11,9 +11,10 @@ public class Unzip { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.zip"; diff --git a/Java/Endpoint Examples/JSON Payload/UpToolkit.java b/Java/Endpoint Examples/JSON Payload/UpToolkit.java index d4775cff..949c04bf 100644 --- a/Java/Endpoint Examples/JSON Payload/UpToolkit.java +++ b/Java/Endpoint Examples/JSON Payload/UpToolkit.java @@ -10,9 +10,10 @@ public class UpToolkit { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; public static void main(String[] args) { // up-forms and up-office can be used to query the other tools diff --git a/Java/Endpoint Examples/JSON Payload/Upload.java b/Java/Endpoint Examples/JSON Payload/Upload.java index b9f14fb7..bd93e150 100644 --- a/Java/Endpoint Examples/JSON Payload/Upload.java +++ b/Java/Endpoint Examples/JSON Payload/Upload.java @@ -9,9 +9,10 @@ public class Upload { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/WatermarkedPDF.java b/Java/Endpoint Examples/JSON Payload/WatermarkedPDF.java index 1f6bc029..ddac3c92 100644 --- a/Java/Endpoint Examples/JSON Payload/WatermarkedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/WatermarkedPDF.java @@ -11,9 +11,10 @@ public class WatermarkedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/Word.java b/Java/Endpoint Examples/JSON Payload/Word.java index a7e99f88..1240d2f2 100644 --- a/Java/Endpoint Examples/JSON Payload/Word.java +++ b/Java/Endpoint Examples/JSON Payload/Word.java @@ -11,9 +11,10 @@ public class Word { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/JSON Payload/Zip.java b/Java/Endpoint Examples/JSON Payload/Zip.java index b1f2eb74..7a0ff70d 100644 --- a/Java/Endpoint Examples/JSON Payload/Zip.java +++ b/Java/Endpoint Examples/JSON Payload/Zip.java @@ -11,9 +11,10 @@ public class Zip { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; private static final String[] DEFAULT_FILE_PATHS = new String[] {"/path/to/file1.pdf", "/path/to/file2.pdf"}; diff --git a/Java/Endpoint Examples/Multipart Payload/BatchDelete.java b/Java/Endpoint Examples/Multipart Payload/BatchDelete.java index 3bfa1d0d..17d51db8 100644 --- a/Java/Endpoint Examples/Multipart Payload/BatchDelete.java +++ b/Java/Endpoint Examples/Multipart Payload/BatchDelete.java @@ -9,9 +9,10 @@ public class BatchDelete { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. diff --git a/Java/Endpoint Examples/Multipart Payload/Bmp.java b/Java/Endpoint Examples/Multipart Payload/Bmp.java index 61405cfe..a2dc71b4 100644 --- a/Java/Endpoint Examples/Multipart Payload/Bmp.java +++ b/Java/Endpoint Examples/Multipart Payload/Bmp.java @@ -10,9 +10,10 @@ public class Bmp { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/CompressedPDF.java b/Java/Endpoint Examples/Multipart Payload/CompressedPDF.java index 360aa897..d4e404b3 100644 --- a/Java/Endpoint Examples/Multipart Payload/CompressedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/CompressedPDF.java @@ -15,9 +15,10 @@ public class CompressedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/DecryptedPDF.java b/Java/Endpoint Examples/Multipart Payload/DecryptedPDF.java index 2c2d83e2..d3e8400d 100644 --- a/Java/Endpoint Examples/Multipart Payload/DecryptedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/DecryptedPDF.java @@ -10,9 +10,10 @@ public class DecryptedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/DeleteResource.java b/Java/Endpoint Examples/Multipart Payload/DeleteResource.java index c7c93ab7..7edc4114 100644 --- a/Java/Endpoint Examples/Multipart Payload/DeleteResource.java +++ b/Java/Endpoint Examples/Multipart Payload/DeleteResource.java @@ -8,9 +8,10 @@ public class DeleteResource { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Resource UUIDs can be found in the JSON response of POST requests as "outputId". // Resource UUIDs usually look like this: '0950b9bdf-0465-4d3f-8ea3-d2894f1ae839'. diff --git a/Java/Endpoint Examples/Multipart Payload/EncryptedPDF.java b/Java/Endpoint Examples/Multipart Payload/EncryptedPDF.java index 1d4a2beb..89456a6f 100644 --- a/Java/Endpoint Examples/Multipart Payload/EncryptedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/EncryptedPDF.java @@ -10,9 +10,10 @@ public class EncryptedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/Excel.java b/Java/Endpoint Examples/Multipart Payload/Excel.java index 11c063ef..7720f42e 100644 --- a/Java/Endpoint Examples/Multipart Payload/Excel.java +++ b/Java/Endpoint Examples/Multipart Payload/Excel.java @@ -15,9 +15,10 @@ public class Excel { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/ExportedFormData.java b/Java/Endpoint Examples/Multipart Payload/ExportedFormData.java index dbf6c5d1..7b3a3450 100644 --- a/Java/Endpoint Examples/Multipart Payload/ExportedFormData.java +++ b/Java/Endpoint Examples/Multipart Payload/ExportedFormData.java @@ -10,9 +10,10 @@ public class ExportedFormData { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/ExtractedImages.java b/Java/Endpoint Examples/Multipart Payload/ExtractedImages.java index 366987cc..c2b04102 100644 --- a/Java/Endpoint Examples/Multipart Payload/ExtractedImages.java +++ b/Java/Endpoint Examples/Multipart Payload/ExtractedImages.java @@ -15,9 +15,10 @@ public class ExtractedImages { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/ExtractedText.java b/Java/Endpoint Examples/Multipart Payload/ExtractedText.java index 3cebd062..a190fe2f 100644 --- a/Java/Endpoint Examples/Multipart Payload/ExtractedText.java +++ b/Java/Endpoint Examples/Multipart Payload/ExtractedText.java @@ -14,9 +14,10 @@ public class ExtractedText { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/FlattenedAnnotationsPDF.java b/Java/Endpoint Examples/Multipart Payload/FlattenedAnnotationsPDF.java index d046f11c..275fe822 100644 --- a/Java/Endpoint Examples/Multipart Payload/FlattenedAnnotationsPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/FlattenedAnnotationsPDF.java @@ -10,9 +10,10 @@ public class FlattenedAnnotationsPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/FlattenedFormsPDF.java b/Java/Endpoint Examples/Multipart Payload/FlattenedFormsPDF.java index 46e1900f..733d2e7a 100644 --- a/Java/Endpoint Examples/Multipart Payload/FlattenedFormsPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/FlattenedFormsPDF.java @@ -10,9 +10,10 @@ public class FlattenedFormsPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/FlattenedLayersPDF.java b/Java/Endpoint Examples/Multipart Payload/FlattenedLayersPDF.java index 03547a2b..bd501994 100644 --- a/Java/Endpoint Examples/Multipart Payload/FlattenedLayersPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/FlattenedLayersPDF.java @@ -10,9 +10,10 @@ public class FlattenedLayersPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/FlattenedTransparenciesPDF.java b/Java/Endpoint Examples/Multipart Payload/FlattenedTransparenciesPDF.java index 7cc2dd11..ca687562 100644 --- a/Java/Endpoint Examples/Multipart Payload/FlattenedTransparenciesPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/FlattenedTransparenciesPDF.java @@ -10,9 +10,10 @@ public class FlattenedTransparenciesPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/GetResource.java b/Java/Endpoint Examples/Multipart Payload/GetResource.java index 9007dc19..b538a619 100644 --- a/Java/Endpoint Examples/Multipart Payload/GetResource.java +++ b/Java/Endpoint Examples/Multipart Payload/GetResource.java @@ -10,9 +10,10 @@ public class GetResource { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Resource UUIDs can be found in the JSON response of POST requests as "outputId". // Resource UUIDs usually look like this: '0950b9bdf-0465-4d3f-8ea3-d2894f1ae839'. @@ -26,8 +27,7 @@ public class GetResource { public static void main(String[] args) { try { - String urlString = - String.format(API_URL + "/resource/%s?format=%2s", FILE_ID, OUTPUT_FORMAT); + String urlString = String.format(API_URL + "/resource/%s?format=%2s", FILE_ID, OUTPUT_FORMAT); InputStream in = new URL(urlString).openStream(); Files.copy(in, Paths.get("/path/to/write/file")); // Set a path for the file to be written } catch (IOException e) { diff --git a/Java/Endpoint Examples/Multipart Payload/Gif.java b/Java/Endpoint Examples/Multipart Payload/Gif.java index 7189afd4..3c56102a 100644 --- a/Java/Endpoint Examples/Multipart Payload/Gif.java +++ b/Java/Endpoint Examples/Multipart Payload/Gif.java @@ -10,9 +10,10 @@ public class Gif { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/Jpg.java b/Java/Endpoint Examples/Multipart Payload/Jpg.java index 6b33fb92..6fcc3dff 100644 --- a/Java/Endpoint Examples/Multipart Payload/Jpg.java +++ b/Java/Endpoint Examples/Multipart Payload/Jpg.java @@ -10,9 +10,10 @@ public class Jpg { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/LinearizedPDF.java b/Java/Endpoint Examples/Multipart Payload/LinearizedPDF.java index ef8d8d4d..7fdd27bd 100644 --- a/Java/Endpoint Examples/Multipart Payload/LinearizedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/LinearizedPDF.java @@ -10,9 +10,10 @@ public class LinearizedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/Markdown.java b/Java/Endpoint Examples/Multipart Payload/Markdown.java index 457e7ad9..32b60c5c 100644 --- a/Java/Endpoint Examples/Multipart Payload/Markdown.java +++ b/Java/Endpoint Examples/Multipart Payload/Markdown.java @@ -14,9 +14,10 @@ public class Markdown { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/MergedPDF.java b/Java/Endpoint Examples/Multipart Payload/MergedPDF.java index 3d0ef7a7..022921e1 100644 --- a/Java/Endpoint Examples/Multipart Payload/MergedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/MergedPDF.java @@ -14,9 +14,10 @@ public class MergedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the paths to your file here, or as the arguments when running the program. private static final String[] DEFAULT_FILE_PATHS = diff --git a/Java/Endpoint Examples/Multipart Payload/PDF.java b/Java/Endpoint Examples/Multipart Payload/PDF.java index c766adb5..ef514904 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDF.java +++ b/Java/Endpoint Examples/Multipart Payload/PDF.java @@ -10,9 +10,10 @@ public class PDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFA.java b/Java/Endpoint Examples/Multipart Payload/PDFA.java index 7fe6724f..00534112 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFA.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFA.java @@ -10,9 +10,10 @@ public class PDFA { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFInfo.java b/Java/Endpoint Examples/Multipart Payload/PDFInfo.java index e3cdb3b9..69a845eb 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFInfo.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFInfo.java @@ -10,9 +10,10 @@ public class PDFInfo { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithAcroforms.java b/Java/Endpoint Examples/Multipart Payload/PDFWithAcroforms.java index 2f063754..669ddc55 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithAcroforms.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithAcroforms.java @@ -14,9 +14,10 @@ public class PDFWithAcroforms { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedAttachment.java b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedAttachment.java index 4d6d2b9f..0d8ca087 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedAttachment.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedAttachment.java @@ -15,9 +15,10 @@ public class PDFWithAddedAttachment { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedImage.java b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedImage.java index 583bfc2c..49c96ea6 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedImage.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedImage.java @@ -10,9 +10,10 @@ public class PDFWithAddedImage { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedText.java b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedText.java index 49c0a37f..73dd1d7a 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedText.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedText.java @@ -10,9 +10,10 @@ public class PDFWithAddedText { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithConvertedColors.java b/Java/Endpoint Examples/Multipart Payload/PDFWithConvertedColors.java index 0e94bc2e..0480dc57 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithConvertedColors.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithConvertedColors.java @@ -15,9 +15,10 @@ public class PDFWithConvertedColors { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithImportedFormData.java b/Java/Endpoint Examples/Multipart Payload/PDFWithImportedFormData.java index e66457ae..1a16b713 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithImportedFormData.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithImportedFormData.java @@ -10,9 +10,10 @@ public class PDFWithImportedFormData { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithOCRText.java b/Java/Endpoint Examples/Multipart Payload/PDFWithOCRText.java index 5938734d..94c80a29 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithOCRText.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithOCRText.java @@ -15,9 +15,10 @@ public class PDFWithOCRText { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithPageBoxesSet.java b/Java/Endpoint Examples/Multipart Payload/PDFWithPageBoxesSet.java index c71df8b0..8b00fef6 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithPageBoxesSet.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithPageBoxesSet.java @@ -11,9 +11,10 @@ public class PDFWithPageBoxesSet { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextApplied.java b/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextApplied.java index 58c6fdde..78125f67 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextApplied.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextApplied.java @@ -15,9 +15,10 @@ public class PDFWithRedactedTextApplied { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextPreview.java b/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextPreview.java index 6077baa0..03f8aceb 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextPreview.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextPreview.java @@ -10,9 +10,10 @@ public class PDFWithRedactedTextPreview { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFX.java b/Java/Endpoint Examples/Multipart Payload/PDFX.java index 2081b717..21bc74fb 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFX.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFX.java @@ -10,9 +10,10 @@ public class PDFX { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/Png.java b/Java/Endpoint Examples/Multipart Payload/Png.java index c08a8492..c992cec5 100644 --- a/Java/Endpoint Examples/Multipart Payload/Png.java +++ b/Java/Endpoint Examples/Multipart Payload/Png.java @@ -10,9 +10,10 @@ public class Png { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/Powerpoint.java b/Java/Endpoint Examples/Multipart Payload/Powerpoint.java index 5eb71905..78a22cf9 100644 --- a/Java/Endpoint Examples/Multipart Payload/Powerpoint.java +++ b/Java/Endpoint Examples/Multipart Payload/Powerpoint.java @@ -15,9 +15,10 @@ public class Powerpoint { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/RasterizedPDF.java b/Java/Endpoint Examples/Multipart Payload/RasterizedPDF.java index 0fb7644d..d38abe2d 100644 --- a/Java/Endpoint Examples/Multipart Payload/RasterizedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/RasterizedPDF.java @@ -10,9 +10,10 @@ public class RasterizedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/RequestStatus.java b/Java/Endpoint Examples/Multipart Payload/RequestStatus.java index 64257464..5ef0870d 100644 --- a/Java/Endpoint Examples/Multipart Payload/RequestStatus.java +++ b/Java/Endpoint Examples/Multipart Payload/RequestStatus.java @@ -10,9 +10,10 @@ public class RequestStatus { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. diff --git a/Java/Endpoint Examples/Multipart Payload/RestrictedPDF.java b/Java/Endpoint Examples/Multipart Payload/RestrictedPDF.java index cc2fa698..a08217c2 100644 --- a/Java/Endpoint Examples/Multipart Payload/RestrictedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/RestrictedPDF.java @@ -10,9 +10,10 @@ public class RestrictedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/SignedPDF.java b/Java/Endpoint Examples/Multipart Payload/SignedPDF.java index 7ddbf345..6b5991f3 100644 --- a/Java/Endpoint Examples/Multipart Payload/SignedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/SignedPDF.java @@ -10,9 +10,10 @@ public class SignedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. diff --git a/Java/Endpoint Examples/Multipart Payload/SignedPDFNonPFX.java b/Java/Endpoint Examples/Multipart Payload/SignedPDFNonPFX.java index fba2903f..da54ab94 100644 --- a/Java/Endpoint Examples/Multipart Payload/SignedPDFNonPFX.java +++ b/Java/Endpoint Examples/Multipart Payload/SignedPDFNonPFX.java @@ -10,9 +10,10 @@ public class SignedPDFNonPFX { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. diff --git a/Java/Endpoint Examples/Multipart Payload/SplitPDF.java b/Java/Endpoint Examples/Multipart Payload/SplitPDF.java index b3dda0fe..90ecaec7 100644 --- a/Java/Endpoint Examples/Multipart Payload/SplitPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/SplitPDF.java @@ -10,9 +10,10 @@ public class SplitPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/Tif.java b/Java/Endpoint Examples/Multipart Payload/Tif.java index ef966326..1f346a9c 100644 --- a/Java/Endpoint Examples/Multipart Payload/Tif.java +++ b/Java/Endpoint Examples/Multipart Payload/Tif.java @@ -10,9 +10,10 @@ public class Tif { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/UnrestrictedPDF.java b/Java/Endpoint Examples/Multipart Payload/UnrestrictedPDF.java index b93e0e46..6d96c75b 100644 --- a/Java/Endpoint Examples/Multipart Payload/UnrestrictedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/UnrestrictedPDF.java @@ -10,9 +10,10 @@ public class UnrestrictedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/Unzip.java b/Java/Endpoint Examples/Multipart Payload/Unzip.java index 22362356..6bf58f61 100644 --- a/Java/Endpoint Examples/Multipart Payload/Unzip.java +++ b/Java/Endpoint Examples/Multipart Payload/Unzip.java @@ -10,9 +10,10 @@ public class Unzip { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.zip"; diff --git a/Java/Endpoint Examples/Multipart Payload/UpToolkit.java b/Java/Endpoint Examples/Multipart Payload/UpToolkit.java index d4775cff..949c04bf 100644 --- a/Java/Endpoint Examples/Multipart Payload/UpToolkit.java +++ b/Java/Endpoint Examples/Multipart Payload/UpToolkit.java @@ -10,9 +10,10 @@ public class UpToolkit { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; public static void main(String[] args) { // up-forms and up-office can be used to query the other tools diff --git a/Java/Endpoint Examples/Multipart Payload/Upload.java b/Java/Endpoint Examples/Multipart Payload/Upload.java index 73f3c5fa..e2aa728e 100644 --- a/Java/Endpoint Examples/Multipart Payload/Upload.java +++ b/Java/Endpoint Examples/Multipart Payload/Upload.java @@ -9,9 +9,10 @@ public class Upload { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the paths to your file here, or as the arguments when running the program. private static final String[] DEFAULT_FILE_PATHS = diff --git a/Java/Endpoint Examples/Multipart Payload/WatermarkedPDF.java b/Java/Endpoint Examples/Multipart Payload/WatermarkedPDF.java index b953b5f5..2b1c5f4f 100644 --- a/Java/Endpoint Examples/Multipart Payload/WatermarkedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/WatermarkedPDF.java @@ -10,9 +10,10 @@ public class WatermarkedPDF { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/Word.java b/Java/Endpoint Examples/Multipart Payload/Word.java index aaeafc40..1316e06e 100644 --- a/Java/Endpoint Examples/Multipart Payload/Word.java +++ b/Java/Endpoint Examples/Multipart Payload/Word.java @@ -15,9 +15,10 @@ public class Word { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the path to your file here, or as the first argument when running the program. private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf"; diff --git a/Java/Endpoint Examples/Multipart Payload/Zip.java b/Java/Endpoint Examples/Multipart Payload/Zip.java index c7e55409..b990d71b 100644 --- a/Java/Endpoint Examples/Multipart Payload/Zip.java +++ b/Java/Endpoint Examples/Multipart Payload/Zip.java @@ -9,9 +9,10 @@ public class Zip { // By default, we use the US-based API service. This is the primary endpoint for global use. private static final String API_URL = "https://api.pdfrest.com"; - // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. + // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based + // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - //private static final String API_URL = "https://eu-api.pdfrest.com"; + // private static final String API_URL = "https://eu-api.pdfrest.com"; // Specify the paths to your file here, or as the arguments when running the program. private static final String[] DEFAULT_FILE_PATHS = From 5e62930edba367af6a0e5c35c2cc0eabfe40e6ec Mon Sep 17 00:00:00 2001 From: Taylor Smith Date: Thu, 11 Sep 2025 13:45:58 -0500 Subject: [PATCH 07/11] Correct space in cURL samples url --- cURL/Complex Flow Examples/decrypt-add-reencrypt.sh | 2 +- cURL/Complex Flow Examples/merge-different-file-types.sh | 2 +- cURL/Complex Flow Examples/ocr-with-extract-text.sh | 2 +- cURL/Complex Flow Examples/pdfa-3b-with-attachment.sh | 2 +- cURL/Complex Flow Examples/preserve-word-document.sh | 2 +- cURL/Complex Flow Examples/protected-watermark.sh | 2 +- cURL/Complex Flow Examples/redact-preview-and-finalize.sh | 2 +- cURL/Endpoint Examples/JSON Payload/batch-delete.sh | 2 +- cURL/Endpoint Examples/JSON Payload/bmp.sh | 2 +- cURL/Endpoint Examples/JSON Payload/compressed-pdf.sh | 2 +- .../JSON Payload/decrypted-pdf-with-permissions-password.sh | 2 +- cURL/Endpoint Examples/JSON Payload/decrypted-pdf.sh | 2 +- cURL/Endpoint Examples/JSON Payload/delete-resource.sh | 2 +- .../JSON Payload/encrypted-pdf-change-password.sh | 2 +- .../encrypted-pdf-new-password-with-permissions-password.sh | 2 +- cURL/Endpoint Examples/JSON Payload/encrypted-pdf.sh | 2 +- cURL/Endpoint Examples/JSON Payload/excel.sh | 2 +- cURL/Endpoint Examples/JSON Payload/exported-form-data.sh | 2 +- cURL/Endpoint Examples/JSON Payload/extracted-images.sh | 2 +- cURL/Endpoint Examples/JSON Payload/extracted-text.sh | 2 +- .../Endpoint Examples/JSON Payload/flattened-annotations-pdf.sh | 2 +- cURL/Endpoint Examples/JSON Payload/flattened-forms-pdf.sh | 2 +- cURL/Endpoint Examples/JSON Payload/flattened-layers-pdf.sh | 2 +- .../JSON Payload/flattened-transparencies-pdf-medium.sh | 2 +- .../JSON Payload/flattened-transparencies-pdf.sh | 2 +- cURL/Endpoint Examples/JSON Payload/get-resource.sh | 2 +- cURL/Endpoint Examples/JSON Payload/gif.sh | 2 +- cURL/Endpoint Examples/JSON Payload/jpg.sh | 2 +- cURL/Endpoint Examples/JSON Payload/linearized-pdf.sh | 2 +- cURL/Endpoint Examples/JSON Payload/markdown.sh | 2 +- cURL/Endpoint Examples/JSON Payload/merged-pdf.sh | 2 +- cURL/Endpoint Examples/JSON Payload/pdf-html-to-pdf.sh | 2 +- cURL/Endpoint Examples/JSON Payload/pdf-info.sh | 2 +- cURL/Endpoint Examples/JSON Payload/pdf-with-acroforms.sh | 2 +- .../Endpoint Examples/JSON Payload/pdf-with-added-attachment.sh | 2 +- cURL/Endpoint Examples/JSON Payload/pdf-with-added-image.sh | 2 +- cURL/Endpoint Examples/JSON Payload/pdf-with-added-text.sh | 2 +- .../Endpoint Examples/JSON Payload/pdf-with-converted-colors.sh | 2 +- .../JSON Payload/pdf-with-imported-form-data.sh | 2 +- cURL/Endpoint Examples/JSON Payload/pdf-with-ocr-text.sh | 2 +- cURL/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.sh | 2 +- .../JSON Payload/pdf-with-redacted-text-applied.sh | 2 +- .../JSON Payload/pdf-with-redacted-text-preview.sh | 2 +- cURL/Endpoint Examples/JSON Payload/pdf.sh | 2 +- cURL/Endpoint Examples/JSON Payload/pdfa.sh | 2 +- cURL/Endpoint Examples/JSON Payload/pdfx.sh | 2 +- cURL/Endpoint Examples/JSON Payload/png.sh | 2 +- cURL/Endpoint Examples/JSON Payload/powerpoint.sh | 2 +- cURL/Endpoint Examples/JSON Payload/rasterized-pdf.sh | 2 +- .../restricted-pdf-add-password-and-restrictions.sh | 2 +- .../restricted-pdf-add-password-with-open-password.sh | 2 +- .../JSON Payload/restricted-pdf-change-password.sh | 2 +- cURL/Endpoint Examples/JSON Payload/restricted-pdf.sh | 2 +- cURL/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.sh | 2 +- cURL/Endpoint Examples/JSON Payload/signed-pdf.sh | 2 +- cURL/Endpoint Examples/JSON Payload/split-pdf-custom-ranges.sh | 2 +- cURL/Endpoint Examples/JSON Payload/split-pdf-delete-page.sh | 2 +- cURL/Endpoint Examples/JSON Payload/split-pdf-odd-and-even.sh | 2 +- cURL/Endpoint Examples/JSON Payload/split-pdf.sh | 2 +- cURL/Endpoint Examples/JSON Payload/tif.sh | 2 +- .../JSON Payload/unrestricted-pdf-with-open-password.sh | 2 +- cURL/Endpoint Examples/JSON Payload/unrestricted-pdf.sh | 2 +- cURL/Endpoint Examples/JSON Payload/unzip.sh | 2 +- cURL/Endpoint Examples/JSON Payload/up-toolkit.sh | 2 +- cURL/Endpoint Examples/JSON Payload/upload.sh | 2 +- cURL/Endpoint Examples/JSON Payload/watermarked-pdf-image.sh | 2 +- cURL/Endpoint Examples/JSON Payload/watermarked-pdf.sh | 2 +- cURL/Endpoint Examples/JSON Payload/word.sh | 2 +- cURL/Endpoint Examples/JSON Payload/zip.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/batch-delete.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/bmp.sh | 2 +- .../Multipart Payload/compressed-pdf-custom.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/compressed-pdf.sh | 2 +- .../decrypted-pdf-with-permissions-password.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/decrypted-pdf.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/delete-resource.sh | 2 +- .../Multipart Payload/encrypted-pdf-change-password.sh | 2 +- .../encrypted-pdf-new-password-with-permissions-password.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/encrypted-pdf.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/excel.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/exported-form-data.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/extracted-images.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/extracted-text.sh | 2 +- .../Multipart Payload/flattened-annotations-pdf.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/flattened-forms-pdf.sh | 2 +- .../Endpoint Examples/Multipart Payload/flattened-layers-pdf.sh | 2 +- .../Multipart Payload/flattened-transparencies-pdf-medium.sh | 2 +- .../Multipart Payload/flattened-transparencies-pdf.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/get-resource.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/gif.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/jpg.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/linearized-pdf.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/markdown.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/merged-pdf.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/pdf-html-to-pdf.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/pdf-info.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/pdf-with-acroforms.sh | 2 +- .../Multipart Payload/pdf-with-added-attachment.sh | 2 +- .../Endpoint Examples/Multipart Payload/pdf-with-added-image.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/pdf-with-added-text.sh | 2 +- .../Multipart Payload/pdf-with-converted-colors.sh | 2 +- .../Multipart Payload/pdf-with-imported-form-data.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.sh | 2 +- .../Multipart Payload/pdf-with-page-boxes-set.sh | 2 +- .../Multipart Payload/pdf-with-redacted-text-applied.sh | 2 +- .../Multipart Payload/pdf-with-redacted-text-preview.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/pdf.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/pdfa.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/pdfx.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/png.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/powerpoint.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/rasterized-pdf.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/request-status.sh | 2 +- .../restricted-pdf-add-password-and-restrictions.sh | 2 +- .../restricted-pdf-add-password-with-open-password.sh | 2 +- .../Multipart Payload/restricted-pdf-change-password.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/restricted-pdf.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/signed-pdf.sh | 2 +- .../Multipart Payload/split-pdf-custom-ranges.sh | 2 +- .../Multipart Payload/split-pdf-delete-page.sh | 2 +- .../Multipart Payload/split-pdf-odd-and-even.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/split-pdf.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/tif.sh | 2 +- .../Multipart Payload/unrestricted-pdf-with-open-password.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/unzip.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/up-toolkit.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/upload.sh | 2 +- .../Multipart Payload/watermarked-pdf-image.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/watermarked-pdf.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/word.sh | 2 +- cURL/Endpoint Examples/Multipart Payload/zip.sh | 2 +- 133 files changed, 133 insertions(+), 133 deletions(-) diff --git a/cURL/Complex Flow Examples/decrypt-add-reencrypt.sh b/cURL/Complex Flow Examples/decrypt-add-reencrypt.sh index 519f5893..99c61fcf 100755 --- a/cURL/Complex Flow Examples/decrypt-add-reencrypt.sh +++ b/cURL/Complex Flow Examples/decrypt-add-reencrypt.sh @@ -13,7 +13,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" API_KEY="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # place your api key here diff --git a/cURL/Complex Flow Examples/merge-different-file-types.sh b/cURL/Complex Flow Examples/merge-different-file-types.sh index 61980799..0eca0672 100755 --- a/cURL/Complex Flow Examples/merge-different-file-types.sh +++ b/cURL/Complex Flow Examples/merge-different-file-types.sh @@ -16,7 +16,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" API_KEY="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # place your api key here diff --git a/cURL/Complex Flow Examples/ocr-with-extract-text.sh b/cURL/Complex Flow Examples/ocr-with-extract-text.sh index 44f590e2..3ad26dd8 100755 --- a/cURL/Complex Flow Examples/ocr-with-extract-text.sh +++ b/cURL/Complex Flow Examples/ocr-with-extract-text.sh @@ -13,7 +13,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" API_KEY="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # Replace with your API key diff --git a/cURL/Complex Flow Examples/pdfa-3b-with-attachment.sh b/cURL/Complex Flow Examples/pdfa-3b-with-attachment.sh index f031fdf9..d5ebdd51 100755 --- a/cURL/Complex Flow Examples/pdfa-3b-with-attachment.sh +++ b/cURL/Complex Flow Examples/pdfa-3b-with-attachment.sh @@ -14,7 +14,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" API_KEY="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # place your api key here diff --git a/cURL/Complex Flow Examples/preserve-word-document.sh b/cURL/Complex Flow Examples/preserve-word-document.sh index e2c46f2a..7c33d820 100755 --- a/cURL/Complex Flow Examples/preserve-word-document.sh +++ b/cURL/Complex Flow Examples/preserve-word-document.sh @@ -11,7 +11,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" API_KEY="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # place your api key here diff --git a/cURL/Complex Flow Examples/protected-watermark.sh b/cURL/Complex Flow Examples/protected-watermark.sh index bf8a8c45..8f3af36e 100755 --- a/cURL/Complex Flow Examples/protected-watermark.sh +++ b/cURL/Complex Flow Examples/protected-watermark.sh @@ -11,7 +11,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" API_KEY="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # place your api key here diff --git a/cURL/Complex Flow Examples/redact-preview-and-finalize.sh b/cURL/Complex Flow Examples/redact-preview-and-finalize.sh index ad1a8630..d7ef53dd 100644 --- a/cURL/Complex Flow Examples/redact-preview-and-finalize.sh +++ b/cURL/Complex Flow Examples/redact-preview-and-finalize.sh @@ -11,7 +11,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" API_KEY="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # place your api key here REDACTIONS='[{"type":"regex","value":"[Tt]he"}]' diff --git a/cURL/Endpoint Examples/JSON Payload/batch-delete.sh b/cURL/Endpoint Examples/JSON Payload/batch-delete.sh index 3d94bc27..a0049baa 100755 --- a/cURL/Endpoint Examples/JSON Payload/batch-delete.sh +++ b/cURL/Endpoint Examples/JSON Payload/batch-delete.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl --request POST "$API_URL/delete" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/bmp.sh b/cURL/Endpoint Examples/JSON Payload/bmp.sh index d387532b..f7de83ec 100755 --- a/cURL/Endpoint Examples/JSON Payload/bmp.sh +++ b/cURL/Endpoint Examples/JSON Payload/bmp.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/compressed-pdf.sh b/cURL/Endpoint Examples/JSON Payload/compressed-pdf.sh index 86058712..c285d3e1 100755 --- a/cURL/Endpoint Examples/JSON Payload/compressed-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/compressed-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/decrypted-pdf-with-permissions-password.sh b/cURL/Endpoint Examples/JSON Payload/decrypted-pdf-with-permissions-password.sh index 087f86a7..057563ac 100755 --- a/cURL/Endpoint Examples/JSON Payload/decrypted-pdf-with-permissions-password.sh +++ b/cURL/Endpoint Examples/JSON Payload/decrypted-pdf-with-permissions-password.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/decrypted-pdf.sh b/cURL/Endpoint Examples/JSON Payload/decrypted-pdf.sh index fc82c3f4..cea56c87 100755 --- a/cURL/Endpoint Examples/JSON Payload/decrypted-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/decrypted-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/delete-resource.sh b/cURL/Endpoint Examples/JSON Payload/delete-resource.sh index ec2d2eac..83975ddb 100755 --- a/cURL/Endpoint Examples/JSON Payload/delete-resource.sh +++ b/cURL/Endpoint Examples/JSON Payload/delete-resource.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl --request DELETE "$API_URL/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-change-password.sh b/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-change-password.sh index 4136a4fa..b0f1f2cd 100755 --- a/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-change-password.sh +++ b/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-change-password.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-new-password-with-permissions-password.sh b/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-new-password-with-permissions-password.sh index 5d47675f..9bcc2dac 100755 --- a/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-new-password-with-permissions-password.sh +++ b/cURL/Endpoint Examples/JSON Payload/encrypted-pdf-new-password-with-permissions-password.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/encrypted-pdf.sh b/cURL/Endpoint Examples/JSON Payload/encrypted-pdf.sh index b76720db..9685cf41 100755 --- a/cURL/Endpoint Examples/JSON Payload/encrypted-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/encrypted-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/excel.sh b/cURL/Endpoint Examples/JSON Payload/excel.sh index 884a340c..982e7e44 100644 --- a/cURL/Endpoint Examples/JSON Payload/excel.sh +++ b/cURL/Endpoint Examples/JSON Payload/excel.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/exported-form-data.sh b/cURL/Endpoint Examples/JSON Payload/exported-form-data.sh index 76cc28d4..a2622bb8 100755 --- a/cURL/Endpoint Examples/JSON Payload/exported-form-data.sh +++ b/cURL/Endpoint Examples/JSON Payload/exported-form-data.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/extracted-images.sh b/cURL/Endpoint Examples/JSON Payload/extracted-images.sh index f1630a3a..594ca7a0 100755 --- a/cURL/Endpoint Examples/JSON Payload/extracted-images.sh +++ b/cURL/Endpoint Examples/JSON Payload/extracted-images.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/extracted-text.sh b/cURL/Endpoint Examples/JSON Payload/extracted-text.sh index e29c5dac..884eb7c3 100755 --- a/cURL/Endpoint Examples/JSON Payload/extracted-text.sh +++ b/cURL/Endpoint Examples/JSON Payload/extracted-text.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/flattened-annotations-pdf.sh b/cURL/Endpoint Examples/JSON Payload/flattened-annotations-pdf.sh index 614f92c0..7a1fd9d1 100755 --- a/cURL/Endpoint Examples/JSON Payload/flattened-annotations-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/flattened-annotations-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/flattened-forms-pdf.sh b/cURL/Endpoint Examples/JSON Payload/flattened-forms-pdf.sh index 8e559538..22f87f5d 100755 --- a/cURL/Endpoint Examples/JSON Payload/flattened-forms-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/flattened-forms-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/flattened-layers-pdf.sh b/cURL/Endpoint Examples/JSON Payload/flattened-layers-pdf.sh index b83264e7..c1274446 100755 --- a/cURL/Endpoint Examples/JSON Payload/flattened-layers-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/flattened-layers-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf-medium.sh b/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf-medium.sh index 4760d870..a87b1572 100755 --- a/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf-medium.sh +++ b/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf-medium.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.sh b/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.sh index fe2c62c8..4434dd40 100755 --- a/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/get-resource.sh b/cURL/Endpoint Examples/JSON Payload/get-resource.sh index 81f12599..4a4169c1 100755 --- a/cURL/Endpoint Examples/JSON Payload/get-resource.sh +++ b/cURL/Endpoint Examples/JSON Payload/get-resource.sh @@ -3,6 +3,6 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X GET "$API_URL/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?format=url" diff --git a/cURL/Endpoint Examples/JSON Payload/gif.sh b/cURL/Endpoint Examples/JSON Payload/gif.sh index f7264b8f..dbc46afd 100755 --- a/cURL/Endpoint Examples/JSON Payload/gif.sh +++ b/cURL/Endpoint Examples/JSON Payload/gif.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/jpg.sh b/cURL/Endpoint Examples/JSON Payload/jpg.sh index a5829791..50c7be01 100755 --- a/cURL/Endpoint Examples/JSON Payload/jpg.sh +++ b/cURL/Endpoint Examples/JSON Payload/jpg.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/linearized-pdf.sh b/cURL/Endpoint Examples/JSON Payload/linearized-pdf.sh index 91874f8c..6f1c8b80 100755 --- a/cURL/Endpoint Examples/JSON Payload/linearized-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/linearized-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/markdown.sh b/cURL/Endpoint Examples/JSON Payload/markdown.sh index d239acd6..35f9b8ac 100644 --- a/cURL/Endpoint Examples/JSON Payload/markdown.sh +++ b/cURL/Endpoint Examples/JSON Payload/markdown.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/merged-pdf.sh b/cURL/Endpoint Examples/JSON Payload/merged-pdf.sh index 4a919729..ed311275 100755 --- a/cURL/Endpoint Examples/JSON Payload/merged-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/merged-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_FIRST_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-html-to-pdf.sh b/cURL/Endpoint Examples/JSON Payload/pdf-html-to-pdf.sh index cf4a61da..1c996e65 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-html-to-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-html-to-pdf.sh @@ -4,7 +4,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl "$API_URL/pdf" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-info.sh b/cURL/Endpoint Examples/JSON Payload/pdf-info.sh index 16391dd0..66d621bb 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-info.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-info.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-acroforms.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-acroforms.sh index a0e4f169..b448816a 100644 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-acroforms.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-acroforms.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-added-attachment.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-added-attachment.sh index 7ae5e6b0..e85f927e 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-added-attachment.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-added-attachment.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_PDF_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-added-image.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-added-image.sh index e5dffeb1..ad52426d 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-added-image.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-added-image.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_PDF_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-added-text.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-added-text.sh index 33bffc98..8b1e49a9 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-added-text.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-added-text.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-converted-colors.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-converted-colors.sh index d8e6452a..72566b6b 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-converted-colors.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-converted-colors.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.sh index cc3406c6..7f39d260 100644 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_PDF_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-ocr-text.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-ocr-text.sh index 7459e7f8..06f47402 100644 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-ocr-text.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-ocr-text.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.sh index a1a4fdd1..15402008 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.sh index 32762ab8..2751b2b7 100644 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.sh b/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.sh index 307e4982..30dc819d 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdf.sh b/cURL/Endpoint Examples/JSON Payload/pdf.sh index 5b8272b5..283bef0a 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdfa.sh b/cURL/Endpoint Examples/JSON Payload/pdfa.sh index b0bb17dd..60cd0486 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdfa.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdfa.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/pdfx.sh b/cURL/Endpoint Examples/JSON Payload/pdfx.sh index ec888500..58f663ac 100755 --- a/cURL/Endpoint Examples/JSON Payload/pdfx.sh +++ b/cURL/Endpoint Examples/JSON Payload/pdfx.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/png.sh b/cURL/Endpoint Examples/JSON Payload/png.sh index 0c834d83..57337e50 100755 --- a/cURL/Endpoint Examples/JSON Payload/png.sh +++ b/cURL/Endpoint Examples/JSON Payload/png.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/powerpoint.sh b/cURL/Endpoint Examples/JSON Payload/powerpoint.sh index 4ab21061..714390fa 100644 --- a/cURL/Endpoint Examples/JSON Payload/powerpoint.sh +++ b/cURL/Endpoint Examples/JSON Payload/powerpoint.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/rasterized-pdf.sh b/cURL/Endpoint Examples/JSON Payload/rasterized-pdf.sh index bdca4353..568bfdef 100755 --- a/cURL/Endpoint Examples/JSON Payload/rasterized-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/rasterized-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-and-restrictions.sh b/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-and-restrictions.sh index f49fedcc..529f7523 100755 --- a/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-and-restrictions.sh +++ b/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-and-restrictions.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-with-open-password.sh b/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-with-open-password.sh index 417c7e08..572baf42 100755 --- a/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-with-open-password.sh +++ b/cURL/Endpoint Examples/JSON Payload/restricted-pdf-add-password-with-open-password.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/restricted-pdf-change-password.sh b/cURL/Endpoint Examples/JSON Payload/restricted-pdf-change-password.sh index 0f6cc64d..cafa7b96 100755 --- a/cURL/Endpoint Examples/JSON Payload/restricted-pdf-change-password.sh +++ b/cURL/Endpoint Examples/JSON Payload/restricted-pdf-change-password.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/restricted-pdf.sh b/cURL/Endpoint Examples/JSON Payload/restricted-pdf.sh index 6aa62bd3..e636e5e1 100755 --- a/cURL/Endpoint Examples/JSON Payload/restricted-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/restricted-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.sh b/cURL/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.sh index a1e4a58a..a30dc839 100644 --- a/cURL/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.sh +++ b/cURL/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" API_KEY=xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx diff --git a/cURL/Endpoint Examples/JSON Payload/signed-pdf.sh b/cURL/Endpoint Examples/JSON Payload/signed-pdf.sh index e17b1b19..49b0d57c 100755 --- a/cURL/Endpoint Examples/JSON Payload/signed-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/signed-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" API_KEY=xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx diff --git a/cURL/Endpoint Examples/JSON Payload/split-pdf-custom-ranges.sh b/cURL/Endpoint Examples/JSON Payload/split-pdf-custom-ranges.sh index 00f129de..58a3cb69 100755 --- a/cURL/Endpoint Examples/JSON Payload/split-pdf-custom-ranges.sh +++ b/cURL/Endpoint Examples/JSON Payload/split-pdf-custom-ranges.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/split-pdf-delete-page.sh b/cURL/Endpoint Examples/JSON Payload/split-pdf-delete-page.sh index 13e39398..050b32b3 100755 --- a/cURL/Endpoint Examples/JSON Payload/split-pdf-delete-page.sh +++ b/cURL/Endpoint Examples/JSON Payload/split-pdf-delete-page.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/split-pdf-odd-and-even.sh b/cURL/Endpoint Examples/JSON Payload/split-pdf-odd-and-even.sh index 333f40c3..759f5e65 100755 --- a/cURL/Endpoint Examples/JSON Payload/split-pdf-odd-and-even.sh +++ b/cURL/Endpoint Examples/JSON Payload/split-pdf-odd-and-even.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/split-pdf.sh b/cURL/Endpoint Examples/JSON Payload/split-pdf.sh index 7a71de34..7628b6ca 100755 --- a/cURL/Endpoint Examples/JSON Payload/split-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/split-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/tif.sh b/cURL/Endpoint Examples/JSON Payload/tif.sh index 1ac85c01..2b7d9116 100755 --- a/cURL/Endpoint Examples/JSON Payload/tif.sh +++ b/cURL/Endpoint Examples/JSON Payload/tif.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf-with-open-password.sh b/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf-with-open-password.sh index 95741c3f..0ccf95fb 100755 --- a/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf-with-open-password.sh +++ b/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf-with-open-password.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf.sh b/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf.sh index 53abf3ed..fdcdaf5e 100755 --- a/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/unrestricted-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/unzip.sh b/cURL/Endpoint Examples/JSON Payload/unzip.sh index ceb032c5..18690d10 100755 --- a/cURL/Endpoint Examples/JSON Payload/unzip.sh +++ b/cURL/Endpoint Examples/JSON Payload/unzip.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/up-toolkit.sh b/cURL/Endpoint Examples/JSON Payload/up-toolkit.sh index ed45c5e6..1b00a3d1 100755 --- a/cURL/Endpoint Examples/JSON Payload/up-toolkit.sh +++ b/cURL/Endpoint Examples/JSON Payload/up-toolkit.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" #up-forms and up-office can be used to query the other tools curl -X GET "$API_URL/up-toolkit" diff --git a/cURL/Endpoint Examples/JSON Payload/upload.sh b/cURL/Endpoint Examples/JSON Payload/upload.sh index 08defa09..9449307a 100755 --- a/cURL/Endpoint Examples/JSON Payload/upload.sh +++ b/cURL/Endpoint Examples/JSON Payload/upload.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'api-key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/watermarked-pdf-image.sh b/cURL/Endpoint Examples/JSON Payload/watermarked-pdf-image.sh index 3cdbad40..d386c109 100755 --- a/cURL/Endpoint Examples/JSON Payload/watermarked-pdf-image.sh +++ b/cURL/Endpoint Examples/JSON Payload/watermarked-pdf-image.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_PDF_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/watermarked-pdf.sh b/cURL/Endpoint Examples/JSON Payload/watermarked-pdf.sh index 23cdcae6..dc3a6e41 100755 --- a/cURL/Endpoint Examples/JSON Payload/watermarked-pdf.sh +++ b/cURL/Endpoint Examples/JSON Payload/watermarked-pdf.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_PDF_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/word.sh b/cURL/Endpoint Examples/JSON Payload/word.sh index 364fe1ec..9360cebc 100644 --- a/cURL/Endpoint Examples/JSON Payload/word.sh +++ b/cURL/Endpoint Examples/JSON Payload/word.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/JSON Payload/zip.sh b/cURL/Endpoint Examples/JSON Payload/zip.sh index fcffe1af..ab138747 100755 --- a/cURL/Endpoint Examples/JSON Payload/zip.sh +++ b/cURL/Endpoint Examples/JSON Payload/zip.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UPLOAD_FIRST_FILE_ID=$(curl --location "$API_URL/upload" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/Multipart Payload/batch-delete.sh b/cURL/Endpoint Examples/Multipart Payload/batch-delete.sh index 65f223ef..d5f8a605 100755 --- a/cURL/Endpoint Examples/Multipart Payload/batch-delete.sh +++ b/cURL/Endpoint Examples/Multipart Payload/batch-delete.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/delete" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/bmp.sh b/cURL/Endpoint Examples/Multipart Payload/bmp.sh index 66659f20..83f41d6c 100755 --- a/cURL/Endpoint Examples/Multipart Payload/bmp.sh +++ b/cURL/Endpoint Examples/Multipart Payload/bmp.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/bmp" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/compressed-pdf-custom.sh b/cURL/Endpoint Examples/Multipart Payload/compressed-pdf-custom.sh index a2ea1703..d02261e4 100755 --- a/cURL/Endpoint Examples/Multipart Payload/compressed-pdf-custom.sh +++ b/cURL/Endpoint Examples/Multipart Payload/compressed-pdf-custom.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/compressed-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/compressed-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/compressed-pdf.sh index 6eab236e..2ff06c70 100755 --- a/cURL/Endpoint Examples/Multipart Payload/compressed-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/compressed-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/compressed-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf-with-permissions-password.sh b/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf-with-permissions-password.sh index 93e90f15..22c6e37a 100755 --- a/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf-with-permissions-password.sh +++ b/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf-with-permissions-password.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" DECRYPTED_OUTPUT=$(curl -X POST "$API_URL/decrypted-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf.sh index 265df0ef..2620e520 100755 --- a/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/decrypted-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" DECRYPTED_OUTPUT=$(curl -X POST "$API_URL/decrypted-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/delete-resource.sh b/cURL/Endpoint Examples/Multipart Payload/delete-resource.sh index ec2d2eac..83975ddb 100644 --- a/cURL/Endpoint Examples/Multipart Payload/delete-resource.sh +++ b/cURL/Endpoint Examples/Multipart Payload/delete-resource.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl --request DELETE "$API_URL/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ --header 'Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ diff --git a/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-change-password.sh b/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-change-password.sh index fe890eac..6c212a09 100755 --- a/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-change-password.sh +++ b/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-change-password.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" ENCRYPTED_OUTPUT=$(curl -X POST "$API_URL/encrypted-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-new-password-with-permissions-password.sh b/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-new-password-with-permissions-password.sh index 8df8ead2..dad05217 100755 --- a/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-new-password-with-permissions-password.sh +++ b/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf-new-password-with-permissions-password.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" ENCRYPTED_OUTPUT=$(curl -X POST "$API_URL/encrypted-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf.sh index d2f9bdc4..2bd12fab 100755 --- a/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/encrypted-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" ENCRYPTED_OUTPUT=$(curl -X POST "$API_URL/encrypted-pdf" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/excel.sh b/cURL/Endpoint Examples/Multipart Payload/excel.sh index 27726556..4ebdeff6 100644 --- a/cURL/Endpoint Examples/Multipart Payload/excel.sh +++ b/cURL/Endpoint Examples/Multipart Payload/excel.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/excel" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/exported-form-data.sh b/cURL/Endpoint Examples/Multipart Payload/exported-form-data.sh index 9d84cbc3..8e99a941 100755 --- a/cURL/Endpoint Examples/Multipart Payload/exported-form-data.sh +++ b/cURL/Endpoint Examples/Multipart Payload/exported-form-data.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/exported-form-data" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/extracted-images.sh b/cURL/Endpoint Examples/Multipart Payload/extracted-images.sh index f11e8d00..ce5ec79f 100755 --- a/cURL/Endpoint Examples/Multipart Payload/extracted-images.sh +++ b/cURL/Endpoint Examples/Multipart Payload/extracted-images.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/extracted-images" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/extracted-text.sh b/cURL/Endpoint Examples/Multipart Payload/extracted-text.sh index a41285ba..692c792c 100755 --- a/cURL/Endpoint Examples/Multipart Payload/extracted-text.sh +++ b/cURL/Endpoint Examples/Multipart Payload/extracted-text.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/extracted-text" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.sh index 5711529f..2ac097a1 100755 --- a/cURL/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/flattened-annotations-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/flattened-forms-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/flattened-forms-pdf.sh index 61a8f963..2d49887a 100644 --- a/cURL/Endpoint Examples/Multipart Payload/flattened-forms-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/flattened-forms-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/flattened-forms-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/flattened-layers-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/flattened-layers-pdf.sh index 672dccd2..19c999d8 100755 --- a/cURL/Endpoint Examples/Multipart Payload/flattened-layers-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/flattened-layers-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/flattened-layers-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf-medium.sh b/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf-medium.sh index a3350ede..7a3bf209 100755 --- a/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf-medium.sh +++ b/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf-medium.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/flattened-transparencies-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.sh index 9ec4eb59..6dd2aea0 100755 --- a/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/flattened-transparencies-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/get-resource.sh b/cURL/Endpoint Examples/Multipart Payload/get-resource.sh index 81f12599..4a4169c1 100755 --- a/cURL/Endpoint Examples/Multipart Payload/get-resource.sh +++ b/cURL/Endpoint Examples/Multipart Payload/get-resource.sh @@ -3,6 +3,6 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X GET "$API_URL/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?format=url" diff --git a/cURL/Endpoint Examples/Multipart Payload/gif.sh b/cURL/Endpoint Examples/Multipart Payload/gif.sh index 8daedd95..037540f9 100755 --- a/cURL/Endpoint Examples/Multipart Payload/gif.sh +++ b/cURL/Endpoint Examples/Multipart Payload/gif.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/gif" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/jpg.sh b/cURL/Endpoint Examples/Multipart Payload/jpg.sh index 3a9ab275..11e9ff59 100755 --- a/cURL/Endpoint Examples/Multipart Payload/jpg.sh +++ b/cURL/Endpoint Examples/Multipart Payload/jpg.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/jpg" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/linearized-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/linearized-pdf.sh index 68a935f8..b8ef1d35 100755 --- a/cURL/Endpoint Examples/Multipart Payload/linearized-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/linearized-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/linearized-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/markdown.sh b/cURL/Endpoint Examples/Multipart Payload/markdown.sh index 80d7429d..c488b426 100644 --- a/cURL/Endpoint Examples/Multipart Payload/markdown.sh +++ b/cURL/Endpoint Examples/Multipart Payload/markdown.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/markdown" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/merged-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/merged-pdf.sh index 9254b04c..8b635be3 100755 --- a/cURL/Endpoint Examples/Multipart Payload/merged-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/merged-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/merged-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-html-to-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-html-to-pdf.sh index b7115ae5..242f1df7 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-html-to-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-html-to-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-info.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-info.sh index 48357bc8..ff52e99c 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-info.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-info.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/pdf-info" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-acroforms.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-acroforms.sh index 33879141..2e9b4a49 100644 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-acroforms.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-acroforms.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/pdf-with-acroforms" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.sh index 1d8550bc..e6009953 100644 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/pdf-with-added-attachment" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-image.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-image.sh index 000e621b..10e68127 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-image.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-image.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/pdf-with-added-image" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-text.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-text.sh index 75af22e3..1859e0ab 100644 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-text.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-added-text.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" TEXT_OPTIONS='[{"font":"Times New Roman","max_width":"175","opacity":"1","page":"1","rotation":"0","text":"sample text in PDF","text_color_rgb":"0,0,0","text_size":"30","x":"72","y":"144"}]' diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.sh index 49b7dbbc..52e1d3b7 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/pdf-with-converted-colors" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.sh index b5134474..053cdbe6 100644 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/pdf-with-imported-form-data" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.sh index 99ff6970..f36b70f9 100644 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/pdf-with-ocr-text" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.sh index a16264ec..dbe56dc7 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" BOXES='{"boxes":[{"box":"media","pages":[{"range":"1","left":100,"top":100,"bottom":100,"right":100}]}]}' diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.sh index 18c9f7c4..6159aec3 100644 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" REDACTED_OUTPUT=$(curl -X POST "$API_URL/pdf-with-redacted-text-applied" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.sh b/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.sh index 5e7be26e..a36bf9be 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" REDACTIONS='[{"type":"preset","value":"email"},{"type":"regex","value":"(\\+\\d{1,2}\\s)?\\(?\\d{3}\\)?[\\s.-]\\d{3}[\\s.-]\\d{4}"},{"type":"literal","value":"word"}]' diff --git a/cURL/Endpoint Examples/Multipart Payload/pdf.sh b/cURL/Endpoint Examples/Multipart Payload/pdf.sh index e5b64f8d..05ea220c 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdfa.sh b/cURL/Endpoint Examples/Multipart Payload/pdfa.sh index 10742058..a208338d 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdfa.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdfa.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/pdfa" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/pdfx.sh b/cURL/Endpoint Examples/Multipart Payload/pdfx.sh index e6133db2..532ca8f3 100755 --- a/cURL/Endpoint Examples/Multipart Payload/pdfx.sh +++ b/cURL/Endpoint Examples/Multipart Payload/pdfx.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/pdfx" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/png.sh b/cURL/Endpoint Examples/Multipart Payload/png.sh index 42e824b9..f23ed74e 100755 --- a/cURL/Endpoint Examples/Multipart Payload/png.sh +++ b/cURL/Endpoint Examples/Multipart Payload/png.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/png" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/powerpoint.sh b/cURL/Endpoint Examples/Multipart Payload/powerpoint.sh index 63f7d304..84edc970 100644 --- a/cURL/Endpoint Examples/Multipart Payload/powerpoint.sh +++ b/cURL/Endpoint Examples/Multipart Payload/powerpoint.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/powerpoint" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/rasterized-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/rasterized-pdf.sh index d36e4c8d..bc6f5fb2 100755 --- a/cURL/Endpoint Examples/Multipart Payload/rasterized-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/rasterized-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/rasterized-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/request-status.sh b/cURL/Endpoint Examples/Multipart Payload/request-status.sh index 91b8c20a..18e53886 100755 --- a/cURL/Endpoint Examples/Multipart Payload/request-status.sh +++ b/cURL/Endpoint Examples/Multipart Payload/request-status.sh @@ -5,7 +5,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" API_KEY="xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" diff --git a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-and-restrictions.sh b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-and-restrictions.sh index 5710de66..0704edd1 100755 --- a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-and-restrictions.sh +++ b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-and-restrictions.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" RESTRICTED_OUTPUT=$(curl -X POST "$API_URL/restricted-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-with-open-password.sh b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-with-open-password.sh index 979e0627..691c0209 100755 --- a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-with-open-password.sh +++ b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-add-password-with-open-password.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" RESTRICTED_OUTPUT=$(curl -X POST "$API_URL/restricted-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-change-password.sh b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-change-password.sh index 8d983c88..a4d99939 100755 --- a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-change-password.sh +++ b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf-change-password.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" RESTRICTED_OUTPUT=$(curl -X POST "$API_URL/restricted-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf.sh index dbaa40c2..7b53546e 100755 --- a/cURL/Endpoint Examples/Multipart Payload/restricted-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/restricted-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" RESTRICTED_OUTPUT=$(curl -X POST "$API_URL/restricted-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.sh b/cURL/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.sh index a78867eb..edb82b74 100644 --- a/cURL/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.sh +++ b/cURL/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" SIGNATURE_CONFIG='{"type": "new","name": "esignature","location": {"bottom_left": { "x": "0", "y": "0" },"top_right": { "x": "216", "y": "72" },"page": 1},"display": {"include_datetime": "true"}}' diff --git a/cURL/Endpoint Examples/Multipart Payload/signed-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/signed-pdf.sh index a69bc385..defb5ce1 100644 --- a/cURL/Endpoint Examples/Multipart Payload/signed-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/signed-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" SIGNATURE_CONFIG='{"type": "new","name": "esignature","logo_opacity": "0.25","location": {"bottom_left": { "x": "0", "y": "0" },"top_right": { "x": "216", "y": "72" },"page": 1},"display": {"include_distinguished_name": "true","include_datetime": "true","contact": "My contact info","location": "My location","name": "John Doe","reason": "My reason for signing"}}' diff --git a/cURL/Endpoint Examples/Multipart Payload/split-pdf-custom-ranges.sh b/cURL/Endpoint Examples/Multipart Payload/split-pdf-custom-ranges.sh index 8ac12057..884c7653 100755 --- a/cURL/Endpoint Examples/Multipart Payload/split-pdf-custom-ranges.sh +++ b/cURL/Endpoint Examples/Multipart Payload/split-pdf-custom-ranges.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/split-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/split-pdf-delete-page.sh b/cURL/Endpoint Examples/Multipart Payload/split-pdf-delete-page.sh index c0881f43..11fc3f28 100755 --- a/cURL/Endpoint Examples/Multipart Payload/split-pdf-delete-page.sh +++ b/cURL/Endpoint Examples/Multipart Payload/split-pdf-delete-page.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/split-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/split-pdf-odd-and-even.sh b/cURL/Endpoint Examples/Multipart Payload/split-pdf-odd-and-even.sh index 73cbfe11..a63c40d9 100755 --- a/cURL/Endpoint Examples/Multipart Payload/split-pdf-odd-and-even.sh +++ b/cURL/Endpoint Examples/Multipart Payload/split-pdf-odd-and-even.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/split-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/split-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/split-pdf.sh index edd2b5dc..2d24f969 100755 --- a/cURL/Endpoint Examples/Multipart Payload/split-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/split-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/split-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/tif.sh b/cURL/Endpoint Examples/Multipart Payload/tif.sh index 758060fd..f4bf2937 100755 --- a/cURL/Endpoint Examples/Multipart Payload/tif.sh +++ b/cURL/Endpoint Examples/Multipart Payload/tif.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/tif" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf-with-open-password.sh b/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf-with-open-password.sh index 17ae19a9..ce3456d8 100755 --- a/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf-with-open-password.sh +++ b/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf-with-open-password.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UNRESTRICTED_OUTPUT=$(curl -X POST "$API_URL/unrestricted-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf.sh index cdb15585..5b3e5c45 100755 --- a/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/unrestricted-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" UNRESTRICTED_OUTPUT=$(curl -X POST "$API_URL/unrestricted-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/unzip.sh b/cURL/Endpoint Examples/Multipart Payload/unzip.sh index 86180ac5..f7e75bdf 100755 --- a/cURL/Endpoint Examples/Multipart Payload/unzip.sh +++ b/cURL/Endpoint Examples/Multipart Payload/unzip.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/unzip" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/up-toolkit.sh b/cURL/Endpoint Examples/Multipart Payload/up-toolkit.sh index ed45c5e6..1b00a3d1 100755 --- a/cURL/Endpoint Examples/Multipart Payload/up-toolkit.sh +++ b/cURL/Endpoint Examples/Multipart Payload/up-toolkit.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" #up-forms and up-office can be used to query the other tools curl -X GET "$API_URL/up-toolkit" diff --git a/cURL/Endpoint Examples/Multipart Payload/upload.sh b/cURL/Endpoint Examples/Multipart Payload/upload.sh index c085ce79..bcbf8234 100755 --- a/cURL/Endpoint Examples/Multipart Payload/upload.sh +++ b/cURL/Endpoint Examples/Multipart Payload/upload.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/upload" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf-image.sh b/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf-image.sh index e96c414a..088fe61e 100755 --- a/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf-image.sh +++ b/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf-image.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" WATERMARKED_OUTPUT=$(curl -X POST "$API_URL/watermarked-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf.sh b/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf.sh index d7162a62..e4279127 100755 --- a/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf.sh +++ b/cURL/Endpoint Examples/Multipart Payload/watermarked-pdf.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" WATERMARKED_OUTPUT=$(curl -X POST "$API_URL/watermarked-pdf" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/word.sh b/cURL/Endpoint Examples/Multipart Payload/word.sh index bd63f95a..8a2d1b31 100644 --- a/cURL/Endpoint Examples/Multipart Payload/word.sh +++ b/cURL/Endpoint Examples/Multipart Payload/word.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/word" \ -H "Accept: application/json" \ diff --git a/cURL/Endpoint Examples/Multipart Payload/zip.sh b/cURL/Endpoint Examples/Multipart Payload/zip.sh index 97680ef8..9a98def2 100755 --- a/cURL/Endpoint Examples/Multipart Payload/zip.sh +++ b/cURL/Endpoint Examples/Multipart Payload/zip.sh @@ -3,7 +3,7 @@ API_URL="https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -# API_URL = "https://eu-api.pdfrest.com" +# API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/zip" \ -H "Accept: application/json" \ From 8366f977f48f8f2f80a25e9b803b46255dbec950 Mon Sep 17 00:00:00 2001 From: Taylor Smith Date: Thu, 11 Sep 2025 13:48:26 -0500 Subject: [PATCH 08/11] Correct '=' in Javascript --- Java/Endpoint Examples/JSON Payload/BatchDelete.java | 2 +- JavaScript/Complex Flow Examples/decrypt-add-reencrypt.js | 2 +- .../Complex Flow Examples/merge-different-file-types.js | 2 +- JavaScript/Complex Flow Examples/ocr-with-extract-text.js | 2 +- JavaScript/Complex Flow Examples/pdfa-3b-with-attachment.js | 2 +- JavaScript/Complex Flow Examples/preserve-word-document.js | 2 +- JavaScript/Complex Flow Examples/protected-watermark.js | 2 +- .../Complex Flow Examples/redact-preview-and-finalize.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/batch-delete.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/bmp.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/compressed-pdf.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/decrypted-pdf.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/delete-resource.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/encrypted-pdf.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/excel.js | 2 +- .../Endpoint Examples/JSON Payload/exported-form-data.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/extracted-images.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/extracted-text.js | 2 +- .../JSON Payload/flattened-annotations-pdf.js | 2 +- .../Endpoint Examples/JSON Payload/flattened-forms-pdf.js | 2 +- .../Endpoint Examples/JSON Payload/flattened-layers-pdf.js | 2 +- .../JSON Payload/flattened-transparencies-pdf.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/get-resource.js | 4 ++-- JavaScript/Endpoint Examples/JSON Payload/gif.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/jpg.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/linearized-pdf.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/markdown.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/merged-pdf.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/pdf-info.js | 2 +- .../Endpoint Examples/JSON Payload/pdf-with-acroforms.js | 2 +- .../JSON Payload/pdf-with-added-attachment.js | 2 +- .../Endpoint Examples/JSON Payload/pdf-with-added-image.js | 2 +- .../Endpoint Examples/JSON Payload/pdf-with-added-text.js | 2 +- .../JSON Payload/pdf-with-converted-colors.js | 2 +- .../JSON Payload/pdf-with-imported-form-data.js | 2 +- .../Endpoint Examples/JSON Payload/pdf-with-ocr-text.js | 2 +- .../Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.js | 2 +- .../JSON Payload/pdf-with-redacted-text-applied.js | 2 +- .../JSON Payload/pdf-with-redacted-text-preview.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/pdf.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/pdfa.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/pdfx.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/png.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/powerpoint.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/rasterized-pdf.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/restricted-pdf.js | 2 +- .../Endpoint Examples/JSON Payload/signed-pdf-non-pfx.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/signed-pdf.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/split-pdf.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/tif.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/unrestricted-pdf.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/unzip.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/up-toolkit.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/upload.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/watermarked-pdf.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/word.js | 2 +- JavaScript/Endpoint Examples/JSON Payload/zip.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/bmp.js | 2 +- .../Endpoint Examples/Multipart Payload/compressed-pdf.js | 2 +- .../Endpoint Examples/Multipart Payload/decrypted-pdf.js | 2 +- .../Endpoint Examples/Multipart Payload/delete-resource.js | 2 +- .../Endpoint Examples/Multipart Payload/encrypted-pdf.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/excel.js | 2 +- .../Endpoint Examples/Multipart Payload/exported-form-data.js | 2 +- .../Endpoint Examples/Multipart Payload/extracted-images.js | 2 +- .../Endpoint Examples/Multipart Payload/extracted-text.js | 2 +- .../Multipart Payload/flattened-annotations-pdf.js | 2 +- .../Multipart Payload/flattened-forms-pdf.js | 2 +- .../Multipart Payload/flattened-layers-pdf.js | 2 +- .../Multipart Payload/flattened-transparencies-pdf.js | 2 +- .../Endpoint Examples/Multipart Payload/get-resource.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/gif.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/jpg.js | 2 +- .../Endpoint Examples/Multipart Payload/linearized-pdf.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/markdown.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/merged-pdf.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/pdf-info.js | 2 +- .../Endpoint Examples/Multipart Payload/pdf-with-acroforms.js | 2 +- .../Multipart Payload/pdf-with-added-attachment.js | 2 +- .../Multipart Payload/pdf-with-added-image.js | 2 +- .../Multipart Payload/pdf-with-added-text.js | 2 +- .../Multipart Payload/pdf-with-converted-colors.js | 2 +- .../Multipart Payload/pdf-with-imported-form-data.js | 2 +- .../Endpoint Examples/Multipart Payload/pdf-with-ocr-text.js | 2 +- .../Multipart Payload/pdf-with-page-boxes-set.js | 2 +- .../Multipart Payload/pdf-with-redacted-text-applied.js | 2 +- .../Multipart Payload/pdf-with-redacted-text-preview.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/pdf.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/pdfa.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/pdfx.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/png.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/powerpoint.js | 2 +- .../Endpoint Examples/Multipart Payload/rasterized-pdf.js | 2 +- .../Endpoint Examples/Multipart Payload/request-status.js | 2 +- .../Endpoint Examples/Multipart Payload/restricted-pdf.js | 2 +- .../Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/signed-pdf.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/split-pdf.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/tif.js | 2 +- .../Endpoint Examples/Multipart Payload/unrestricted-pdf.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/unzip.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/up-toolkit.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/upload.js | 2 +- .../Endpoint Examples/Multipart Payload/watermarked-pdf.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/word.js | 2 +- JavaScript/Endpoint Examples/Multipart Payload/zip.js | 2 +- 106 files changed, 107 insertions(+), 107 deletions(-) diff --git a/Java/Endpoint Examples/JSON Payload/BatchDelete.java b/Java/Endpoint Examples/JSON Payload/BatchDelete.java index d2987c95..ae2cbea2 100644 --- a/Java/Endpoint Examples/JSON Payload/BatchDelete.java +++ b/Java/Endpoint Examples/JSON Payload/BatchDelete.java @@ -12,7 +12,7 @@ public class BatchDelete { // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based // service by uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work - // private static final String API_URL = "https://eu-api.pdfrest.com" + // private static String API_URL = "https://eu-api.pdfrest.com" // Specify your API key here, or in the environment variable PDFREST_API_KEY. // You can also put the environment variable in a .env file. diff --git a/JavaScript/Complex Flow Examples/decrypt-add-reencrypt.js b/JavaScript/Complex Flow Examples/decrypt-add-reencrypt.js index 0f5c3ad8..03f20327 100644 --- a/JavaScript/Complex Flow Examples/decrypt-add-reencrypt.js +++ b/JavaScript/Complex Flow Examples/decrypt-add-reencrypt.js @@ -17,7 +17,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key diff --git a/JavaScript/Complex Flow Examples/merge-different-file-types.js b/JavaScript/Complex Flow Examples/merge-different-file-types.js index a744f928..8cc98fc3 100644 --- a/JavaScript/Complex Flow Examples/merge-different-file-types.js +++ b/JavaScript/Complex Flow Examples/merge-different-file-types.js @@ -20,7 +20,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key diff --git a/JavaScript/Complex Flow Examples/ocr-with-extract-text.js b/JavaScript/Complex Flow Examples/ocr-with-extract-text.js index 56b8334e..781c12f2 100644 --- a/JavaScript/Complex Flow Examples/ocr-with-extract-text.js +++ b/JavaScript/Complex Flow Examples/ocr-with-extract-text.js @@ -17,7 +17,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key diff --git a/JavaScript/Complex Flow Examples/pdfa-3b-with-attachment.js b/JavaScript/Complex Flow Examples/pdfa-3b-with-attachment.js index a2cdd8bd..2c504630 100644 --- a/JavaScript/Complex Flow Examples/pdfa-3b-with-attachment.js +++ b/JavaScript/Complex Flow Examples/pdfa-3b-with-attachment.js @@ -18,7 +18,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key diff --git a/JavaScript/Complex Flow Examples/preserve-word-document.js b/JavaScript/Complex Flow Examples/preserve-word-document.js index 339e09d4..52c99269 100644 --- a/JavaScript/Complex Flow Examples/preserve-word-document.js +++ b/JavaScript/Complex Flow Examples/preserve-word-document.js @@ -15,7 +15,7 @@ var fs = require("fs"); /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ - //var apiUrl "https://eu-api.pdfrest.com"; + //var apiUrl = "https://eu-api.pdfrest.com"; var apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key diff --git a/JavaScript/Complex Flow Examples/protected-watermark.js b/JavaScript/Complex Flow Examples/protected-watermark.js index 54a1130f..973b8a7c 100644 --- a/JavaScript/Complex Flow Examples/protected-watermark.js +++ b/JavaScript/Complex Flow Examples/protected-watermark.js @@ -15,7 +15,7 @@ var fs = require("fs"); /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ - //var apiUrl "https://eu-api.pdfrest.com"; + //var apiUrl = "https://eu-api.pdfrest.com"; var apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key diff --git a/JavaScript/Complex Flow Examples/redact-preview-and-finalize.js b/JavaScript/Complex Flow Examples/redact-preview-and-finalize.js index 7ce23e1f..396ad3a4 100644 --- a/JavaScript/Complex Flow Examples/redact-preview-and-finalize.js +++ b/JavaScript/Complex Flow Examples/redact-preview-and-finalize.js @@ -16,7 +16,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key diff --git a/JavaScript/Endpoint Examples/JSON Payload/batch-delete.js b/JavaScript/Endpoint Examples/JSON Payload/batch-delete.js index 4f448957..1b656795 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/batch-delete.js +++ b/JavaScript/Endpoint Examples/JSON Payload/batch-delete.js @@ -6,7 +6,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; let config = { method: "post", diff --git a/JavaScript/Endpoint Examples/JSON Payload/bmp.js b/JavaScript/Endpoint Examples/JSON Payload/bmp.js index d0e3361c..218164c4 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/bmp.js +++ b/JavaScript/Endpoint Examples/JSON Payload/bmp.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/compressed-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/compressed-pdf.js index 20fe2ef9..f03398da 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/compressed-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/compressed-pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/decrypted-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/decrypted-pdf.js index 78a6af5c..d49bf704 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/decrypted-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/decrypted-pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; diff --git a/JavaScript/Endpoint Examples/JSON Payload/delete-resource.js b/JavaScript/Endpoint Examples/JSON Payload/delete-resource.js index 97e1fa35..87e3efce 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/delete-resource.js +++ b/JavaScript/Endpoint Examples/JSON Payload/delete-resource.js @@ -6,7 +6,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; let config = { method: "delete", diff --git a/JavaScript/Endpoint Examples/JSON Payload/encrypted-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/encrypted-pdf.js index 6176686f..facea3a0 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/encrypted-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/encrypted-pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; diff --git a/JavaScript/Endpoint Examples/JSON Payload/excel.js b/JavaScript/Endpoint Examples/JSON Payload/excel.js index bcae907f..e63e1d3b 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/excel.js +++ b/JavaScript/Endpoint Examples/JSON Payload/excel.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/exported-form-data.js b/JavaScript/Endpoint Examples/JSON Payload/exported-form-data.js index 9e235278..10c7449f 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/exported-form-data.js +++ b/JavaScript/Endpoint Examples/JSON Payload/exported-form-data.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/extracted-images.js b/JavaScript/Endpoint Examples/JSON Payload/extracted-images.js index 7fc4eaa7..0a334a88 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/extracted-images.js +++ b/JavaScript/Endpoint Examples/JSON Payload/extracted-images.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/extracted-text.js b/JavaScript/Endpoint Examples/JSON Payload/extracted-text.js index ba80ba05..2e9eb7f4 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/extracted-text.js +++ b/JavaScript/Endpoint Examples/JSON Payload/extracted-text.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/flattened-annotations-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/flattened-annotations-pdf.js index 4c11d357..a8d2de8b 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/flattened-annotations-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/flattened-annotations-pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/flattened-forms-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/flattened-forms-pdf.js index 6e4ec7c9..389d45a3 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/flattened-forms-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/flattened-forms-pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/flattened-layers-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/flattened-layers-pdf.js index 9a7121f6..08d9dff3 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/flattened-layers-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/flattened-layers-pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.js index 678c4acb..52f9263e 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/get-resource.js b/JavaScript/Endpoint Examples/JSON Payload/get-resource.js index 45795694..384ca1c6 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/get-resource.js +++ b/JavaScript/Endpoint Examples/JSON Payload/get-resource.js @@ -2,12 +2,12 @@ const axios = require('axios'); // By default, we use the US-based API service. This is the primary endpoint for global use. -var apiUrl = apiUrl + ""; +var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; let config = { method: 'get', diff --git a/JavaScript/Endpoint Examples/JSON Payload/gif.js b/JavaScript/Endpoint Examples/JSON Payload/gif.js index 84a976e7..bcf8ecdc 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/gif.js +++ b/JavaScript/Endpoint Examples/JSON Payload/gif.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/jpg.js b/JavaScript/Endpoint Examples/JSON Payload/jpg.js index f0ffe87a..39b5fa36 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/jpg.js +++ b/JavaScript/Endpoint Examples/JSON Payload/jpg.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/linearized-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/linearized-pdf.js index 135de7b6..b54b5905 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/linearized-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/linearized-pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/markdown.js b/JavaScript/Endpoint Examples/JSON Payload/markdown.js index d0c98cea..036d9e4f 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/markdown.js +++ b/JavaScript/Endpoint Examples/JSON Payload/markdown.js @@ -7,7 +7,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file.pdf"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/merged-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/merged-pdf.js index 0f91e1ca..9f5f39e3 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/merged-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/merged-pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var first_upload_data = fs.createReadStream("/path/to/first_file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-info.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-info.js index ccff6328..4dcd85fb 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-info.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-info.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-acroforms.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-acroforms.js index f74311f6..92d31be8 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-acroforms.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-acroforms.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-attachment.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-attachment.js index 19c7a3ef..883bcc8c 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-attachment.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-attachment.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var pdf_upload_data = fs.createReadStream("/path/to/pdf_file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-image.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-image.js index 45472130..9a79af53 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-image.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-image.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var pdf_upload_data = fs.createReadStream("/path/to/pdf_file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-text.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-text.js index aa02ec61..99c9953b 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-text.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-added-text.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-converted-colors.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-converted-colors.js index 190e3607..f0773c76 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-converted-colors.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-converted-colors.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.js index 398d2874..a2aeed2d 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var pdf_upload_data = fs.createReadStream("/path/to/pdf_file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-ocr-text.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-ocr-text.js index b51c9a60..b82f618d 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-ocr-text.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-ocr-text.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.js index b9a3c92f..90e401fb 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.js index 5e6b70a8..0e9bef15 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.js b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.js index 0b387914..2b8a2132 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdf.js b/JavaScript/Endpoint Examples/JSON Payload/pdf.js index cf1e33c0..957cc375 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdfa.js b/JavaScript/Endpoint Examples/JSON Payload/pdfa.js index 13212b30..538dcdfe 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdfa.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdfa.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/pdfx.js b/JavaScript/Endpoint Examples/JSON Payload/pdfx.js index c4a72c1c..0c74aa5a 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/pdfx.js +++ b/JavaScript/Endpoint Examples/JSON Payload/pdfx.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/png.js b/JavaScript/Endpoint Examples/JSON Payload/png.js index d1dd6724..42a45c1b 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/png.js +++ b/JavaScript/Endpoint Examples/JSON Payload/png.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/powerpoint.js b/JavaScript/Endpoint Examples/JSON Payload/powerpoint.js index ac385b2b..fde12297 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/powerpoint.js +++ b/JavaScript/Endpoint Examples/JSON Payload/powerpoint.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/rasterized-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/rasterized-pdf.js index 4d8ec5b3..8fd84c9a 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/rasterized-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/rasterized-pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/restricted-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/restricted-pdf.js index 683bd82c..e6581064 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/restricted-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/restricted-pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; diff --git a/JavaScript/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.js b/JavaScript/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.js index f1f6c3e6..8a6058ae 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.js +++ b/JavaScript/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.js @@ -7,7 +7,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; async function uploadFile(filePath, fileName) { var upload_data = fs.createReadStream(filePath); diff --git a/JavaScript/Endpoint Examples/JSON Payload/signed-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/signed-pdf.js index 8966da68..9c6122c3 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/signed-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/signed-pdf.js @@ -7,7 +7,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; async function uploadFile(filePath, fileName) { var upload_data = fs.createReadStream(filePath); diff --git a/JavaScript/Endpoint Examples/JSON Payload/split-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/split-pdf.js index b1196dde..bffbddab 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/split-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/split-pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/tif.js b/JavaScript/Endpoint Examples/JSON Payload/tif.js index 184bc8a5..0dea59a4 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/tif.js +++ b/JavaScript/Endpoint Examples/JSON Payload/tif.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/unrestricted-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/unrestricted-pdf.js index 17d73d64..0a0d74df 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/unrestricted-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/unrestricted-pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; diff --git a/JavaScript/Endpoint Examples/JSON Payload/unzip.js b/JavaScript/Endpoint Examples/JSON Payload/unzip.js index f6be05eb..28e86bd3 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/unzip.js +++ b/JavaScript/Endpoint Examples/JSON Payload/unzip.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/up-toolkit.js b/JavaScript/Endpoint Examples/JSON Payload/up-toolkit.js index 1e864e68..c7296c6e 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/up-toolkit.js +++ b/JavaScript/Endpoint Examples/JSON Payload/up-toolkit.js @@ -7,7 +7,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; let config = { method: "get", diff --git a/JavaScript/Endpoint Examples/JSON Payload/upload.js b/JavaScript/Endpoint Examples/JSON Payload/upload.js index 1cd39447..55f3cdf1 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/upload.js +++ b/JavaScript/Endpoint Examples/JSON Payload/upload.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/watermarked-pdf.js b/JavaScript/Endpoint Examples/JSON Payload/watermarked-pdf.js index a39355a3..47c58d24 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/watermarked-pdf.js +++ b/JavaScript/Endpoint Examples/JSON Payload/watermarked-pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; diff --git a/JavaScript/Endpoint Examples/JSON Payload/word.js b/JavaScript/Endpoint Examples/JSON Payload/word.js index 87797cbf..2a3268fa 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/word.js +++ b/JavaScript/Endpoint Examples/JSON Payload/word.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var upload_data = fs.createReadStream("/path/to/file"); diff --git a/JavaScript/Endpoint Examples/JSON Payload/zip.js b/JavaScript/Endpoint Examples/JSON Payload/zip.js index 75967f01..82632669 100644 --- a/JavaScript/Endpoint Examples/JSON Payload/zip.js +++ b/JavaScript/Endpoint Examples/JSON Payload/zip.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; var first_upload_data = fs.createReadStream("/path/to/first_file"); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/bmp.js b/JavaScript/Endpoint Examples/Multipart Payload/bmp.js index 9716b17b..9fc1fd99 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/bmp.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/bmp.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the file and parameters to it diff --git a/JavaScript/Endpoint Examples/Multipart Payload/compressed-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/compressed-pdf.js index d99f4856..8e14e4aa 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/compressed-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/compressed-pdf.js @@ -10,7 +10,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; diff --git a/JavaScript/Endpoint Examples/Multipart Payload/decrypted-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/decrypted-pdf.js index 4ff7c64a..a4f6831d 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/decrypted-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/decrypted-pdf.js @@ -10,7 +10,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; diff --git a/JavaScript/Endpoint Examples/Multipart Payload/delete-resource.js b/JavaScript/Endpoint Examples/Multipart Payload/delete-resource.js index 0102c096..f45e1701 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/delete-resource.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/delete-resource.js @@ -6,7 +6,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; let config = { diff --git a/JavaScript/Endpoint Examples/Multipart Payload/encrypted-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/encrypted-pdf.js index 52a935f0..fd3600fe 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/encrypted-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/encrypted-pdf.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; diff --git a/JavaScript/Endpoint Examples/Multipart Payload/excel.js b/JavaScript/Endpoint Examples/Multipart Payload/excel.js index e1bcf411..a4b78bd5 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/excel.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/excel.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/exported-form-data.js b/JavaScript/Endpoint Examples/Multipart Payload/exported-form-data.js index 4aa002e3..c14205d1 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/exported-form-data.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/exported-form-data.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/extracted-images.js b/JavaScript/Endpoint Examples/Multipart Payload/extracted-images.js index 9da95ebb..1e9c6271 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/extracted-images.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/extracted-images.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/extracted-text.js b/JavaScript/Endpoint Examples/Multipart Payload/extracted-text.js index b1c44e54..44d51b40 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/extracted-text.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/extracted-text.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.js index 5bbb93f6..850febc1 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.js @@ -11,7 +11,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/flattened-forms-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/flattened-forms-pdf.js index 2b7ec7e6..6b935110 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/flattened-forms-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/flattened-forms-pdf.js @@ -11,7 +11,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/flattened-layers-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/flattened-layers-pdf.js index 687544ba..ac7b7012 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/flattened-layers-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/flattened-layers-pdf.js @@ -11,7 +11,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.js index a808bced..358b29d3 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it diff --git a/JavaScript/Endpoint Examples/Multipart Payload/get-resource.js b/JavaScript/Endpoint Examples/Multipart Payload/get-resource.js index d90b1f0c..c88d0af3 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/get-resource.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/get-resource.js @@ -7,7 +7,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; let config = { method: 'get', diff --git a/JavaScript/Endpoint Examples/Multipart Payload/gif.js b/JavaScript/Endpoint Examples/Multipart Payload/gif.js index a815ed42..4f614d0b 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/gif.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/gif.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/jpg.js b/JavaScript/Endpoint Examples/Multipart Payload/jpg.js index ae3e48c1..7f559d1c 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/jpg.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/jpg.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/linearized-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/linearized-pdf.js index 519c608e..93017402 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/linearized-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/linearized-pdf.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/markdown.js b/JavaScript/Endpoint Examples/Multipart Payload/markdown.js index 89c72f32..a30dfa6b 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/markdown.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/markdown.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/merged-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/merged-pdf.js index 6aa81134..862d72a2 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/merged-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/merged-pdf.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-info.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-info.js index 50d97f24..4825d4df 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-info.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-info.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-acroforms.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-acroforms.js index dd27b315..454e9eb4 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-acroforms.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-acroforms.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.js index b971518f..5524d184 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.js @@ -11,7 +11,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-image.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-image.js index 17ee4746..60133cf2 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-image.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-image.js @@ -11,7 +11,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-text.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-text.js index 08bfda73..a4164996 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-text.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-added-text.js @@ -12,7 +12,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.js index 9304f33b..a84cbf4f 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.js index 1ddf73d2..f35ed3a3 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.js @@ -11,7 +11,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.js index 80614a32..9dfb9cf2 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.js index a2ac978c..77f399de 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.js @@ -11,7 +11,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.js index 53047f71..3385f78f 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.js index 1aac5d2f..04790562 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.js @@ -12,7 +12,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/pdf.js index 9b9a8e9a..ead563d5 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdf.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdfa.js b/JavaScript/Endpoint Examples/Multipart Payload/pdfa.js index d7a89eb4..53c61faf 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdfa.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdfa.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data object and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/pdfx.js b/JavaScript/Endpoint Examples/Multipart Payload/pdfx.js index 68e9a956..4470d82e 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/pdfx.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/pdfx.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data object and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/png.js b/JavaScript/Endpoint Examples/Multipart Payload/png.js index c913ce0c..e580eead 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/png.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/png.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/powerpoint.js b/JavaScript/Endpoint Examples/Multipart Payload/powerpoint.js index 893d03b3..8e66d6af 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/powerpoint.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/powerpoint.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/rasterized-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/rasterized-pdf.js index 3c12e60b..d0ee5e0d 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/rasterized-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/rasterized-pdf.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/request-status.js b/JavaScript/Endpoint Examples/Multipart Payload/request-status.js index 7bcfd95b..e68d9976 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/request-status.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/request-status.js @@ -8,7 +8,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; const apiKey = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // Replace with your API key const pathToFile = "/path/to/file.pdf"; diff --git a/JavaScript/Endpoint Examples/Multipart Payload/restricted-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/restricted-pdf.js index 279226e6..bac0d922 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/restricted-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/restricted-pdf.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) diff --git a/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.js b/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.js index 81e0b30d..6710044c 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.js @@ -11,7 +11,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf.js index 7de72aeb..5baf6b87 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/signed-pdf.js @@ -11,7 +11,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it diff --git a/JavaScript/Endpoint Examples/Multipart Payload/split-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/split-pdf.js index f6755d84..891a9f50 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/split-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/split-pdf.js @@ -12,7 +12,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/tif.js b/JavaScript/Endpoint Examples/Multipart Payload/tif.js index 5c9f8eae..b4515e6f 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/tif.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/tif.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/unrestricted-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/unrestricted-pdf.js index e928207f..070361d0 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/unrestricted-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/unrestricted-pdf.js @@ -12,7 +12,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; diff --git a/JavaScript/Endpoint Examples/Multipart Payload/unzip.js b/JavaScript/Endpoint Examples/Multipart Payload/unzip.js index 1696e05c..59baaa6b 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/unzip.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/unzip.js @@ -11,7 +11,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/up-toolkit.js b/JavaScript/Endpoint Examples/Multipart Payload/up-toolkit.js index 1e864e68..c7296c6e 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/up-toolkit.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/up-toolkit.js @@ -7,7 +7,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; let config = { method: "get", diff --git a/JavaScript/Endpoint Examples/Multipart Payload/upload.js b/JavaScript/Endpoint Examples/Multipart Payload/upload.js index 3dabccb4..a4fcb4ac 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/upload.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/upload.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data object and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/watermarked-pdf.js b/JavaScript/Endpoint Examples/Multipart Payload/watermarked-pdf.js index b50017ed..4d9de33a 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/watermarked-pdf.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/watermarked-pdf.js @@ -12,7 +12,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) const DELETE_SENSITIVE_FILES = false; diff --git a/JavaScript/Endpoint Examples/Multipart Payload/word.js b/JavaScript/Endpoint Examples/Multipart Payload/word.js index 15ffcf7d..f8b4133c 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/word.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/word.js @@ -9,7 +9,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the PDF file and parameters to it var data = new FormData(); diff --git a/JavaScript/Endpoint Examples/Multipart Payload/zip.js b/JavaScript/Endpoint Examples/Multipart Payload/zip.js index 24f8d0fe..5a8a1067 100644 --- a/JavaScript/Endpoint Examples/Multipart Payload/zip.js +++ b/JavaScript/Endpoint Examples/Multipart Payload/zip.js @@ -12,7 +12,7 @@ var apiUrl = "https://api.pdfrest.com"; /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//var apiUrl "https://eu-api.pdfrest.com"; +//var apiUrl = "https://eu-api.pdfrest.com"; // Create a new form data instance and append the files and parameters to it var data = new FormData(); From ed3e33831aed7492a0da2564f3c66c8684dae766 Mon Sep 17 00:00:00 2001 From: Taylor Smith Date: Thu, 11 Sep 2025 13:50:06 -0500 Subject: [PATCH 09/11] Correct '=' in PHP --- PHP/Complex Flow Examples/decrypt-add-reencrypt.php | 2 +- PHP/Complex Flow Examples/merge-different-file-types.php | 2 +- PHP/Complex Flow Examples/ocr-with-extract-text.php | 2 +- PHP/Complex Flow Examples/pdfa-3b-with-attachment.php | 2 +- PHP/Complex Flow Examples/preserve-word-document.php | 2 +- PHP/Complex Flow Examples/protected-watermark.php | 2 +- PHP/Complex Flow Examples/redact-preview-and-finalize.php | 2 +- PHP/Endpoint Examples/JSON Payload/batch-delete.php | 2 +- PHP/Endpoint Examples/JSON Payload/bmp.php | 2 +- PHP/Endpoint Examples/JSON Payload/compressed-pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/decrypted-pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/delete-resource.php | 2 +- PHP/Endpoint Examples/JSON Payload/encrypted-pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/excel.php | 2 +- PHP/Endpoint Examples/JSON Payload/exported-form-data.php | 2 +- PHP/Endpoint Examples/JSON Payload/extracted-images.php | 2 +- PHP/Endpoint Examples/JSON Payload/extracted-text.php | 2 +- .../JSON Payload/flattened-annotations-pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/flattened-forms-pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/flattened-layers-pdf.php | 2 +- .../JSON Payload/flattened-transparencies-pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/get-resource.php | 2 +- PHP/Endpoint Examples/JSON Payload/gif.php | 2 +- PHP/Endpoint Examples/JSON Payload/jpg.php | 2 +- PHP/Endpoint Examples/JSON Payload/linearized-pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/markdown.php | 2 +- PHP/Endpoint Examples/JSON Payload/merged-pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/pdf-info.php | 2 +- PHP/Endpoint Examples/JSON Payload/pdf-with-acroforms.php | 2 +- .../JSON Payload/pdf-with-added-attachment.php | 2 +- PHP/Endpoint Examples/JSON Payload/pdf-with-added-image.php | 2 +- PHP/Endpoint Examples/JSON Payload/pdf-with-added-text.php | 2 +- .../JSON Payload/pdf-with-converted-colors.php | 2 +- .../JSON Payload/pdf-with-imported-form-data.php | 2 +- PHP/Endpoint Examples/JSON Payload/pdf-with-ocr-text.php | 2 +- PHP/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.php | 2 +- .../JSON Payload/pdf-with-redacted-text-applied.php | 2 +- .../JSON Payload/pdf-with-redacted-text-preview.php | 2 +- PHP/Endpoint Examples/JSON Payload/pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/pdfa.php | 2 +- PHP/Endpoint Examples/JSON Payload/pdfx.php | 2 +- PHP/Endpoint Examples/JSON Payload/png.php | 2 +- PHP/Endpoint Examples/JSON Payload/powerpoint.php | 2 +- PHP/Endpoint Examples/JSON Payload/rasterized-pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/restricted-pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.php | 2 +- PHP/Endpoint Examples/JSON Payload/signed-pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/split-pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/tif.php | 2 +- PHP/Endpoint Examples/JSON Payload/unrestricted-pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/unzip.php | 2 +- PHP/Endpoint Examples/JSON Payload/upload.php | 2 +- PHP/Endpoint Examples/JSON Payload/watermarked-pdf.php | 2 +- PHP/Endpoint Examples/JSON Payload/word.php | 2 +- PHP/Endpoint Examples/JSON Payload/zip.php | 2 +- PHP/Endpoint Examples/Multipart Payload/batch-delete.php | 2 +- PHP/Endpoint Examples/Multipart Payload/bmp.php | 2 +- PHP/Endpoint Examples/Multipart Payload/compressed-pdf.php | 2 +- PHP/Endpoint Examples/Multipart Payload/decrypted-pdf.php | 2 +- PHP/Endpoint Examples/Multipart Payload/delete-resource.php | 2 +- PHP/Endpoint Examples/Multipart Payload/encrypted-pdf.php | 2 +- PHP/Endpoint Examples/Multipart Payload/excel.php | 2 +- PHP/Endpoint Examples/Multipart Payload/exported-form-data.php | 2 +- PHP/Endpoint Examples/Multipart Payload/extracted-images.php | 2 +- PHP/Endpoint Examples/Multipart Payload/extracted-text.php | 2 +- .../Multipart Payload/flattened-annotations-pdf.php | 2 +- PHP/Endpoint Examples/Multipart Payload/flattened-forms-pdf.php | 2 +- .../Multipart Payload/flattened-layers-pdf.php | 2 +- .../Multipart Payload/flattened-transparencies-pdf.php | 2 +- PHP/Endpoint Examples/Multipart Payload/get-resource.php | 2 +- PHP/Endpoint Examples/Multipart Payload/gif.php | 2 +- PHP/Endpoint Examples/Multipart Payload/jpg.php | 2 +- PHP/Endpoint Examples/Multipart Payload/linearized-pdf.php | 2 +- PHP/Endpoint Examples/Multipart Payload/markdown.php | 2 +- PHP/Endpoint Examples/Multipart Payload/merged-pdf.php | 2 +- PHP/Endpoint Examples/Multipart Payload/pdf-info.php | 2 +- PHP/Endpoint Examples/Multipart Payload/pdf-with-acroforms.php | 2 +- .../Multipart Payload/pdf-with-added-attachment.php | 2 +- .../Multipart Payload/pdf-with-added-image.php | 2 +- PHP/Endpoint Examples/Multipart Payload/pdf-with-added-text.php | 2 +- .../Multipart Payload/pdf-with-converted-colors.php | 2 +- .../Multipart Payload/pdf-with-imported-form-data.php | 2 +- PHP/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.php | 2 +- .../Multipart Payload/pdf-with-page-boxes-set.php | 2 +- .../Multipart Payload/pdf-with-redacted-text-applied.php | 2 +- .../Multipart Payload/pdf-with-redacted-text-preview.php | 2 +- PHP/Endpoint Examples/Multipart Payload/pdf.php | 2 +- PHP/Endpoint Examples/Multipart Payload/pdfa.php | 2 +- PHP/Endpoint Examples/Multipart Payload/pdfx.php | 2 +- PHP/Endpoint Examples/Multipart Payload/png.php | 2 +- PHP/Endpoint Examples/Multipart Payload/powerpoint.php | 2 +- PHP/Endpoint Examples/Multipart Payload/rasterized-pdf.php | 2 +- PHP/Endpoint Examples/Multipart Payload/request-status.php | 2 +- PHP/Endpoint Examples/Multipart Payload/restricted-pdf.php | 2 +- PHP/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.php | 2 +- PHP/Endpoint Examples/Multipart Payload/signed-pdf.php | 2 +- PHP/Endpoint Examples/Multipart Payload/split-pdf.php | 2 +- PHP/Endpoint Examples/Multipart Payload/tif.php | 2 +- PHP/Endpoint Examples/Multipart Payload/unrestricted-pdf.php | 2 +- PHP/Endpoint Examples/Multipart Payload/unzip.php | 2 +- PHP/Endpoint Examples/Multipart Payload/upload.php | 2 +- PHP/Endpoint Examples/Multipart Payload/watermarked-pdf.php | 2 +- PHP/Endpoint Examples/Multipart Payload/word.php | 2 +- PHP/Endpoint Examples/Multipart Payload/zip.php | 2 +- 104 files changed, 104 insertions(+), 104 deletions(-) diff --git a/PHP/Complex Flow Examples/decrypt-add-reencrypt.php b/PHP/Complex Flow Examples/decrypt-add-reencrypt.php index 9550b4da..1acade6d 100755 --- a/PHP/Complex Flow Examples/decrypt-add-reencrypt.php +++ b/PHP/Complex Flow Examples/decrypt-add-reencrypt.php @@ -21,7 +21,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); diff --git a/PHP/Complex Flow Examples/merge-different-file-types.php b/PHP/Complex Flow Examples/merge-different-file-types.php index 6fb41c66..c35cb82a 100755 --- a/PHP/Complex Flow Examples/merge-different-file-types.php +++ b/PHP/Complex Flow Examples/merge-different-file-types.php @@ -24,7 +24,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); diff --git a/PHP/Complex Flow Examples/ocr-with-extract-text.php b/PHP/Complex Flow Examples/ocr-with-extract-text.php index be80e7a6..7072bc6e 100644 --- a/PHP/Complex Flow Examples/ocr-with-extract-text.php +++ b/PHP/Complex Flow Examples/ocr-with-extract-text.php @@ -21,7 +21,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ - //$apiUrl "https://eu-api.pdfrest.com"; + //$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); diff --git a/PHP/Complex Flow Examples/pdfa-3b-with-attachment.php b/PHP/Complex Flow Examples/pdfa-3b-with-attachment.php index ddb97bd8..40058e68 100755 --- a/PHP/Complex Flow Examples/pdfa-3b-with-attachment.php +++ b/PHP/Complex Flow Examples/pdfa-3b-with-attachment.php @@ -23,7 +23,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); diff --git a/PHP/Complex Flow Examples/preserve-word-document.php b/PHP/Complex Flow Examples/preserve-word-document.php index 3afce120..63d16e24 100755 --- a/PHP/Complex Flow Examples/preserve-word-document.php +++ b/PHP/Complex Flow Examples/preserve-word-document.php @@ -19,7 +19,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); diff --git a/PHP/Complex Flow Examples/protected-watermark.php b/PHP/Complex Flow Examples/protected-watermark.php index 89194b23..48369ee2 100755 --- a/PHP/Complex Flow Examples/protected-watermark.php +++ b/PHP/Complex Flow Examples/protected-watermark.php @@ -19,7 +19,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); diff --git a/PHP/Complex Flow Examples/redact-preview-and-finalize.php b/PHP/Complex Flow Examples/redact-preview-and-finalize.php index ff222afe..6a3c6c36 100644 --- a/PHP/Complex Flow Examples/redact-preview-and-finalize.php +++ b/PHP/Complex Flow Examples/redact-preview-and-finalize.php @@ -20,7 +20,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); diff --git a/PHP/Endpoint Examples/JSON Payload/batch-delete.php b/PHP/Endpoint Examples/JSON Payload/batch-delete.php index 10194108..55ae46f8 100644 --- a/PHP/Endpoint Examples/JSON Payload/batch-delete.php +++ b/PHP/Endpoint Examples/JSON Payload/batch-delete.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $delete_client = new Client(['http_errors' => false]); diff --git a/PHP/Endpoint Examples/JSON Payload/bmp.php b/PHP/Endpoint Examples/JSON Payload/bmp.php index 28876011..e809e8e6 100644 --- a/PHP/Endpoint Examples/JSON Payload/bmp.php +++ b/PHP/Endpoint Examples/JSON Payload/bmp.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/compressed-pdf.php b/PHP/Endpoint Examples/JSON Payload/compressed-pdf.php index eb7f9cb7..2cff153f 100644 --- a/PHP/Endpoint Examples/JSON Payload/compressed-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/compressed-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/decrypted-pdf.php b/PHP/Endpoint Examples/JSON Payload/decrypted-pdf.php index f473cf7c..04110eb9 100644 --- a/PHP/Endpoint Examples/JSON Payload/decrypted-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/decrypted-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; diff --git a/PHP/Endpoint Examples/JSON Payload/delete-resource.php b/PHP/Endpoint Examples/JSON Payload/delete-resource.php index 373709f9..19a3c455 100644 --- a/PHP/Endpoint Examples/JSON Payload/delete-resource.php +++ b/PHP/Endpoint Examples/JSON Payload/delete-resource.php @@ -8,7 +8,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; curl_setopt_array($curl, array( CURLOPT_URL => $apiUrl.'/resource/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', diff --git a/PHP/Endpoint Examples/JSON Payload/encrypted-pdf.php b/PHP/Endpoint Examples/JSON Payload/encrypted-pdf.php index 72dc9d58..770fb14b 100644 --- a/PHP/Endpoint Examples/JSON Payload/encrypted-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/encrypted-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; diff --git a/PHP/Endpoint Examples/JSON Payload/excel.php b/PHP/Endpoint Examples/JSON Payload/excel.php index 79196248..fb555fbd 100644 --- a/PHP/Endpoint Examples/JSON Payload/excel.php +++ b/PHP/Endpoint Examples/JSON Payload/excel.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/exported-form-data.php b/PHP/Endpoint Examples/JSON Payload/exported-form-data.php index ad466a04..a51d3b90 100644 --- a/PHP/Endpoint Examples/JSON Payload/exported-form-data.php +++ b/PHP/Endpoint Examples/JSON Payload/exported-form-data.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/extracted-images.php b/PHP/Endpoint Examples/JSON Payload/extracted-images.php index 548246ef..588b0f18 100644 --- a/PHP/Endpoint Examples/JSON Payload/extracted-images.php +++ b/PHP/Endpoint Examples/JSON Payload/extracted-images.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/extracted-text.php b/PHP/Endpoint Examples/JSON Payload/extracted-text.php index 060de0d3..9f694ea2 100644 --- a/PHP/Endpoint Examples/JSON Payload/extracted-text.php +++ b/PHP/Endpoint Examples/JSON Payload/extracted-text.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/flattened-annotations-pdf.php b/PHP/Endpoint Examples/JSON Payload/flattened-annotations-pdf.php index be6335c2..f02424d2 100644 --- a/PHP/Endpoint Examples/JSON Payload/flattened-annotations-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/flattened-annotations-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/flattened-forms-pdf.php b/PHP/Endpoint Examples/JSON Payload/flattened-forms-pdf.php index 11693c86..5a355b85 100644 --- a/PHP/Endpoint Examples/JSON Payload/flattened-forms-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/flattened-forms-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/flattened-layers-pdf.php b/PHP/Endpoint Examples/JSON Payload/flattened-layers-pdf.php index c8cff2f1..1940517e 100644 --- a/PHP/Endpoint Examples/JSON Payload/flattened-layers-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/flattened-layers-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.php b/PHP/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.php index b3788676..50ef08f2 100644 --- a/PHP/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/flattened-transparencies-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/get-resource.php b/PHP/Endpoint Examples/JSON Payload/get-resource.php index fbefa2d3..47397ac7 100644 --- a/PHP/Endpoint Examples/JSON Payload/get-resource.php +++ b/PHP/Endpoint Examples/JSON Payload/get-resource.php @@ -7,7 +7,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Resource UUIDs can be found in the JSON response of POST requests as "outputId". Resource UUIDs usually look like this: '0950b9bdf-0465-4d3f-8ea3-d2894f1ae839'. $id = 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; // place resource uuid here diff --git a/PHP/Endpoint Examples/JSON Payload/gif.php b/PHP/Endpoint Examples/JSON Payload/gif.php index d25fceb0..d75d5966 100644 --- a/PHP/Endpoint Examples/JSON Payload/gif.php +++ b/PHP/Endpoint Examples/JSON Payload/gif.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/jpg.php b/PHP/Endpoint Examples/JSON Payload/jpg.php index cf304836..53b2fdb1 100644 --- a/PHP/Endpoint Examples/JSON Payload/jpg.php +++ b/PHP/Endpoint Examples/JSON Payload/jpg.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/linearized-pdf.php b/PHP/Endpoint Examples/JSON Payload/linearized-pdf.php index e2ddba20..b4917be3 100644 --- a/PHP/Endpoint Examples/JSON Payload/linearized-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/linearized-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/markdown.php b/PHP/Endpoint Examples/JSON Payload/markdown.php index 766666bf..a1183e43 100644 --- a/PHP/Endpoint Examples/JSON Payload/markdown.php +++ b/PHP/Endpoint Examples/JSON Payload/markdown.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/merged-pdf.php b/PHP/Endpoint Examples/JSON Payload/merged-pdf.php index f49e87b1..a12383b3 100644 --- a/PHP/Endpoint Examples/JSON Payload/merged-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/merged-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_first_file_client = new Client(['http_errors' => false]); $upload_first_file_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-info.php b/PHP/Endpoint Examples/JSON Payload/pdf-info.php index ade0eac4..8b9fa4e6 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-info.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-info.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-acroforms.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-acroforms.php index b8e97c4e..5c641b73 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-acroforms.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-acroforms.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-added-attachment.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-added-attachment.php index 6b8842c9..83ab3009 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-added-attachment.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-added-attachment.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_pdf_client = new Client(['http_errors' => false]); $upload_pdf_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-added-image.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-added-image.php index f3cce1c7..32f68c6f 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-added-image.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-added-image.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_pdf_client = new Client(['http_errors' => false]); $upload_pdf_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-added-text.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-added-text.php index 81acabee..28690aaf 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-added-text.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-added-text.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-converted-colors.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-converted-colors.php index 35b27507..c8122a74 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-converted-colors.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-converted-colors.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.php index 91d4282a..585852cd 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-imported-form-data.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_pdf_client = new Client(['http_errors' => false]); $upload_pdf_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-ocr-text.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-ocr-text.php index c82c264e..fe707093 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-ocr-text.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-ocr-text.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.php index 9846afec..ea50105c 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-page-boxes-set.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.php index af61704b..78089ce5 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-applied.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; diff --git a/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.php b/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.php index 38fd79a7..cbf0d3e7 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf-with-redacted-text-preview.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; diff --git a/PHP/Endpoint Examples/JSON Payload/pdf.php b/PHP/Endpoint Examples/JSON Payload/pdf.php index c4536679..76c5828f 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/pdfa.php b/PHP/Endpoint Examples/JSON Payload/pdfa.php index 5ebc16aa..dbb5fbb0 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdfa.php +++ b/PHP/Endpoint Examples/JSON Payload/pdfa.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/pdfx.php b/PHP/Endpoint Examples/JSON Payload/pdfx.php index 4a2b9ee5..b8ee332a 100644 --- a/PHP/Endpoint Examples/JSON Payload/pdfx.php +++ b/PHP/Endpoint Examples/JSON Payload/pdfx.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/png.php b/PHP/Endpoint Examples/JSON Payload/png.php index 7517a0b3..3b57d02f 100644 --- a/PHP/Endpoint Examples/JSON Payload/png.php +++ b/PHP/Endpoint Examples/JSON Payload/png.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/powerpoint.php b/PHP/Endpoint Examples/JSON Payload/powerpoint.php index 843a0fff..78d671d8 100644 --- a/PHP/Endpoint Examples/JSON Payload/powerpoint.php +++ b/PHP/Endpoint Examples/JSON Payload/powerpoint.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/rasterized-pdf.php b/PHP/Endpoint Examples/JSON Payload/rasterized-pdf.php index 2baf5737..25b99c97 100644 --- a/PHP/Endpoint Examples/JSON Payload/rasterized-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/rasterized-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/restricted-pdf.php b/PHP/Endpoint Examples/JSON Payload/restricted-pdf.php index da4b7a37..b1cd3fd9 100644 --- a/PHP/Endpoint Examples/JSON Payload/restricted-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/restricted-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; diff --git a/PHP/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.php b/PHP/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.php index 26dcbc6d..1bddfc7f 100644 --- a/PHP/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.php +++ b/PHP/Endpoint Examples/JSON Payload/signed-pdf-non-pfx.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $input_upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/signed-pdf.php b/PHP/Endpoint Examples/JSON Payload/signed-pdf.php index 2de2c2cc..025be30c 100644 --- a/PHP/Endpoint Examples/JSON Payload/signed-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/signed-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $input_upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/split-pdf.php b/PHP/Endpoint Examples/JSON Payload/split-pdf.php index 7cd1cc25..d7783acd 100644 --- a/PHP/Endpoint Examples/JSON Payload/split-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/split-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/tif.php b/PHP/Endpoint Examples/JSON Payload/tif.php index 331accf2..26c65c31 100644 --- a/PHP/Endpoint Examples/JSON Payload/tif.php +++ b/PHP/Endpoint Examples/JSON Payload/tif.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/unrestricted-pdf.php b/PHP/Endpoint Examples/JSON Payload/unrestricted-pdf.php index 45c06a37..1aaee677 100644 --- a/PHP/Endpoint Examples/JSON Payload/unrestricted-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/unrestricted-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; diff --git a/PHP/Endpoint Examples/JSON Payload/unzip.php b/PHP/Endpoint Examples/JSON Payload/unzip.php index 833080a2..61fd59cb 100644 --- a/PHP/Endpoint Examples/JSON Payload/unzip.php +++ b/PHP/Endpoint Examples/JSON Payload/unzip.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/upload.php b/PHP/Endpoint Examples/JSON Payload/upload.php index b8289773..3a4904f7 100644 --- a/PHP/Endpoint Examples/JSON Payload/upload.php +++ b/PHP/Endpoint Examples/JSON Payload/upload.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(['http_errors' => false]); $headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/watermarked-pdf.php b/PHP/Endpoint Examples/JSON Payload/watermarked-pdf.php index 60e9fbab..468aec7b 100644 --- a/PHP/Endpoint Examples/JSON Payload/watermarked-pdf.php +++ b/PHP/Endpoint Examples/JSON Payload/watermarked-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; diff --git a/PHP/Endpoint Examples/JSON Payload/word.php b/PHP/Endpoint Examples/JSON Payload/word.php index da2663c7..3008bd76 100644 --- a/PHP/Endpoint Examples/JSON Payload/word.php +++ b/PHP/Endpoint Examples/JSON Payload/word.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_client = new Client(['http_errors' => false]); $upload_headers = [ diff --git a/PHP/Endpoint Examples/JSON Payload/zip.php b/PHP/Endpoint Examples/JSON Payload/zip.php index 935f4eb5..c8b8f0c0 100644 --- a/PHP/Endpoint Examples/JSON Payload/zip.php +++ b/PHP/Endpoint Examples/JSON Payload/zip.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $upload_first_file_client = new Client(['http_errors' => false]); $upload_first_file_headers = [ diff --git a/PHP/Endpoint Examples/Multipart Payload/batch-delete.php b/PHP/Endpoint Examples/Multipart Payload/batch-delete.php index 1ba30b89..7e4456d1 100644 --- a/PHP/Endpoint Examples/Multipart Payload/batch-delete.php +++ b/PHP/Endpoint Examples/Multipart Payload/batch-delete.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/bmp.php b/PHP/Endpoint Examples/Multipart Payload/bmp.php index 597b9a8e..078ddf1f 100644 --- a/PHP/Endpoint Examples/Multipart Payload/bmp.php +++ b/PHP/Endpoint Examples/Multipart Payload/bmp.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/compressed-pdf.php b/PHP/Endpoint Examples/Multipart Payload/compressed-pdf.php index ca71664d..003118f7 100644 --- a/PHP/Endpoint Examples/Multipart Payload/compressed-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/compressed-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/decrypted-pdf.php b/PHP/Endpoint Examples/Multipart Payload/decrypted-pdf.php index 18b4e52a..0daadfa5 100644 --- a/PHP/Endpoint Examples/Multipart Payload/decrypted-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/decrypted-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; diff --git a/PHP/Endpoint Examples/Multipart Payload/delete-resource.php b/PHP/Endpoint Examples/Multipart Payload/delete-resource.php index 1271455f..3e58b938 100644 --- a/PHP/Endpoint Examples/Multipart Payload/delete-resource.php +++ b/PHP/Endpoint Examples/Multipart Payload/delete-resource.php @@ -6,7 +6,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $curl = curl_init(); diff --git a/PHP/Endpoint Examples/Multipart Payload/encrypted-pdf.php b/PHP/Endpoint Examples/Multipart Payload/encrypted-pdf.php index a3a58f0a..5ae00342 100644 --- a/PHP/Endpoint Examples/Multipart Payload/encrypted-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/encrypted-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; diff --git a/PHP/Endpoint Examples/Multipart Payload/excel.php b/PHP/Endpoint Examples/Multipart Payload/excel.php index 72fe7847..81096dc1 100644 --- a/PHP/Endpoint Examples/Multipart Payload/excel.php +++ b/PHP/Endpoint Examples/Multipart Payload/excel.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/exported-form-data.php b/PHP/Endpoint Examples/Multipart Payload/exported-form-data.php index 4916a6e8..011a54e1 100644 --- a/PHP/Endpoint Examples/Multipart Payload/exported-form-data.php +++ b/PHP/Endpoint Examples/Multipart Payload/exported-form-data.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/extracted-images.php b/PHP/Endpoint Examples/Multipart Payload/extracted-images.php index 09c0777a..d5e9fdb1 100644 --- a/PHP/Endpoint Examples/Multipart Payload/extracted-images.php +++ b/PHP/Endpoint Examples/Multipart Payload/extracted-images.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/extracted-text.php b/PHP/Endpoint Examples/Multipart Payload/extracted-text.php index 65f6533a..610a51bc 100644 --- a/PHP/Endpoint Examples/Multipart Payload/extracted-text.php +++ b/PHP/Endpoint Examples/Multipart Payload/extracted-text.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.php b/PHP/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.php index bb9c2452..61b5b473 100644 --- a/PHP/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/flattened-annotations-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/flattened-forms-pdf.php b/PHP/Endpoint Examples/Multipart Payload/flattened-forms-pdf.php index 3d774830..2a033b8e 100644 --- a/PHP/Endpoint Examples/Multipart Payload/flattened-forms-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/flattened-forms-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); $headers = [ diff --git a/PHP/Endpoint Examples/Multipart Payload/flattened-layers-pdf.php b/PHP/Endpoint Examples/Multipart Payload/flattened-layers-pdf.php index da11bd2d..eb2ef4f1 100644 --- a/PHP/Endpoint Examples/Multipart Payload/flattened-layers-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/flattened-layers-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.php b/PHP/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.php index 9824c626..743d4956 100644 --- a/PHP/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/flattened-transparencies-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/get-resource.php b/PHP/Endpoint Examples/Multipart Payload/get-resource.php index fbefa2d3..47397ac7 100644 --- a/PHP/Endpoint Examples/Multipart Payload/get-resource.php +++ b/PHP/Endpoint Examples/Multipart Payload/get-resource.php @@ -7,7 +7,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Resource UUIDs can be found in the JSON response of POST requests as "outputId". Resource UUIDs usually look like this: '0950b9bdf-0465-4d3f-8ea3-d2894f1ae839'. $id = 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; // place resource uuid here diff --git a/PHP/Endpoint Examples/Multipart Payload/gif.php b/PHP/Endpoint Examples/Multipart Payload/gif.php index 122c0f52..a5caf42a 100644 --- a/PHP/Endpoint Examples/Multipart Payload/gif.php +++ b/PHP/Endpoint Examples/Multipart Payload/gif.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/jpg.php b/PHP/Endpoint Examples/Multipart Payload/jpg.php index 02fe751b..9a3804fb 100644 --- a/PHP/Endpoint Examples/Multipart Payload/jpg.php +++ b/PHP/Endpoint Examples/Multipart Payload/jpg.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/linearized-pdf.php b/PHP/Endpoint Examples/Multipart Payload/linearized-pdf.php index 13a45e41..be61fc9b 100644 --- a/PHP/Endpoint Examples/Multipart Payload/linearized-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/linearized-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/markdown.php b/PHP/Endpoint Examples/Multipart Payload/markdown.php index 6e1908c8..925b8829 100644 --- a/PHP/Endpoint Examples/Multipart Payload/markdown.php +++ b/PHP/Endpoint Examples/Multipart Payload/markdown.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/merged-pdf.php b/PHP/Endpoint Examples/Multipart Payload/merged-pdf.php index b7b2a8b6..3ef0d081 100644 --- a/PHP/Endpoint Examples/Multipart Payload/merged-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/merged-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-info.php b/PHP/Endpoint Examples/Multipart Payload/pdf-info.php index b5d7fa55..1c35b266 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-info.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-info.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-acroforms.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-acroforms.php index 99f1ddff..98b96ff3 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-acroforms.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-acroforms.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.php index c2b4d7b4..8371ef6f 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-attachment.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-image.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-image.php index 07e64487..7a423cc3 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-image.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-image.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-text.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-text.php index 4df43c03..cea20ee8 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-text.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-added-text.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.php index 4e40dce9..85b0f1c8 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-converted-colors.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.php index ffc2e61d..ea9a3c53 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-imported-form-data.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); $headers = [ diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.php index af136f42..79ff467d 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-ocr-text.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.php index a8b0f3e7..69fa31b7 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-page-boxes-set.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.php index 485ee921..8d42fde2 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-applied.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.php b/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.php index 9aeed32a..5e85b230 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf-with-redacted-text-preview.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; diff --git a/PHP/Endpoint Examples/Multipart Payload/pdf.php b/PHP/Endpoint Examples/Multipart Payload/pdf.php index a6c46443..af36b545 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdfa.php b/PHP/Endpoint Examples/Multipart Payload/pdfa.php index 65a459ee..e53bf1d4 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdfa.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdfa.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/pdfx.php b/PHP/Endpoint Examples/Multipart Payload/pdfx.php index fa1b2659..0a488e49 100644 --- a/PHP/Endpoint Examples/Multipart Payload/pdfx.php +++ b/PHP/Endpoint Examples/Multipart Payload/pdfx.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/png.php b/PHP/Endpoint Examples/Multipart Payload/png.php index 507d045e..df84715a 100644 --- a/PHP/Endpoint Examples/Multipart Payload/png.php +++ b/PHP/Endpoint Examples/Multipart Payload/png.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/powerpoint.php b/PHP/Endpoint Examples/Multipart Payload/powerpoint.php index fb94af78..150e1efd 100644 --- a/PHP/Endpoint Examples/Multipart Payload/powerpoint.php +++ b/PHP/Endpoint Examples/Multipart Payload/powerpoint.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/rasterized-pdf.php b/PHP/Endpoint Examples/Multipart Payload/rasterized-pdf.php index ca86df92..9c6f72f3 100644 --- a/PHP/Endpoint Examples/Multipart Payload/rasterized-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/rasterized-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/request-status.php b/PHP/Endpoint Examples/Multipart Payload/request-status.php index eac7facc..40245c58 100644 --- a/PHP/Endpoint Examples/Multipart Payload/request-status.php +++ b/PHP/Endpoint Examples/Multipart Payload/request-status.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client diff --git a/PHP/Endpoint Examples/Multipart Payload/restricted-pdf.php b/PHP/Endpoint Examples/Multipart Payload/restricted-pdf.php index 4831e8d2..f05e37aa 100644 --- a/PHP/Endpoint Examples/Multipart Payload/restricted-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/restricted-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; diff --git a/PHP/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.php b/PHP/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.php index 1da70412..2b492731 100644 --- a/PHP/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.php +++ b/PHP/Endpoint Examples/Multipart Payload/signed-pdf-non-pfx.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/signed-pdf.php b/PHP/Endpoint Examples/Multipart Payload/signed-pdf.php index efd875e7..ebb0dbd1 100644 --- a/PHP/Endpoint Examples/Multipart Payload/signed-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/signed-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/split-pdf.php b/PHP/Endpoint Examples/Multipart Payload/split-pdf.php index 3d4246d8..c687ec1f 100644 --- a/PHP/Endpoint Examples/Multipart Payload/split-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/split-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/tif.php b/PHP/Endpoint Examples/Multipart Payload/tif.php index 05a44dad..1639c068 100644 --- a/PHP/Endpoint Examples/Multipart Payload/tif.php +++ b/PHP/Endpoint Examples/Multipart Payload/tif.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/unrestricted-pdf.php b/PHP/Endpoint Examples/Multipart Payload/unrestricted-pdf.php index 66794c99..95919052 100644 --- a/PHP/Endpoint Examples/Multipart Payload/unrestricted-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/unrestricted-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; diff --git a/PHP/Endpoint Examples/Multipart Payload/unzip.php b/PHP/Endpoint Examples/Multipart Payload/unzip.php index d108df4f..56d7ca1a 100644 --- a/PHP/Endpoint Examples/Multipart Payload/unzip.php +++ b/PHP/Endpoint Examples/Multipart Payload/unzip.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/upload.php b/PHP/Endpoint Examples/Multipart Payload/upload.php index 2fe3cc12..a49a2dee 100644 --- a/PHP/Endpoint Examples/Multipart Payload/upload.php +++ b/PHP/Endpoint Examples/Multipart Payload/upload.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/watermarked-pdf.php b/PHP/Endpoint Examples/Multipart Payload/watermarked-pdf.php index d138f895..7b9f2b33 100644 --- a/PHP/Endpoint Examples/Multipart Payload/watermarked-pdf.php +++ b/PHP/Endpoint Examples/Multipart Payload/watermarked-pdf.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; // Toggle deletion of sensitive files (default: false) $DELETE_SENSITIVE_FILES = false; diff --git a/PHP/Endpoint Examples/Multipart Payload/word.php b/PHP/Endpoint Examples/Multipart Payload/word.php index 93d5347b..3b653192 100644 --- a/PHP/Endpoint Examples/Multipart Payload/word.php +++ b/PHP/Endpoint Examples/Multipart Payload/word.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); // Create a new instance of the Guzzle HTTP client. diff --git a/PHP/Endpoint Examples/Multipart Payload/zip.php b/PHP/Endpoint Examples/Multipart Payload/zip.php index a575d508..d8e2bee3 100644 --- a/PHP/Endpoint Examples/Multipart Payload/zip.php +++ b/PHP/Endpoint Examples/Multipart Payload/zip.php @@ -11,7 +11,7 @@ /* For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. * For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work */ -//$apiUrl "https://eu-api.pdfrest.com"; +//$apiUrl = "https://eu-api.pdfrest.com"; $client = new Client(); $headers = [ From e789167860d526a3c88a1f0c14eeda3e7a677b94 Mon Sep 17 00:00:00 2001 From: Taylor Smith Date: Thu, 11 Sep 2025 13:50:47 -0500 Subject: [PATCH 10/11] Correct URL in python up-toolkit to match its sister sample --- Python/Endpoint Examples/JSON Payload/up-toolkit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Python/Endpoint Examples/JSON Payload/up-toolkit.py b/Python/Endpoint Examples/JSON Payload/up-toolkit.py index f5e0a854..2cb49f69 100644 --- a/Python/Endpoint Examples/JSON Payload/up-toolkit.py +++ b/Python/Endpoint Examples/JSON Payload/up-toolkit.py @@ -2,14 +2,14 @@ import json # By default, we use the US-based API service. This is the primary endpoint for global use. -up_url = f"https://api.pdfrest.com/up-toolkit" +api_url = "https://api.pdfrest.com" # For GDPR compliance and enhanced performance for European users, you can switch to the EU-based service by uncommenting the URL below. # For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work -#up_url = f"https://eu-api.pdfrest.com/up-toolkit" +#api_url = "https://eu-api.pdfrest.com" # up-forms and up-office can be used to query the other tools -up_url = f"https://api.pdfrest.com/up-toolkit" +up_url = f"{api_url}/up-toolkit" print("Sending GET request to /up-toolkit endpoint...") response = requests.get(up_url) From 60474f04d56d1602c1d2fabf96783d2babb78a36 Mon Sep 17 00:00:00 2001 From: Taylor Smith Date: Thu, 11 Sep 2025 13:55:25 -0500 Subject: [PATCH 11/11] Update Java comment to remind the user to comment out the default url when changing to EU --- Java/Complex Flow Examples/DecryptAddReencrypt.java | 2 +- Java/Complex Flow Examples/MergeDifferentFileTypes.java | 2 +- Java/Complex Flow Examples/OcrWithExtractText.java | 2 +- Java/Complex Flow Examples/PDFA3bWithAttachment.java | 2 +- Java/Complex Flow Examples/PreserveWordDocument.java | 2 +- Java/Complex Flow Examples/ProtectedWatermark.java | 2 +- Java/Complex Flow Examples/RedactPreviewAndFinalize.java | 2 +- Java/Endpoint Examples/JSON Payload/BatchDelete.java | 2 +- Java/Endpoint Examples/JSON Payload/Bmp.java | 2 +- Java/Endpoint Examples/JSON Payload/CompressedPDF.java | 2 +- Java/Endpoint Examples/JSON Payload/DecryptedPDF.java | 2 +- Java/Endpoint Examples/JSON Payload/DeleteResource.java | 2 +- Java/Endpoint Examples/JSON Payload/EncryptedPDF.java | 2 +- Java/Endpoint Examples/JSON Payload/Excel.java | 2 +- Java/Endpoint Examples/JSON Payload/ExportedFormData.java | 2 +- Java/Endpoint Examples/JSON Payload/ExtractedImages.java | 2 +- Java/Endpoint Examples/JSON Payload/ExtractedText.java | 2 +- .../Endpoint Examples/JSON Payload/FlattenedAnnotationsPDF.java | 2 +- Java/Endpoint Examples/JSON Payload/FlattenedFormsPDF.java | 2 +- Java/Endpoint Examples/JSON Payload/FlattenedLayersPDF.java | 2 +- .../JSON Payload/FlattenedTransparenciesPDF.java | 2 +- Java/Endpoint Examples/JSON Payload/GetResource.java | 2 +- Java/Endpoint Examples/JSON Payload/Gif.java | 2 +- Java/Endpoint Examples/JSON Payload/Jpg.java | 2 +- Java/Endpoint Examples/JSON Payload/LinearizedPDF.java | 2 +- Java/Endpoint Examples/JSON Payload/Markdown.java | 2 +- Java/Endpoint Examples/JSON Payload/MergedPDF.java | 2 +- Java/Endpoint Examples/JSON Payload/PDF.java | 2 +- Java/Endpoint Examples/JSON Payload/PDFA.java | 2 +- Java/Endpoint Examples/JSON Payload/PDFInfo.java | 2 +- Java/Endpoint Examples/JSON Payload/PDFWithAcroforms.java | 2 +- Java/Endpoint Examples/JSON Payload/PDFWithAddedAttachment.java | 2 +- Java/Endpoint Examples/JSON Payload/PDFWithAddedImage.java | 2 +- Java/Endpoint Examples/JSON Payload/PDFWithAddedText.java | 2 +- Java/Endpoint Examples/JSON Payload/PDFWithConvertedColors.java | 2 +- .../Endpoint Examples/JSON Payload/PDFWithImportedFormData.java | 2 +- Java/Endpoint Examples/JSON Payload/PDFWithOCRText.java | 2 +- Java/Endpoint Examples/JSON Payload/PDFWithPageBoxesSet.java | 2 +- .../JSON Payload/PDFWithRedactedTextApplied.java | 2 +- .../JSON Payload/PDFWithRedactedTextPreview.java | 2 +- Java/Endpoint Examples/JSON Payload/PDFX.java | 2 +- Java/Endpoint Examples/JSON Payload/Png.java | 2 +- Java/Endpoint Examples/JSON Payload/Powerpoint.java | 2 +- Java/Endpoint Examples/JSON Payload/RasterizedPDF.java | 2 +- Java/Endpoint Examples/JSON Payload/RestrictedPDF.java | 2 +- Java/Endpoint Examples/JSON Payload/SignedPDF.java | 2 +- Java/Endpoint Examples/JSON Payload/SignedPDFNonPFX.java | 2 +- Java/Endpoint Examples/JSON Payload/SplitPDF.java | 2 +- Java/Endpoint Examples/JSON Payload/Tif.java | 2 +- Java/Endpoint Examples/JSON Payload/UnrestrictedPDF.java | 2 +- Java/Endpoint Examples/JSON Payload/Unzip.java | 2 +- Java/Endpoint Examples/JSON Payload/UpToolkit.java | 2 +- Java/Endpoint Examples/JSON Payload/Upload.java | 2 +- Java/Endpoint Examples/JSON Payload/WatermarkedPDF.java | 2 +- Java/Endpoint Examples/JSON Payload/Word.java | 2 +- Java/Endpoint Examples/JSON Payload/Zip.java | 2 +- Java/Endpoint Examples/Multipart Payload/BatchDelete.java | 2 +- Java/Endpoint Examples/Multipart Payload/Bmp.java | 2 +- Java/Endpoint Examples/Multipart Payload/CompressedPDF.java | 2 +- Java/Endpoint Examples/Multipart Payload/DecryptedPDF.java | 2 +- Java/Endpoint Examples/Multipart Payload/DeleteResource.java | 2 +- Java/Endpoint Examples/Multipart Payload/EncryptedPDF.java | 2 +- Java/Endpoint Examples/Multipart Payload/Excel.java | 2 +- Java/Endpoint Examples/Multipart Payload/ExportedFormData.java | 2 +- Java/Endpoint Examples/Multipart Payload/ExtractedImages.java | 2 +- Java/Endpoint Examples/Multipart Payload/ExtractedText.java | 2 +- .../Multipart Payload/FlattenedAnnotationsPDF.java | 2 +- Java/Endpoint Examples/Multipart Payload/FlattenedFormsPDF.java | 2 +- .../Endpoint Examples/Multipart Payload/FlattenedLayersPDF.java | 2 +- .../Multipart Payload/FlattenedTransparenciesPDF.java | 2 +- Java/Endpoint Examples/Multipart Payload/GetResource.java | 2 +- Java/Endpoint Examples/Multipart Payload/Gif.java | 2 +- Java/Endpoint Examples/Multipart Payload/Jpg.java | 2 +- Java/Endpoint Examples/Multipart Payload/LinearizedPDF.java | 2 +- Java/Endpoint Examples/Multipart Payload/Markdown.java | 2 +- Java/Endpoint Examples/Multipart Payload/MergedPDF.java | 2 +- Java/Endpoint Examples/Multipart Payload/PDF.java | 2 +- Java/Endpoint Examples/Multipart Payload/PDFA.java | 2 +- Java/Endpoint Examples/Multipart Payload/PDFInfo.java | 2 +- Java/Endpoint Examples/Multipart Payload/PDFWithAcroforms.java | 2 +- .../Multipart Payload/PDFWithAddedAttachment.java | 2 +- Java/Endpoint Examples/Multipart Payload/PDFWithAddedImage.java | 2 +- Java/Endpoint Examples/Multipart Payload/PDFWithAddedText.java | 2 +- .../Multipart Payload/PDFWithConvertedColors.java | 2 +- .../Multipart Payload/PDFWithImportedFormData.java | 2 +- Java/Endpoint Examples/Multipart Payload/PDFWithOCRText.java | 2 +- .../Multipart Payload/PDFWithPageBoxesSet.java | 2 +- .../Multipart Payload/PDFWithRedactedTextApplied.java | 2 +- .../Multipart Payload/PDFWithRedactedTextPreview.java | 2 +- Java/Endpoint Examples/Multipart Payload/PDFX.java | 2 +- Java/Endpoint Examples/Multipart Payload/Png.java | 2 +- Java/Endpoint Examples/Multipart Payload/Powerpoint.java | 2 +- Java/Endpoint Examples/Multipart Payload/RasterizedPDF.java | 2 +- Java/Endpoint Examples/Multipart Payload/RequestStatus.java | 2 +- Java/Endpoint Examples/Multipart Payload/RestrictedPDF.java | 2 +- Java/Endpoint Examples/Multipart Payload/SignedPDF.java | 2 +- Java/Endpoint Examples/Multipart Payload/SignedPDFNonPFX.java | 2 +- Java/Endpoint Examples/Multipart Payload/SplitPDF.java | 2 +- Java/Endpoint Examples/Multipart Payload/Tif.java | 2 +- Java/Endpoint Examples/Multipart Payload/UnrestrictedPDF.java | 2 +- Java/Endpoint Examples/Multipart Payload/Unzip.java | 2 +- Java/Endpoint Examples/Multipart Payload/UpToolkit.java | 2 +- Java/Endpoint Examples/Multipart Payload/Upload.java | 2 +- Java/Endpoint Examples/Multipart Payload/WatermarkedPDF.java | 2 +- Java/Endpoint Examples/Multipart Payload/Word.java | 2 +- Java/Endpoint Examples/Multipart Payload/Zip.java | 2 +- 106 files changed, 106 insertions(+), 106 deletions(-) diff --git a/Java/Complex Flow Examples/DecryptAddReencrypt.java b/Java/Complex Flow Examples/DecryptAddReencrypt.java index 1ae1f9ab..ef7984a4 100644 --- a/Java/Complex Flow Examples/DecryptAddReencrypt.java +++ b/Java/Complex Flow Examples/DecryptAddReencrypt.java @@ -20,7 +20,7 @@ public class DecryptAddReencrypt { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Complex Flow Examples/MergeDifferentFileTypes.java b/Java/Complex Flow Examples/MergeDifferentFileTypes.java index 92c25424..4bd8f12c 100644 --- a/Java/Complex Flow Examples/MergeDifferentFileTypes.java +++ b/Java/Complex Flow Examples/MergeDifferentFileTypes.java @@ -23,7 +23,7 @@ public class MergeDifferentFileTypes { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Complex Flow Examples/OcrWithExtractText.java b/Java/Complex Flow Examples/OcrWithExtractText.java index 6e857e40..b97abd73 100644 --- a/Java/Complex Flow Examples/OcrWithExtractText.java +++ b/Java/Complex Flow Examples/OcrWithExtractText.java @@ -20,7 +20,7 @@ public class OcrWithExtractText { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Complex Flow Examples/PDFA3bWithAttachment.java b/Java/Complex Flow Examples/PDFA3bWithAttachment.java index 90bb771a..38dd135b 100644 --- a/Java/Complex Flow Examples/PDFA3bWithAttachment.java +++ b/Java/Complex Flow Examples/PDFA3bWithAttachment.java @@ -21,7 +21,7 @@ public class PDFA3bWithAttachment { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Complex Flow Examples/PreserveWordDocument.java b/Java/Complex Flow Examples/PreserveWordDocument.java index aa19ac58..e22734b7 100644 --- a/Java/Complex Flow Examples/PreserveWordDocument.java +++ b/Java/Complex Flow Examples/PreserveWordDocument.java @@ -18,7 +18,7 @@ public class PreserveWordDocument { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Complex Flow Examples/ProtectedWatermark.java b/Java/Complex Flow Examples/ProtectedWatermark.java index 0541440b..54d1d6aa 100644 --- a/Java/Complex Flow Examples/ProtectedWatermark.java +++ b/Java/Complex Flow Examples/ProtectedWatermark.java @@ -18,7 +18,7 @@ public class ProtectedWatermark { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Complex Flow Examples/RedactPreviewAndFinalize.java b/Java/Complex Flow Examples/RedactPreviewAndFinalize.java index 3b8b94c4..56159a8e 100644 --- a/Java/Complex Flow Examples/RedactPreviewAndFinalize.java +++ b/Java/Complex Flow Examples/RedactPreviewAndFinalize.java @@ -19,7 +19,7 @@ public class RedactPreviewAndFinalize { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/BatchDelete.java b/Java/Endpoint Examples/JSON Payload/BatchDelete.java index ae2cbea2..9484adac 100644 --- a/Java/Endpoint Examples/JSON Payload/BatchDelete.java +++ b/Java/Endpoint Examples/JSON Payload/BatchDelete.java @@ -10,7 +10,7 @@ public class BatchDelete { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static String API_URL = "https://eu-api.pdfrest.com" diff --git a/Java/Endpoint Examples/JSON Payload/Bmp.java b/Java/Endpoint Examples/JSON Payload/Bmp.java index 9300d1a6..88e18aa1 100644 --- a/Java/Endpoint Examples/JSON Payload/Bmp.java +++ b/Java/Endpoint Examples/JSON Payload/Bmp.java @@ -12,7 +12,7 @@ public class Bmp { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/CompressedPDF.java b/Java/Endpoint Examples/JSON Payload/CompressedPDF.java index f1cdc709..90ae6e2b 100644 --- a/Java/Endpoint Examples/JSON Payload/CompressedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/CompressedPDF.java @@ -12,7 +12,7 @@ public class CompressedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/DecryptedPDF.java b/Java/Endpoint Examples/JSON Payload/DecryptedPDF.java index 266e3bd4..52faceef 100644 --- a/Java/Endpoint Examples/JSON Payload/DecryptedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/DecryptedPDF.java @@ -12,7 +12,7 @@ public class DecryptedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/DeleteResource.java b/Java/Endpoint Examples/JSON Payload/DeleteResource.java index 7edc4114..95c5b143 100644 --- a/Java/Endpoint Examples/JSON Payload/DeleteResource.java +++ b/Java/Endpoint Examples/JSON Payload/DeleteResource.java @@ -9,7 +9,7 @@ public class DeleteResource { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/EncryptedPDF.java b/Java/Endpoint Examples/JSON Payload/EncryptedPDF.java index c3fc1568..9ec439d4 100644 --- a/Java/Endpoint Examples/JSON Payload/EncryptedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/EncryptedPDF.java @@ -12,7 +12,7 @@ public class EncryptedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/Excel.java b/Java/Endpoint Examples/JSON Payload/Excel.java index 92c594d8..359fdd4b 100644 --- a/Java/Endpoint Examples/JSON Payload/Excel.java +++ b/Java/Endpoint Examples/JSON Payload/Excel.java @@ -12,7 +12,7 @@ public class Excel { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/ExportedFormData.java b/Java/Endpoint Examples/JSON Payload/ExportedFormData.java index eb40e0e0..5d296a98 100644 --- a/Java/Endpoint Examples/JSON Payload/ExportedFormData.java +++ b/Java/Endpoint Examples/JSON Payload/ExportedFormData.java @@ -12,7 +12,7 @@ public class ExportedFormData { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/ExtractedImages.java b/Java/Endpoint Examples/JSON Payload/ExtractedImages.java index a4feb334..95d31a37 100644 --- a/Java/Endpoint Examples/JSON Payload/ExtractedImages.java +++ b/Java/Endpoint Examples/JSON Payload/ExtractedImages.java @@ -12,7 +12,7 @@ public class ExtractedImages { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/ExtractedText.java b/Java/Endpoint Examples/JSON Payload/ExtractedText.java index e97e81b6..d06b0a1d 100644 --- a/Java/Endpoint Examples/JSON Payload/ExtractedText.java +++ b/Java/Endpoint Examples/JSON Payload/ExtractedText.java @@ -12,7 +12,7 @@ public class ExtractedText { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/FlattenedAnnotationsPDF.java b/Java/Endpoint Examples/JSON Payload/FlattenedAnnotationsPDF.java index f9f5346b..4e7f0b1d 100644 --- a/Java/Endpoint Examples/JSON Payload/FlattenedAnnotationsPDF.java +++ b/Java/Endpoint Examples/JSON Payload/FlattenedAnnotationsPDF.java @@ -12,7 +12,7 @@ public class FlattenedAnnotationsPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/FlattenedFormsPDF.java b/Java/Endpoint Examples/JSON Payload/FlattenedFormsPDF.java index 5e81070f..68bcaf12 100644 --- a/Java/Endpoint Examples/JSON Payload/FlattenedFormsPDF.java +++ b/Java/Endpoint Examples/JSON Payload/FlattenedFormsPDF.java @@ -12,7 +12,7 @@ public class FlattenedFormsPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/FlattenedLayersPDF.java b/Java/Endpoint Examples/JSON Payload/FlattenedLayersPDF.java index 2a0a6f96..870e5294 100644 --- a/Java/Endpoint Examples/JSON Payload/FlattenedLayersPDF.java +++ b/Java/Endpoint Examples/JSON Payload/FlattenedLayersPDF.java @@ -12,7 +12,7 @@ public class FlattenedLayersPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/FlattenedTransparenciesPDF.java b/Java/Endpoint Examples/JSON Payload/FlattenedTransparenciesPDF.java index c96757b3..54828a63 100644 --- a/Java/Endpoint Examples/JSON Payload/FlattenedTransparenciesPDF.java +++ b/Java/Endpoint Examples/JSON Payload/FlattenedTransparenciesPDF.java @@ -12,7 +12,7 @@ public class FlattenedTransparenciesPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/GetResource.java b/Java/Endpoint Examples/JSON Payload/GetResource.java index b538a619..c80b7e89 100644 --- a/Java/Endpoint Examples/JSON Payload/GetResource.java +++ b/Java/Endpoint Examples/JSON Payload/GetResource.java @@ -11,7 +11,7 @@ public class GetResource { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/Gif.java b/Java/Endpoint Examples/JSON Payload/Gif.java index 0c1c4177..c0884210 100644 --- a/Java/Endpoint Examples/JSON Payload/Gif.java +++ b/Java/Endpoint Examples/JSON Payload/Gif.java @@ -12,7 +12,7 @@ public class Gif { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/Jpg.java b/Java/Endpoint Examples/JSON Payload/Jpg.java index 903e6841..e751884b 100644 --- a/Java/Endpoint Examples/JSON Payload/Jpg.java +++ b/Java/Endpoint Examples/JSON Payload/Jpg.java @@ -12,7 +12,7 @@ public class Jpg { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/LinearizedPDF.java b/Java/Endpoint Examples/JSON Payload/LinearizedPDF.java index 577cc084..84c1f705 100644 --- a/Java/Endpoint Examples/JSON Payload/LinearizedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/LinearizedPDF.java @@ -12,7 +12,7 @@ public class LinearizedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/Markdown.java b/Java/Endpoint Examples/JSON Payload/Markdown.java index ffc19776..a0d0a71e 100644 --- a/Java/Endpoint Examples/JSON Payload/Markdown.java +++ b/Java/Endpoint Examples/JSON Payload/Markdown.java @@ -12,7 +12,7 @@ public class Markdown { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/MergedPDF.java b/Java/Endpoint Examples/JSON Payload/MergedPDF.java index a0a642ea..f98308af 100644 --- a/Java/Endpoint Examples/JSON Payload/MergedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/MergedPDF.java @@ -12,7 +12,7 @@ public class MergedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/PDF.java b/Java/Endpoint Examples/JSON Payload/PDF.java index 6e5e50d8..1fe414cb 100644 --- a/Java/Endpoint Examples/JSON Payload/PDF.java +++ b/Java/Endpoint Examples/JSON Payload/PDF.java @@ -12,7 +12,7 @@ public class PDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFA.java b/Java/Endpoint Examples/JSON Payload/PDFA.java index 3ee74f09..6f594942 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFA.java +++ b/Java/Endpoint Examples/JSON Payload/PDFA.java @@ -12,7 +12,7 @@ public class PDFA { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFInfo.java b/Java/Endpoint Examples/JSON Payload/PDFInfo.java index 36350d7f..e3d19592 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFInfo.java +++ b/Java/Endpoint Examples/JSON Payload/PDFInfo.java @@ -12,7 +12,7 @@ public class PDFInfo { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithAcroforms.java b/Java/Endpoint Examples/JSON Payload/PDFWithAcroforms.java index c5e1eca6..b7fefd81 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithAcroforms.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithAcroforms.java @@ -12,7 +12,7 @@ public class PDFWithAcroforms { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithAddedAttachment.java b/Java/Endpoint Examples/JSON Payload/PDFWithAddedAttachment.java index 1c4f3aaa..60297668 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithAddedAttachment.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithAddedAttachment.java @@ -12,7 +12,7 @@ public class PDFWithAddedAttachment { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithAddedImage.java b/Java/Endpoint Examples/JSON Payload/PDFWithAddedImage.java index 74b6685a..285144e2 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithAddedImage.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithAddedImage.java @@ -12,7 +12,7 @@ public class PDFWithAddedImage { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithAddedText.java b/Java/Endpoint Examples/JSON Payload/PDFWithAddedText.java index 75d73cc6..98e794b7 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithAddedText.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithAddedText.java @@ -12,7 +12,7 @@ public class PDFWithAddedText { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithConvertedColors.java b/Java/Endpoint Examples/JSON Payload/PDFWithConvertedColors.java index f40f3ee0..d22884e3 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithConvertedColors.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithConvertedColors.java @@ -12,7 +12,7 @@ public class PDFWithConvertedColors { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithImportedFormData.java b/Java/Endpoint Examples/JSON Payload/PDFWithImportedFormData.java index 7761e1f3..65002a99 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithImportedFormData.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithImportedFormData.java @@ -12,7 +12,7 @@ public class PDFWithImportedFormData { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithOCRText.java b/Java/Endpoint Examples/JSON Payload/PDFWithOCRText.java index 6841e53a..8e6ec50b 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithOCRText.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithOCRText.java @@ -12,7 +12,7 @@ public class PDFWithOCRText { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithPageBoxesSet.java b/Java/Endpoint Examples/JSON Payload/PDFWithPageBoxesSet.java index a0008e6e..53eaac57 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithPageBoxesSet.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithPageBoxesSet.java @@ -12,7 +12,7 @@ public class PDFWithPageBoxesSet { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextApplied.java b/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextApplied.java index ca46264c..d41fc740 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextApplied.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextApplied.java @@ -12,7 +12,7 @@ public class PDFWithRedactedTextApplied { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextPreview.java b/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextPreview.java index 07c01bdc..c285437f 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextPreview.java +++ b/Java/Endpoint Examples/JSON Payload/PDFWithRedactedTextPreview.java @@ -12,7 +12,7 @@ public class PDFWithRedactedTextPreview { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/PDFX.java b/Java/Endpoint Examples/JSON Payload/PDFX.java index fb1dd0d1..b8a78265 100644 --- a/Java/Endpoint Examples/JSON Payload/PDFX.java +++ b/Java/Endpoint Examples/JSON Payload/PDFX.java @@ -12,7 +12,7 @@ public class PDFX { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/Png.java b/Java/Endpoint Examples/JSON Payload/Png.java index bd69f3e7..e5b22cd9 100644 --- a/Java/Endpoint Examples/JSON Payload/Png.java +++ b/Java/Endpoint Examples/JSON Payload/Png.java @@ -12,7 +12,7 @@ public class Png { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/Powerpoint.java b/Java/Endpoint Examples/JSON Payload/Powerpoint.java index 9a0cfa5f..8f7f0a9b 100644 --- a/Java/Endpoint Examples/JSON Payload/Powerpoint.java +++ b/Java/Endpoint Examples/JSON Payload/Powerpoint.java @@ -12,7 +12,7 @@ public class Powerpoint { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/RasterizedPDF.java b/Java/Endpoint Examples/JSON Payload/RasterizedPDF.java index 0c21a78b..b9316d76 100644 --- a/Java/Endpoint Examples/JSON Payload/RasterizedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/RasterizedPDF.java @@ -12,7 +12,7 @@ public class RasterizedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/RestrictedPDF.java b/Java/Endpoint Examples/JSON Payload/RestrictedPDF.java index 43b7fdcc..182df6ec 100644 --- a/Java/Endpoint Examples/JSON Payload/RestrictedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/RestrictedPDF.java @@ -12,7 +12,7 @@ public class RestrictedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/SignedPDF.java b/Java/Endpoint Examples/JSON Payload/SignedPDF.java index 6774118c..56923714 100644 --- a/Java/Endpoint Examples/JSON Payload/SignedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/SignedPDF.java @@ -12,7 +12,7 @@ public class SignedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/SignedPDFNonPFX.java b/Java/Endpoint Examples/JSON Payload/SignedPDFNonPFX.java index 8945476e..34d57e4a 100644 --- a/Java/Endpoint Examples/JSON Payload/SignedPDFNonPFX.java +++ b/Java/Endpoint Examples/JSON Payload/SignedPDFNonPFX.java @@ -12,7 +12,7 @@ public class SignedPDFNonPFX { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/SplitPDF.java b/Java/Endpoint Examples/JSON Payload/SplitPDF.java index 6232623e..bd50c2d7 100644 --- a/Java/Endpoint Examples/JSON Payload/SplitPDF.java +++ b/Java/Endpoint Examples/JSON Payload/SplitPDF.java @@ -12,7 +12,7 @@ public class SplitPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/Tif.java b/Java/Endpoint Examples/JSON Payload/Tif.java index dd161383..33f8e3db 100644 --- a/Java/Endpoint Examples/JSON Payload/Tif.java +++ b/Java/Endpoint Examples/JSON Payload/Tif.java @@ -12,7 +12,7 @@ public class Tif { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/UnrestrictedPDF.java b/Java/Endpoint Examples/JSON Payload/UnrestrictedPDF.java index 7bbfb8c8..00afa3ca 100644 --- a/Java/Endpoint Examples/JSON Payload/UnrestrictedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/UnrestrictedPDF.java @@ -12,7 +12,7 @@ public class UnrestrictedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/Unzip.java b/Java/Endpoint Examples/JSON Payload/Unzip.java index 1e7e932b..21a7ceec 100644 --- a/Java/Endpoint Examples/JSON Payload/Unzip.java +++ b/Java/Endpoint Examples/JSON Payload/Unzip.java @@ -12,7 +12,7 @@ public class Unzip { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/UpToolkit.java b/Java/Endpoint Examples/JSON Payload/UpToolkit.java index 949c04bf..13b24d29 100644 --- a/Java/Endpoint Examples/JSON Payload/UpToolkit.java +++ b/Java/Endpoint Examples/JSON Payload/UpToolkit.java @@ -11,7 +11,7 @@ public class UpToolkit { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/Upload.java b/Java/Endpoint Examples/JSON Payload/Upload.java index bd93e150..3f807245 100644 --- a/Java/Endpoint Examples/JSON Payload/Upload.java +++ b/Java/Endpoint Examples/JSON Payload/Upload.java @@ -10,7 +10,7 @@ public class Upload { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/WatermarkedPDF.java b/Java/Endpoint Examples/JSON Payload/WatermarkedPDF.java index ddac3c92..7a63633a 100644 --- a/Java/Endpoint Examples/JSON Payload/WatermarkedPDF.java +++ b/Java/Endpoint Examples/JSON Payload/WatermarkedPDF.java @@ -12,7 +12,7 @@ public class WatermarkedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/Word.java b/Java/Endpoint Examples/JSON Payload/Word.java index 1240d2f2..f6544d3d 100644 --- a/Java/Endpoint Examples/JSON Payload/Word.java +++ b/Java/Endpoint Examples/JSON Payload/Word.java @@ -12,7 +12,7 @@ public class Word { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/JSON Payload/Zip.java b/Java/Endpoint Examples/JSON Payload/Zip.java index 7a0ff70d..409eb807 100644 --- a/Java/Endpoint Examples/JSON Payload/Zip.java +++ b/Java/Endpoint Examples/JSON Payload/Zip.java @@ -12,7 +12,7 @@ public class Zip { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/BatchDelete.java b/Java/Endpoint Examples/Multipart Payload/BatchDelete.java index 17d51db8..7dda6568 100644 --- a/Java/Endpoint Examples/Multipart Payload/BatchDelete.java +++ b/Java/Endpoint Examples/Multipart Payload/BatchDelete.java @@ -10,7 +10,7 @@ public class BatchDelete { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/Bmp.java b/Java/Endpoint Examples/Multipart Payload/Bmp.java index a2dc71b4..b30b49fb 100644 --- a/Java/Endpoint Examples/Multipart Payload/Bmp.java +++ b/Java/Endpoint Examples/Multipart Payload/Bmp.java @@ -11,7 +11,7 @@ public class Bmp { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/CompressedPDF.java b/Java/Endpoint Examples/Multipart Payload/CompressedPDF.java index d4e404b3..108a7143 100644 --- a/Java/Endpoint Examples/Multipart Payload/CompressedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/CompressedPDF.java @@ -16,7 +16,7 @@ public class CompressedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/DecryptedPDF.java b/Java/Endpoint Examples/Multipart Payload/DecryptedPDF.java index d3e8400d..2d08b594 100644 --- a/Java/Endpoint Examples/Multipart Payload/DecryptedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/DecryptedPDF.java @@ -11,7 +11,7 @@ public class DecryptedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/DeleteResource.java b/Java/Endpoint Examples/Multipart Payload/DeleteResource.java index 7edc4114..95c5b143 100644 --- a/Java/Endpoint Examples/Multipart Payload/DeleteResource.java +++ b/Java/Endpoint Examples/Multipart Payload/DeleteResource.java @@ -9,7 +9,7 @@ public class DeleteResource { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/EncryptedPDF.java b/Java/Endpoint Examples/Multipart Payload/EncryptedPDF.java index 89456a6f..90caa42b 100644 --- a/Java/Endpoint Examples/Multipart Payload/EncryptedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/EncryptedPDF.java @@ -11,7 +11,7 @@ public class EncryptedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/Excel.java b/Java/Endpoint Examples/Multipart Payload/Excel.java index 7720f42e..182bf6ca 100644 --- a/Java/Endpoint Examples/Multipart Payload/Excel.java +++ b/Java/Endpoint Examples/Multipart Payload/Excel.java @@ -16,7 +16,7 @@ public class Excel { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/ExportedFormData.java b/Java/Endpoint Examples/Multipart Payload/ExportedFormData.java index 7b3a3450..c5df0077 100644 --- a/Java/Endpoint Examples/Multipart Payload/ExportedFormData.java +++ b/Java/Endpoint Examples/Multipart Payload/ExportedFormData.java @@ -11,7 +11,7 @@ public class ExportedFormData { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/ExtractedImages.java b/Java/Endpoint Examples/Multipart Payload/ExtractedImages.java index c2b04102..7d92b163 100644 --- a/Java/Endpoint Examples/Multipart Payload/ExtractedImages.java +++ b/Java/Endpoint Examples/Multipart Payload/ExtractedImages.java @@ -16,7 +16,7 @@ public class ExtractedImages { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/ExtractedText.java b/Java/Endpoint Examples/Multipart Payload/ExtractedText.java index a190fe2f..95a7448f 100644 --- a/Java/Endpoint Examples/Multipart Payload/ExtractedText.java +++ b/Java/Endpoint Examples/Multipart Payload/ExtractedText.java @@ -15,7 +15,7 @@ public class ExtractedText { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/FlattenedAnnotationsPDF.java b/Java/Endpoint Examples/Multipart Payload/FlattenedAnnotationsPDF.java index 275fe822..86875711 100644 --- a/Java/Endpoint Examples/Multipart Payload/FlattenedAnnotationsPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/FlattenedAnnotationsPDF.java @@ -11,7 +11,7 @@ public class FlattenedAnnotationsPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/FlattenedFormsPDF.java b/Java/Endpoint Examples/Multipart Payload/FlattenedFormsPDF.java index 733d2e7a..35c478f9 100644 --- a/Java/Endpoint Examples/Multipart Payload/FlattenedFormsPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/FlattenedFormsPDF.java @@ -11,7 +11,7 @@ public class FlattenedFormsPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/FlattenedLayersPDF.java b/Java/Endpoint Examples/Multipart Payload/FlattenedLayersPDF.java index bd501994..a88bc8b0 100644 --- a/Java/Endpoint Examples/Multipart Payload/FlattenedLayersPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/FlattenedLayersPDF.java @@ -11,7 +11,7 @@ public class FlattenedLayersPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/FlattenedTransparenciesPDF.java b/Java/Endpoint Examples/Multipart Payload/FlattenedTransparenciesPDF.java index ca687562..3c3ff38c 100644 --- a/Java/Endpoint Examples/Multipart Payload/FlattenedTransparenciesPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/FlattenedTransparenciesPDF.java @@ -11,7 +11,7 @@ public class FlattenedTransparenciesPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/GetResource.java b/Java/Endpoint Examples/Multipart Payload/GetResource.java index b538a619..c80b7e89 100644 --- a/Java/Endpoint Examples/Multipart Payload/GetResource.java +++ b/Java/Endpoint Examples/Multipart Payload/GetResource.java @@ -11,7 +11,7 @@ public class GetResource { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/Gif.java b/Java/Endpoint Examples/Multipart Payload/Gif.java index 3c56102a..519a6799 100644 --- a/Java/Endpoint Examples/Multipart Payload/Gif.java +++ b/Java/Endpoint Examples/Multipart Payload/Gif.java @@ -11,7 +11,7 @@ public class Gif { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/Jpg.java b/Java/Endpoint Examples/Multipart Payload/Jpg.java index 6fcc3dff..acc3ed28 100644 --- a/Java/Endpoint Examples/Multipart Payload/Jpg.java +++ b/Java/Endpoint Examples/Multipart Payload/Jpg.java @@ -11,7 +11,7 @@ public class Jpg { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/LinearizedPDF.java b/Java/Endpoint Examples/Multipart Payload/LinearizedPDF.java index 7fdd27bd..ebe13bcc 100644 --- a/Java/Endpoint Examples/Multipart Payload/LinearizedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/LinearizedPDF.java @@ -11,7 +11,7 @@ public class LinearizedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/Markdown.java b/Java/Endpoint Examples/Multipart Payload/Markdown.java index 32b60c5c..3d05757f 100644 --- a/Java/Endpoint Examples/Multipart Payload/Markdown.java +++ b/Java/Endpoint Examples/Multipart Payload/Markdown.java @@ -15,7 +15,7 @@ public class Markdown { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/MergedPDF.java b/Java/Endpoint Examples/Multipart Payload/MergedPDF.java index 022921e1..1dcc62d4 100644 --- a/Java/Endpoint Examples/Multipart Payload/MergedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/MergedPDF.java @@ -15,7 +15,7 @@ public class MergedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDF.java b/Java/Endpoint Examples/Multipart Payload/PDF.java index ef514904..43748443 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDF.java +++ b/Java/Endpoint Examples/Multipart Payload/PDF.java @@ -11,7 +11,7 @@ public class PDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFA.java b/Java/Endpoint Examples/Multipart Payload/PDFA.java index 00534112..ea2d7387 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFA.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFA.java @@ -11,7 +11,7 @@ public class PDFA { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFInfo.java b/Java/Endpoint Examples/Multipart Payload/PDFInfo.java index 69a845eb..5e852b7e 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFInfo.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFInfo.java @@ -11,7 +11,7 @@ public class PDFInfo { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithAcroforms.java b/Java/Endpoint Examples/Multipart Payload/PDFWithAcroforms.java index 669ddc55..90c4cacc 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithAcroforms.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithAcroforms.java @@ -15,7 +15,7 @@ public class PDFWithAcroforms { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedAttachment.java b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedAttachment.java index 0d8ca087..8967b56c 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedAttachment.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedAttachment.java @@ -16,7 +16,7 @@ public class PDFWithAddedAttachment { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedImage.java b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedImage.java index 49c96ea6..3c70911d 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedImage.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedImage.java @@ -11,7 +11,7 @@ public class PDFWithAddedImage { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedText.java b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedText.java index 73dd1d7a..6b97bbf6 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithAddedText.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithAddedText.java @@ -11,7 +11,7 @@ public class PDFWithAddedText { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithConvertedColors.java b/Java/Endpoint Examples/Multipart Payload/PDFWithConvertedColors.java index 0480dc57..478f2e22 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithConvertedColors.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithConvertedColors.java @@ -16,7 +16,7 @@ public class PDFWithConvertedColors { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithImportedFormData.java b/Java/Endpoint Examples/Multipart Payload/PDFWithImportedFormData.java index 1a16b713..60662acc 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithImportedFormData.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithImportedFormData.java @@ -11,7 +11,7 @@ public class PDFWithImportedFormData { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithOCRText.java b/Java/Endpoint Examples/Multipart Payload/PDFWithOCRText.java index 94c80a29..a81d58aa 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithOCRText.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithOCRText.java @@ -16,7 +16,7 @@ public class PDFWithOCRText { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithPageBoxesSet.java b/Java/Endpoint Examples/Multipart Payload/PDFWithPageBoxesSet.java index 8b00fef6..76c9a8e5 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithPageBoxesSet.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithPageBoxesSet.java @@ -12,7 +12,7 @@ public class PDFWithPageBoxesSet { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextApplied.java b/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextApplied.java index 78125f67..697d742d 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextApplied.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextApplied.java @@ -16,7 +16,7 @@ public class PDFWithRedactedTextApplied { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextPreview.java b/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextPreview.java index 03f8aceb..2df375e6 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextPreview.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFWithRedactedTextPreview.java @@ -11,7 +11,7 @@ public class PDFWithRedactedTextPreview { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/PDFX.java b/Java/Endpoint Examples/Multipart Payload/PDFX.java index 21bc74fb..a7886a6e 100644 --- a/Java/Endpoint Examples/Multipart Payload/PDFX.java +++ b/Java/Endpoint Examples/Multipart Payload/PDFX.java @@ -11,7 +11,7 @@ public class PDFX { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/Png.java b/Java/Endpoint Examples/Multipart Payload/Png.java index c992cec5..ef5f1458 100644 --- a/Java/Endpoint Examples/Multipart Payload/Png.java +++ b/Java/Endpoint Examples/Multipart Payload/Png.java @@ -11,7 +11,7 @@ public class Png { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/Powerpoint.java b/Java/Endpoint Examples/Multipart Payload/Powerpoint.java index 78a22cf9..09b4d37e 100644 --- a/Java/Endpoint Examples/Multipart Payload/Powerpoint.java +++ b/Java/Endpoint Examples/Multipart Payload/Powerpoint.java @@ -16,7 +16,7 @@ public class Powerpoint { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/RasterizedPDF.java b/Java/Endpoint Examples/Multipart Payload/RasterizedPDF.java index d38abe2d..55417034 100644 --- a/Java/Endpoint Examples/Multipart Payload/RasterizedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/RasterizedPDF.java @@ -11,7 +11,7 @@ public class RasterizedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/RequestStatus.java b/Java/Endpoint Examples/Multipart Payload/RequestStatus.java index 5ef0870d..d7f581c3 100644 --- a/Java/Endpoint Examples/Multipart Payload/RequestStatus.java +++ b/Java/Endpoint Examples/Multipart Payload/RequestStatus.java @@ -11,7 +11,7 @@ public class RequestStatus { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/RestrictedPDF.java b/Java/Endpoint Examples/Multipart Payload/RestrictedPDF.java index a08217c2..24a0a729 100644 --- a/Java/Endpoint Examples/Multipart Payload/RestrictedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/RestrictedPDF.java @@ -11,7 +11,7 @@ public class RestrictedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/SignedPDF.java b/Java/Endpoint Examples/Multipart Payload/SignedPDF.java index 6b5991f3..a3184f82 100644 --- a/Java/Endpoint Examples/Multipart Payload/SignedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/SignedPDF.java @@ -11,7 +11,7 @@ public class SignedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/SignedPDFNonPFX.java b/Java/Endpoint Examples/Multipart Payload/SignedPDFNonPFX.java index da54ab94..275df616 100644 --- a/Java/Endpoint Examples/Multipart Payload/SignedPDFNonPFX.java +++ b/Java/Endpoint Examples/Multipart Payload/SignedPDFNonPFX.java @@ -11,7 +11,7 @@ public class SignedPDFNonPFX { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/SplitPDF.java b/Java/Endpoint Examples/Multipart Payload/SplitPDF.java index 90ecaec7..d0808f3f 100644 --- a/Java/Endpoint Examples/Multipart Payload/SplitPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/SplitPDF.java @@ -11,7 +11,7 @@ public class SplitPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/Tif.java b/Java/Endpoint Examples/Multipart Payload/Tif.java index 1f346a9c..125b1c16 100644 --- a/Java/Endpoint Examples/Multipart Payload/Tif.java +++ b/Java/Endpoint Examples/Multipart Payload/Tif.java @@ -11,7 +11,7 @@ public class Tif { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/UnrestrictedPDF.java b/Java/Endpoint Examples/Multipart Payload/UnrestrictedPDF.java index 6d96c75b..67f07aa5 100644 --- a/Java/Endpoint Examples/Multipart Payload/UnrestrictedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/UnrestrictedPDF.java @@ -11,7 +11,7 @@ public class UnrestrictedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/Unzip.java b/Java/Endpoint Examples/Multipart Payload/Unzip.java index 6bf58f61..98ca6283 100644 --- a/Java/Endpoint Examples/Multipart Payload/Unzip.java +++ b/Java/Endpoint Examples/Multipart Payload/Unzip.java @@ -11,7 +11,7 @@ public class Unzip { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/UpToolkit.java b/Java/Endpoint Examples/Multipart Payload/UpToolkit.java index 949c04bf..13b24d29 100644 --- a/Java/Endpoint Examples/Multipart Payload/UpToolkit.java +++ b/Java/Endpoint Examples/Multipart Payload/UpToolkit.java @@ -11,7 +11,7 @@ public class UpToolkit { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/Upload.java b/Java/Endpoint Examples/Multipart Payload/Upload.java index e2aa728e..d6e885ee 100644 --- a/Java/Endpoint Examples/Multipart Payload/Upload.java +++ b/Java/Endpoint Examples/Multipart Payload/Upload.java @@ -10,7 +10,7 @@ public class Upload { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/WatermarkedPDF.java b/Java/Endpoint Examples/Multipart Payload/WatermarkedPDF.java index 2b1c5f4f..bb2aa48a 100644 --- a/Java/Endpoint Examples/Multipart Payload/WatermarkedPDF.java +++ b/Java/Endpoint Examples/Multipart Payload/WatermarkedPDF.java @@ -11,7 +11,7 @@ public class WatermarkedPDF { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/Word.java b/Java/Endpoint Examples/Multipart Payload/Word.java index 1316e06e..2533f5f3 100644 --- a/Java/Endpoint Examples/Multipart Payload/Word.java +++ b/Java/Endpoint Examples/Multipart Payload/Word.java @@ -16,7 +16,7 @@ public class Word { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com"; diff --git a/Java/Endpoint Examples/Multipart Payload/Zip.java b/Java/Endpoint Examples/Multipart Payload/Zip.java index b990d71b..2e94ad7d 100644 --- a/Java/Endpoint Examples/Multipart Payload/Zip.java +++ b/Java/Endpoint Examples/Multipart Payload/Zip.java @@ -10,7 +10,7 @@ public class Zip { private static final String API_URL = "https://api.pdfrest.com"; // For GDPR compliance and enhanced performance for European users, you can switch to the EU-based - // service by uncommenting the URL below. + // service by commenting out the URL above and uncommenting the URL below. // For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work // private static final String API_URL = "https://eu-api.pdfrest.com";