Skip to content

Commit f804976

Browse files
Merge pull request #114 from datalogics-tsmith/eu-comment_updated
PDFCLOUD-5191 Add EU comment
2 parents 91b5347 + 60474f0 commit f804976

553 files changed

Lines changed: 5503 additions & 1298 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Java/Complex Flow Examples/DecryptAddReencrypt.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616

1717
public class DecryptAddReencrypt {
1818

19+
// By default, we use the US-based API service. This is the primary endpoint for global use.
20+
private static final String API_URL = "https://api.pdfrest.com";
21+
22+
// For GDPR compliance and enhanced performance for European users, you can switch to the EU-based
23+
// service by commenting out the URL above and uncommenting the URL below.
24+
// For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work
25+
// private static final String API_URL = "https://eu-api.pdfrest.com";
26+
1927
// Specify the path to your PDF file here, or as the first argument when running the program.
2028
private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf";
2129

@@ -51,7 +59,7 @@ public static void main(String[] args) {
5159
Request decryptRequest =
5260
new Request.Builder()
5361
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
54-
.url("https://api.pdfrest.com/decrypted-pdf")
62+
.url(API_URL + "/decrypted-pdf")
5563
.post(decryptRequestBody)
5664
.build();
5765
try {
@@ -87,7 +95,7 @@ public static void main(String[] args) {
8795
Request addImageRequest =
8896
new Request.Builder()
8997
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
90-
.url("https://api.pdfrest.com/pdf-with-added-image")
98+
.url(API_URL + "/pdf-with-added-image")
9199
.post(addImageRequestBody)
92100
.build();
93101
try {
@@ -119,7 +127,7 @@ public static void main(String[] args) {
119127
Request encryptRequest =
120128
new Request.Builder()
121129
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
122-
.url("https://api.pdfrest.com/encrypted-pdf")
130+
.url(API_URL + "/encrypted-pdf")
123131
.post(encryptRequestBody)
124132
.build();
125133
try {

Java/Complex Flow Examples/MergeDifferentFileTypes.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@
1919

2020
public class MergeDifferentFileTypes {
2121

22+
// By default, we use the US-based API service. This is the primary endpoint for global use.
23+
private static final String API_URL = "https://api.pdfrest.com";
24+
25+
// For GDPR compliance and enhanced performance for European users, you can switch to the EU-based
26+
// service by commenting out the URL above and uncommenting the URL below.
27+
// For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work
28+
// private static final String API_URL = "https://eu-api.pdfrest.com";
29+
2230
// Specify the path to your first file here, or as the first argument when running the program.
2331
private static final String DEFAULT_FIRST_FILE_PATH = "/path/to/file.png";
2432

@@ -53,7 +61,7 @@ public static void main(String[] args) {
5361
Request firstFileRequest =
5462
new Request.Builder()
5563
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
56-
.url("https://api.pdfrest.com/pdf")
64+
.url(API_URL + "/pdf")
5765
.post(firstFileRequestBody)
5866
.build();
5967
try {
@@ -85,7 +93,7 @@ public static void main(String[] args) {
8593
Request secondFileRequest =
8694
new Request.Builder()
8795
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
88-
.url("https://api.pdfrest.com/pdf")
96+
.url(API_URL + "/pdf")
8997
.post(secondFileRequestBody)
9098
.build();
9199
try {
@@ -121,7 +129,7 @@ public static void main(String[] args) {
121129
Request mergeRequest =
122130
new Request.Builder()
123131
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
124-
.url("https://api.pdfrest.com/merged-pdf")
132+
.url(API_URL + "/merged-pdf")
125133
.post(mergeRequestBody)
126134
.build();
127135
try {

Java/Complex Flow Examples/OcrWithExtractText.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616

1717
public class OcrWithExtractText {
1818

19+
// By default, we use the US-based API service. This is the primary endpoint for global use.
20+
private static final String API_URL = "https://api.pdfrest.com";
21+
22+
// For GDPR compliance and enhanced performance for European users, you can switch to the EU-based
23+
// service by commenting out the URL above and uncommenting the URL below.
24+
// For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work
25+
// private static final String API_URL = "https://eu-api.pdfrest.com";
26+
1927
// Specify the path to your PDF file here, or as the first argument when running the program.
2028
private static final String DEFAULT_PDF_FILE_PATH = "/path/to/file.pdf";
2129

@@ -44,7 +52,7 @@ public static void main(String[] args) {
4452
Request ocrRequest =
4553
new Request.Builder()
4654
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
47-
.url("https://api.pdfrest.com/pdf-with-ocr-text")
55+
.url(API_URL + "/pdf-with-ocr-text")
4856
.post(ocrRequestBody)
4957
.build();
5058
try {
@@ -74,7 +82,7 @@ public static void main(String[] args) {
7482
Request extractRequest =
7583
new Request.Builder()
7684
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
77-
.url("https://api.pdfrest.com/extracted-text")
85+
.url(API_URL + "/extracted-text")
7886
.post(extractRequestBody)
7987
.build();
8088
try {

Java/Complex Flow Examples/PDFA3bWithAttachment.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@
1717

1818
public class PDFA3bWithAttachment {
1919

20+
// By default, we use the US-based API service. This is the primary endpoint for global use.
21+
private static final String API_URL = "https://api.pdfrest.com";
22+
23+
// For GDPR compliance and enhanced performance for European users, you can switch to the EU-based
24+
// service by commenting out the URL above and uncommenting the URL below.
25+
// For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work
26+
// private static final String API_URL = "https://eu-api.pdfrest.com";
27+
2028
// Specify the path to your file here, or as the first argument when running the program.
2129
private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf";
2230

@@ -54,7 +62,7 @@ public static void main(String[] args) {
5462
Request attachmentRequest =
5563
new Request.Builder()
5664
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
57-
.url("https://api.pdfrest.com/pdf-with-added-attachment")
65+
.url(API_URL + "/pdf-with-added-attachment")
5866
.post(attachmentRequestBody)
5967
.build();
6068
try {
@@ -85,7 +93,7 @@ public static void main(String[] args) {
8593
Request pdfaRequest =
8694
new Request.Builder()
8795
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
88-
.url("https://api.pdfrest.com/pdfa")
96+
.url(API_URL + "/pdfa")
8997
.post(pdfaRequestBody)
9098
.build();
9199
try {

Java/Complex Flow Examples/PreserveWordDocument.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414

1515
public class PreserveWordDocument {
1616

17+
// By default, we use the US-based API service. This is the primary endpoint for global use.
18+
private static final String API_URL = "https://api.pdfrest.com";
19+
20+
// For GDPR compliance and enhanced performance for European users, you can switch to the EU-based
21+
// service by commenting out the URL above and uncommenting the URL below.
22+
// For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work
23+
// private static final String API_URL = "https://eu-api.pdfrest.com";
24+
1725
// Specify the path to your file here, or as the first argument when running the program.
1826
private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf";
1927

@@ -42,7 +50,7 @@ public static void main(String[] args) {
4250
Request pdfRequest =
4351
new Request.Builder()
4452
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
45-
.url("https://api.pdfrest.com/pdf")
53+
.url(API_URL + "/pdf")
4654
.post(pdfRequestBody)
4755
.build();
4856
try {
@@ -73,7 +81,7 @@ public static void main(String[] args) {
7381
Request pdfaRequest =
7482
new Request.Builder()
7583
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
76-
.url("https://api.pdfrest.com/pdfa")
84+
.url(API_URL + "/pdfa")
7785
.post(pdfaRequestBody)
7886
.build();
7987
try {

Java/Complex Flow Examples/ProtectedWatermark.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414

1515
public class ProtectedWatermark {
1616

17+
// By default, we use the US-based API service. This is the primary endpoint for global use.
18+
private static final String API_URL = "https://api.pdfrest.com";
19+
20+
// For GDPR compliance and enhanced performance for European users, you can switch to the EU-based
21+
// service by commenting out the URL above and uncommenting the URL below.
22+
// For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work
23+
// private static final String API_URL = "https://eu-api.pdfrest.com";
24+
1725
// Specify the path to your file here, or as the first argument when running the program.
1826
private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf";
1927

@@ -43,7 +51,7 @@ public static void main(String[] args) {
4351
Request watermarkRequest =
4452
new Request.Builder()
4553
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
46-
.url("https://api.pdfrest.com/watermarked-pdf")
54+
.url(API_URL + "/watermarked-pdf")
4755
.post(watermarkRequestBody)
4856
.build();
4957
try {
@@ -77,7 +85,7 @@ public static void main(String[] args) {
7785
Request restrictRequest =
7886
new Request.Builder()
7987
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
80-
.url("https://api.pdfrest.com/restricted-pdf")
88+
.url(API_URL + "/restricted-pdf")
8189
.post(restrictRequestBody)
8290
.build();
8391
try {

Java/Complex Flow Examples/RedactPreviewAndFinalize.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515

1616
public class RedactPreviewAndFinalize {
1717

18+
// By default, we use the US-based API service. This is the primary endpoint for global use.
19+
private static final String API_URL = "https://api.pdfrest.com";
20+
21+
// For GDPR compliance and enhanced performance for European users, you can switch to the EU-based
22+
// service by commenting out the URL above and uncommenting the URL below.
23+
// For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work
24+
// private static final String API_URL = "https://eu-api.pdfrest.com";
25+
1826
// Specify the path to your file here, or as the first argument when running the program.
1927
private static final String DEFAULT_FILE_PATH = "/path/to/file";
2028

@@ -47,7 +55,7 @@ public static void main(String[] args) {
4755
Request previewRequest =
4856
new Request.Builder()
4957
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
50-
.url("https://api.pdfrest.com/pdf-with-redacted-text-preview")
58+
.url(API_URL + "/pdf-with-redacted-text-preview")
5159
.post(previewRequestBody)
5260
.build();
5361
try {
@@ -77,7 +85,7 @@ public static void main(String[] args) {
7785
Request appliedRequest =
7886
new Request.Builder()
7987
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
80-
.url("https://api.pdfrest.com/pdf-with-redacted-text-applied")
88+
.url(API_URL + "/pdf-with-redacted-text-applied")
8189
.post(appliedRequestBody)
8290
.build();
8391
try {

Java/Endpoint Examples/JSON Payload/BatchDelete.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66

77
public class BatchDelete {
88

9+
// By default, we use the US-based API service. This is the primary endpoint for global use.
10+
private static final String API_URL = "https://api.pdfrest.com";
11+
12+
// For GDPR compliance and enhanced performance for European users, you can switch to the EU-based
13+
// service by commenting out the URL above and uncommenting the URL below.
14+
// For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work
15+
// private static String API_URL = "https://eu-api.pdfrest.com"
16+
917
// Specify your API key here, or in the environment variable PDFREST_API_KEY.
1018
// You can also put the environment variable in a .env file.
1119
private static final String DEFAULT_API_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
@@ -23,7 +31,7 @@ public static void main(String[] args) {
2331
Request request =
2432
new Request.Builder()
2533
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
26-
.url("https://api.pdfrest.com/delete")
34+
.url(API_URL + "/delete")
2735
.post(requestBody)
2836
.build();
2937
try {

Java/Endpoint Examples/JSON Payload/Bmp.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88

99
public class Bmp {
1010

11+
// By default, we use the US-based API service. This is the primary endpoint for global use.
12+
private static final String API_URL = "https://api.pdfrest.com";
13+
14+
// For GDPR compliance and enhanced performance for European users, you can switch to the EU-based
15+
// service by commenting out the URL above and uncommenting the URL below.
16+
// For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work
17+
// private static final String API_URL = "https://eu-api.pdfrest.com";
18+
1119
// Specify the path to your file here, or as the first argument when running the program.
1220
private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf";
1321

@@ -44,7 +52,7 @@ public static void main(String[] args) {
4452
Request request =
4553
new Request.Builder()
4654
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
47-
.url("https://api.pdfrest.com/bmp")
55+
.url(API_URL + "/bmp")
4856
.post(requestBody)
4957
.build();
5058
try {
@@ -78,7 +86,7 @@ private static String uploadFile(File inputFile) {
7886
new Request.Builder()
7987
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
8088
.header("Content-Filename", "File.pdf")
81-
.url("https://api.pdfrest.com/upload")
89+
.url(API_URL + "/upload")
8290
.post(requestBody)
8391
.build();
8492
try {

Java/Endpoint Examples/JSON Payload/CompressedPDF.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88

99
public class CompressedPDF {
1010

11+
// By default, we use the US-based API service. This is the primary endpoint for global use.
12+
private static final String API_URL = "https://api.pdfrest.com";
13+
14+
// For GDPR compliance and enhanced performance for European users, you can switch to the EU-based
15+
// service by commenting out the URL above and uncommenting the URL below.
16+
// For more information visit https://pdfrest.com/pricing#how-do-eu-gdpr-api-calls-work
17+
// private static final String API_URL = "https://eu-api.pdfrest.com";
18+
1119
// Specify the path to your file here, or as the first argument when running the program.
1220
private static final String DEFAULT_FILE_PATH = "/path/to/file.pdf";
1321

@@ -45,7 +53,7 @@ public static void main(String[] args) {
4553
Request request =
4654
new Request.Builder()
4755
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
48-
.url("https://api.pdfrest.com/compressed-pdf")
56+
.url(API_URL + "/compressed-pdf")
4957
.post(requestBody)
5058
.build();
5159
try {
@@ -79,7 +87,7 @@ private static String uploadFile(File inputFile) {
7987
new Request.Builder()
8088
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
8189
.header("Content-Filename", "File.pdf")
82-
.url("https://api.pdfrest.com/upload")
90+
.url(API_URL + "/upload")
8391
.post(requestBody)
8492
.build();
8593
try {

0 commit comments

Comments
 (0)