diff --git a/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/ByteScoutWebApiExample.NETCore.csproj b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/ByteScoutWebApiExample.NETCore.csproj
new file mode 100644
index 000000000..82e9705c7
--- /dev/null
+++ b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/ByteScoutWebApiExample.NETCore.csproj
@@ -0,0 +1,35 @@
+
+
+
+ Exe
+ netcoreapp2.0
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
\ No newline at end of file
diff --git a/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/ByteScoutWebApiExample.NETCore.sln b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/ByteScoutWebApiExample.NETCore.sln
new file mode 100644
index 000000000..6527b80b4
--- /dev/null
+++ b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/ByteScoutWebApiExample.NETCore.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.32126.317
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ByteScoutWebApiExample.NETCore", "ByteScoutWebApiExample.NETCore.csproj", "{6C67B480-C7E2-4AF7-AE7B-0E12A5799D9C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {6C67B480-C7E2-4AF7-AE7B-0E12A5799D9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6C67B480-C7E2-4AF7-AE7B-0E12A5799D9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6C67B480-C7E2-4AF7-AE7B-0E12A5799D9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6C67B480-C7E2-4AF7-AE7B-0E12A5799D9C}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {FBAE862B-1737-4E3F-96CF-5B8772A7AC09}
+ EndGlobalSection
+EndGlobal
diff --git a/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/ByteScoutWebApiExample.csproj b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/ByteScoutWebApiExample.csproj
new file mode 100644
index 000000000..c5130112c
--- /dev/null
+++ b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/ByteScoutWebApiExample.csproj
@@ -0,0 +1,63 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {1E1C2C34-017E-4605-AE2B-55EA3313BE51}
+ Exe
+ Properties
+ ByteScoutWebApiExample
+ ByteScoutWebApiExample
+ v4.6
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
+
\ No newline at end of file
diff --git a/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/ByteScoutWebApiExample.sln b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/ByteScoutWebApiExample.sln
new file mode 100644
index 000000000..44721634f
--- /dev/null
+++ b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/ByteScoutWebApiExample.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.40629.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ByteScoutWebApiExample", "ByteScoutWebApiExample.csproj", "{1E1C2C34-017E-4605-AE2B-55EA3313BE51}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {1E1C2C34-017E-4605-AE2B-55EA3313BE51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1E1C2C34-017E-4605-AE2B-55EA3313BE51}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1E1C2C34-017E-4605-AE2B-55EA3313BE51}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1E1C2C34-017E-4605-AE2B-55EA3313BE51}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/Program.cs b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/Program.cs
new file mode 100644
index 000000000..9ebada1bb
--- /dev/null
+++ b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/Program.cs
@@ -0,0 +1,233 @@
+//*******************************************************************************************//
+// //
+// Download Free Evaluation Version From: https://bytescout.com/download/web-installer //
+// //
+// Also available as Web API! Get Your Free API Key: https://app.pdf.co/signup //
+// //
+// Copyright © 2017-2020 ByteScout, Inc. All rights reserved. //
+// https://www.bytescout.com //
+// https://pdf.co //
+// //
+//*******************************************************************************************//
+
+
+using System;
+using System.IO;
+using System.Net;
+using Newtonsoft.Json.Linq;
+using System.Threading;
+using System.Collections.Generic;
+using Newtonsoft.Json;
+
+// Cloud API asynchronous "Delete Text from PDF" job example.
+
+namespace ByteScoutWebApiExample
+{
+ class Program
+ {
+ // The authentication key (API Key).
+ // Get your own by registering at https://app.pdf.co
+ const String API_KEY = "YOUR_PDFco_API_KEY_HERE";
+
+ // Source PDF file
+ const string SourceFile = @".\sample.pdf";
+
+ // PDF document password. Leave empty for unprotected documents.
+ const string Password = "";
+
+ // Regex Enabled Search
+ const bool RegexEnabled = true;
+
+ // Destination PDF file name
+ const string DestinationFile = @".\result.pdf";
+
+
+ static void Main(string[] args)
+ {
+ // Upload file to the cloud
+ string uploadedFileUrl = UploadFile(SourceFile);
+
+ if (string.IsNullOrEmpty(uploadedFileUrl))
+ {
+ Console.WriteLine("File upload error.");
+ return;
+ }
+
+ // Regular Expression for Credit Card
+ string regex_creditCard = @"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{4}";
+
+ // Regular expression CVV number
+ string regex_cvv = @"\b[0-9]{3}\b";
+
+ // Regular expression mm/year
+ string regex_month_year = @"[0-9]{2}(\/|-)[0-9]{4}";
+
+ // Create standard .NET web client instance
+ WebClient webClient = new WebClient();
+
+ // Set API Key
+ webClient.Headers.Add("x-api-key", API_KEY);
+
+ // Prepare requests params as JSON
+ // See documentation: https://apidocs.pdf.co/#pdf-search-and-delete-text-from-pdf
+ Dictionary parameters = new Dictionary();
+ parameters.Add("name", Path.GetFileName(DestinationFile));
+ parameters.Add("password", Password);
+ parameters.Add("url", uploadedFileUrl);
+ parameters.Add("searchStrings", new string[] { regex_creditCard, regex_cvv, regex_month_year });
+ parameters.Add("regex", RegexEnabled);
+
+ // Important: Specify Blackout Color
+ parameters.Add("profiles", @"{'UsePatch': true, 'PatchColor': '#000000'}");
+
+ parameters.Add("async", true); // ! Making Async request
+
+ // Convert dictionary of params to JSON
+ string jsonPayload = JsonConvert.SerializeObject(parameters);
+
+ // URL of `Delete Text from PDF` API call
+ string url = "https://api.pdf.co/v1/pdf/edit/delete-text";
+
+ try
+ {
+ // Execute POST request with JSON payload
+ string response = webClient.UploadString(url, jsonPayload);
+
+ // Parse JSON response
+ JObject json = JObject.Parse(response);
+
+ if (json["error"].ToObject() == false)
+ {
+ // Asynchronous job ID
+ string jobId = json["jobId"].ToString();
+ // URL of generated PDF file that will available after the job completion
+ string resultFileUrl = json["url"].ToString();
+
+ // Check the job status in a loop.
+ // If you don't want to pause the main thread you can rework the code
+ // to use a separate thread for the status checking and completion.
+ do
+ {
+ string status = CheckJobStatus(jobId); // Possible statuses: "working", "failed", "aborted", "success".
+
+ // Display timestamp and status (for demo purposes)
+ Console.WriteLine(DateTime.Now.ToLongTimeString() + ": " + status);
+
+ if (status == "success")
+ {
+ // Download PDF file
+ webClient.DownloadFile(resultFileUrl, DestinationFile);
+
+ Console.WriteLine("Generated PDF file saved as \"{0}\" file.", DestinationFile);
+ break;
+ }
+ else if (status == "working")
+ {
+ // Pause for a few seconds
+ Thread.Sleep(3000);
+ }
+ else
+ {
+ Console.WriteLine(status);
+ break;
+ }
+ }
+ while (true);
+ }
+ else
+ {
+ Console.WriteLine(json["message"].ToString());
+ }
+ }
+ catch (WebException e)
+ {
+ Console.WriteLine(e.ToString());
+ }
+
+ webClient.Dispose();
+
+
+ Console.WriteLine();
+ Console.WriteLine("Press any key...");
+ Console.ReadKey();
+ }
+
+ ///
+ /// Uploads file to the cloud and return URL of uploaded file to use in further API calls.
+ ///
+ /// Source file name (path).
+ /// URL of uploaded file
+ static string UploadFile(string file)
+ {
+ // Create standard .NET web client instance
+ WebClient webClient = new WebClient();
+
+ // Set API Key
+ webClient.Headers.Add("x-api-key", API_KEY);
+
+ try
+ {
+ // 1. RETRIEVE THE PRESIGNED URL TO UPLOAD THE FILE.
+ // * If you already have a direct file URL, skip to the step 3.
+
+ // Prepare URL for `Get Presigned URL` API call
+ string query = Uri.EscapeUriString(string.Format(
+ "https://api.pdf.co/v1/file/upload/get-presigned-url?contenttype=application/octet-stream&name={0}",
+ Path.GetFileName(file)));
+
+ // Execute request
+ string response = webClient.DownloadString(query);
+
+ // Parse JSON response
+ JObject json = JObject.Parse(response);
+
+ if (json["error"].ToObject() == false)
+ {
+ // Get URL to use for the file upload
+ string uploadUrl = json["presignedUrl"].ToString();
+ // Get URL of uploaded file to use with later API calls
+ string uploadedFileUrl = json["url"].ToString();
+
+ // 2. UPLOAD THE FILE TO CLOUD.
+
+ webClient.Headers.Add("content-type", "application/octet-stream");
+ webClient.UploadFile(uploadUrl, "PUT", file); // You can use UploadData() instead if your file is in byte[] or Stream
+
+ return uploadedFileUrl;
+ }
+ else
+ {
+ // Display service reported error
+ Console.WriteLine(json["message"].ToString());
+ }
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e);
+ throw;
+ }
+ finally
+ {
+ webClient.Dispose();
+ }
+
+ return null;
+ }
+
+ static string CheckJobStatus(string jobId)
+ {
+ using (WebClient webClient = new WebClient())
+ {
+ // Set API Key
+ webClient.Headers.Add("x-api-key", API_KEY);
+
+ string url = "https://api.pdf.co/v1/job/check?jobid=" + jobId;
+
+ string response = webClient.DownloadString(url);
+ JObject json = JObject.Parse(response);
+
+ return Convert.ToString(json["status"]);
+ }
+ }
+ }
+}
diff --git a/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/Properties/AssemblyInfo.cs b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..9986fbb0e
--- /dev/null
+++ b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/Properties/AssemblyInfo.cs
@@ -0,0 +1,49 @@
+//*******************************************************************************************//
+// //
+// Download Free Evaluation Version From: https://bytescout.com/download/web-installer //
+// //
+// Also available as Web API! Get Your Free API Key: https://app.pdf.co/signup //
+// //
+// Copyright © 2017-2020 ByteScout, Inc. All rights reserved. //
+// https://www.bytescout.com //
+// https://pdf.co //
+// //
+//*******************************************************************************************//
+
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ByteScoutWebApiExample")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ByteScoutWebApiExample")]
+[assembly: AssemblyCopyright("Copyright © 2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("872b5135-146b-4782-894d-7b6c3162308a")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/packages.config b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/packages.config
new file mode 100644
index 000000000..03c709252
--- /dev/null
+++ b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/sample.pdf b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/sample.pdf
new file mode 100644
index 000000000..cadd1770e
Binary files /dev/null and b/Delete Text From PDF/C#/Remove And Blackout Credit Card Data From PDF/sample.pdf differ
diff --git a/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/ByteScoutWebApiExample.NETCore.csproj b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/ByteScoutWebApiExample.NETCore.csproj
new file mode 100644
index 000000000..82e9705c7
--- /dev/null
+++ b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/ByteScoutWebApiExample.NETCore.csproj
@@ -0,0 +1,35 @@
+
+
+
+ Exe
+ netcoreapp2.0
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
\ No newline at end of file
diff --git a/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/ByteScoutWebApiExample.NETCore.sln b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/ByteScoutWebApiExample.NETCore.sln
new file mode 100644
index 000000000..6527b80b4
--- /dev/null
+++ b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/ByteScoutWebApiExample.NETCore.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.32126.317
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ByteScoutWebApiExample.NETCore", "ByteScoutWebApiExample.NETCore.csproj", "{6C67B480-C7E2-4AF7-AE7B-0E12A5799D9C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {6C67B480-C7E2-4AF7-AE7B-0E12A5799D9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6C67B480-C7E2-4AF7-AE7B-0E12A5799D9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6C67B480-C7E2-4AF7-AE7B-0E12A5799D9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6C67B480-C7E2-4AF7-AE7B-0E12A5799D9C}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {FBAE862B-1737-4E3F-96CF-5B8772A7AC09}
+ EndGlobalSection
+EndGlobal
diff --git a/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/ByteScoutWebApiExample.csproj b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/ByteScoutWebApiExample.csproj
new file mode 100644
index 000000000..c5130112c
--- /dev/null
+++ b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/ByteScoutWebApiExample.csproj
@@ -0,0 +1,63 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {1E1C2C34-017E-4605-AE2B-55EA3313BE51}
+ Exe
+ Properties
+ ByteScoutWebApiExample
+ ByteScoutWebApiExample
+ v4.6
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
+
\ No newline at end of file
diff --git a/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/ByteScoutWebApiExample.sln b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/ByteScoutWebApiExample.sln
new file mode 100644
index 000000000..44721634f
--- /dev/null
+++ b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/ByteScoutWebApiExample.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.40629.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ByteScoutWebApiExample", "ByteScoutWebApiExample.csproj", "{1E1C2C34-017E-4605-AE2B-55EA3313BE51}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {1E1C2C34-017E-4605-AE2B-55EA3313BE51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1E1C2C34-017E-4605-AE2B-55EA3313BE51}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1E1C2C34-017E-4605-AE2B-55EA3313BE51}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1E1C2C34-017E-4605-AE2B-55EA3313BE51}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/Program.cs b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/Program.cs
new file mode 100644
index 000000000..e1ab02fad
--- /dev/null
+++ b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/Program.cs
@@ -0,0 +1,231 @@
+//*******************************************************************************************//
+// //
+// Download Free Evaluation Version From: https://bytescout.com/download/web-installer //
+// //
+// Also available as Web API! Get Your Free API Key: https://app.pdf.co/signup //
+// //
+// Copyright © 2017-2020 ByteScout, Inc. All rights reserved. //
+// https://www.bytescout.com //
+// https://pdf.co //
+// //
+//*******************************************************************************************//
+
+
+using System;
+using System.IO;
+using System.Net;
+using Newtonsoft.Json.Linq;
+using System.Threading;
+using System.Collections.Generic;
+using Newtonsoft.Json;
+
+// Cloud API asynchronous "Delete Text from PDF" job example.
+
+namespace ByteScoutWebApiExample
+{
+ class Program
+ {
+ // The authentication key (API Key).
+ // Get your own by registering at https://app.pdf.co
+ const String API_KEY = "YOUR_PDFco_API_KEY_HERE";
+
+ // Source PDF file
+ const string SourceFile = @".\sample.pdf";
+
+ // PDF document password. Leave empty for unprotected documents.
+ const string Password = "";
+
+ // Regex Enabled Search
+ const bool RegexEnabled = true;
+
+ // Destination PDF file name
+ const string DestinationFile = @".\result.pdf";
+
+
+ static void Main(string[] args)
+ {
+ // Upload file to the cloud
+ string uploadedFileUrl = UploadFile(SourceFile);
+
+ if (string.IsNullOrEmpty(uploadedFileUrl))
+ {
+ Console.WriteLine("File upload error.");
+ return;
+ }
+
+ // Regular Expression to Search for SSN
+ string regex_ssn = @"[0-9]{3}-[0-9]{2}-[0-9]{4}";
+
+ // Regular Expression to Search Email Address
+ string regex_email = @"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}";
+
+
+ // Create standard .NET web client instance
+ WebClient webClient = new WebClient();
+
+ // Set API Key
+ webClient.Headers.Add("x-api-key", API_KEY);
+
+ // Prepare requests params as JSON
+ // See documentation: https://apidocs.pdf.co/#pdf-search-and-delete-text-from-pdf
+ Dictionary parameters = new Dictionary();
+ parameters.Add("name", Path.GetFileName(DestinationFile));
+ parameters.Add("password", Password);
+ parameters.Add("url", uploadedFileUrl);
+ parameters.Add("searchStrings", new string[] { regex_ssn, regex_email });
+ parameters.Add("regex", RegexEnabled);
+
+ // Important: Specify Blackout Color
+ parameters.Add("profiles", @"{'UsePatch': true, 'PatchColor': '#000000'}");
+
+ parameters.Add("async", true); // ! Making Async request
+
+ // Convert dictionary of params to JSON
+ string jsonPayload = JsonConvert.SerializeObject(parameters);
+
+ // URL of `Delete Text from PDF` API call
+ string url = "https://api.pdf.co/v1/pdf/edit/delete-text";
+
+ try
+ {
+ // Execute POST request with JSON payload
+ string response = webClient.UploadString(url, jsonPayload);
+
+ // Parse JSON response
+ JObject json = JObject.Parse(response);
+
+ if (json["error"].ToObject() == false)
+ {
+ // Asynchronous job ID
+ string jobId = json["jobId"].ToString();
+ // URL of generated PDF file that will available after the job completion
+ string resultFileUrl = json["url"].ToString();
+
+ // Check the job status in a loop.
+ // If you don't want to pause the main thread you can rework the code
+ // to use a separate thread for the status checking and completion.
+ do
+ {
+ string status = CheckJobStatus(jobId); // Possible statuses: "working", "failed", "aborted", "success".
+
+ // Display timestamp and status (for demo purposes)
+ Console.WriteLine(DateTime.Now.ToLongTimeString() + ": " + status);
+
+ if (status == "success")
+ {
+ // Download PDF file
+ webClient.DownloadFile(resultFileUrl, DestinationFile);
+
+ Console.WriteLine("Generated PDF file saved as \"{0}\" file.", DestinationFile);
+ break;
+ }
+ else if (status == "working")
+ {
+ // Pause for a few seconds
+ Thread.Sleep(3000);
+ }
+ else
+ {
+ Console.WriteLine(status);
+ break;
+ }
+ }
+ while (true);
+ }
+ else
+ {
+ Console.WriteLine(json["message"].ToString());
+ }
+ }
+ catch (WebException e)
+ {
+ Console.WriteLine(e.ToString());
+ }
+
+ webClient.Dispose();
+
+
+ Console.WriteLine();
+ Console.WriteLine("Press any key...");
+ Console.ReadKey();
+ }
+
+ ///
+ /// Uploads file to the cloud and return URL of uploaded file to use in further API calls.
+ ///
+ /// Source file name (path).
+ /// URL of uploaded file
+ static string UploadFile(string file)
+ {
+ // Create standard .NET web client instance
+ WebClient webClient = new WebClient();
+
+ // Set API Key
+ webClient.Headers.Add("x-api-key", API_KEY);
+
+ try
+ {
+ // 1. RETRIEVE THE PRESIGNED URL TO UPLOAD THE FILE.
+ // * If you already have a direct file URL, skip to the step 3.
+
+ // Prepare URL for `Get Presigned URL` API call
+ string query = Uri.EscapeUriString(string.Format(
+ "https://api.pdf.co/v1/file/upload/get-presigned-url?contenttype=application/octet-stream&name={0}",
+ Path.GetFileName(file)));
+
+ // Execute request
+ string response = webClient.DownloadString(query);
+
+ // Parse JSON response
+ JObject json = JObject.Parse(response);
+
+ if (json["error"].ToObject() == false)
+ {
+ // Get URL to use for the file upload
+ string uploadUrl = json["presignedUrl"].ToString();
+ // Get URL of uploaded file to use with later API calls
+ string uploadedFileUrl = json["url"].ToString();
+
+ // 2. UPLOAD THE FILE TO CLOUD.
+
+ webClient.Headers.Add("content-type", "application/octet-stream");
+ webClient.UploadFile(uploadUrl, "PUT", file); // You can use UploadData() instead if your file is in byte[] or Stream
+
+ return uploadedFileUrl;
+ }
+ else
+ {
+ // Display service reported error
+ Console.WriteLine(json["message"].ToString());
+ }
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e);
+ throw;
+ }
+ finally
+ {
+ webClient.Dispose();
+ }
+
+ return null;
+ }
+
+ static string CheckJobStatus(string jobId)
+ {
+ using (WebClient webClient = new WebClient())
+ {
+ // Set API Key
+ webClient.Headers.Add("x-api-key", API_KEY);
+
+ string url = "https://api.pdf.co/v1/job/check?jobid=" + jobId;
+
+ string response = webClient.DownloadString(url);
+ JObject json = JObject.Parse(response);
+
+ return Convert.ToString(json["status"]);
+ }
+ }
+ }
+}
diff --git a/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/Properties/AssemblyInfo.cs b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..9986fbb0e
--- /dev/null
+++ b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/Properties/AssemblyInfo.cs
@@ -0,0 +1,49 @@
+//*******************************************************************************************//
+// //
+// Download Free Evaluation Version From: https://bytescout.com/download/web-installer //
+// //
+// Also available as Web API! Get Your Free API Key: https://app.pdf.co/signup //
+// //
+// Copyright © 2017-2020 ByteScout, Inc. All rights reserved. //
+// https://www.bytescout.com //
+// https://pdf.co //
+// //
+//*******************************************************************************************//
+
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ByteScoutWebApiExample")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ByteScoutWebApiExample")]
+[assembly: AssemblyCopyright("Copyright © 2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("872b5135-146b-4782-894d-7b6c3162308a")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/packages.config b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/packages.config
new file mode 100644
index 000000000..03c709252
--- /dev/null
+++ b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/sample.pdf b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/sample.pdf
new file mode 100644
index 000000000..f859f2e8e
Binary files /dev/null and b/Delete Text From PDF/C#/Remove And Blackout Email and SSN Data From PDF/sample.pdf differ
diff --git a/Index.txt b/Index.txt
index 4aac50f52..a5d7d611a 100644
--- a/Index.txt
+++ b/Index.txt
@@ -244,6 +244,8 @@
\Delete Text From PDF\C#\Delete PDF Text From Uploaded File
\Delete Text From PDF\C#\Delete PDF Text From URL
\Delete Text From PDF\C#\Delete PDF Text From URL Asynchronously
+\Delete Text From PDF\C#\Remove And Blackout Credit Card Data From PDF
+\Delete Text From PDF\C#\Remove And Blackout Email and SSN Data From PDF
\Delete Text From PDF\C#\Remove Credit Card Data From PDF
\Delete Text From PDF\C#\Remove Email and SSN Data From PDF
\Delete Text From PDF\cURL\Delete Multiple Replacement
@@ -1185,6 +1187,7 @@
\PDF Splitting API\PHP
\PDF Splitting API\PowerShell
\PDF Splitting API\Python
+\PDF Splitting API\Salesforce
\PDF Splitting API\VB.NET
\PDF Splitting API\AWS Lambda\Split PDF By Barcode From URL (Node.js)
\PDF Splitting API\AWS Lambda\Split PDF By Text From URL (Node.js)
@@ -1243,6 +1246,9 @@
\PDF Splitting API\Python\Split PDF By Text From Uploaded File Asynchronously
\PDF Splitting API\Python\Split PDF From Uploaded File
\PDF Splitting API\Python\Split PDF From Uploaded File Asynchronously
+\PDF Splitting API\Salesforce\Split PDF By Barcode
+\PDF Splitting API\Salesforce\Split PDF By Page Number
+\PDF Splitting API\Salesforce\Split PDF By Text Search
\PDF Splitting API\VB.NET\Async file upload and async Split PDF
\PDF Splitting API\VB.NET\Async file upload and async Split PDF By Barcode
\PDF Splitting API\VB.NET\Async file upload and async Split PDF By Text
diff --git a/PDF Splitting API/Salesforce/Split PDF By Barcode/SplitPDFByBarcode.cls b/PDF Splitting API/Salesforce/Split PDF By Barcode/SplitPDFByBarcode.cls
new file mode 100644
index 000000000..beb519262
--- /dev/null
+++ b/PDF Splitting API/Salesforce/Split PDF By Barcode/SplitPDFByBarcode.cls
@@ -0,0 +1,85 @@
+public class SplitPDFByBarcode {
+
+ String API_KEY = '****************';
+ string DestinationFile = 'SplitPDFByBarcode_Result';
+ string endPointUrl = 'https://api.pdf.co/v1/pdf/split2';
+
+ public void splitPdfByBarcode()
+ {
+ List toBeInserted = new List();
+ try
+ {
+ String jsonBody = '{ "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-split/split_by_barcode.pdf", "searchString": "[[barcode:qrcode,datamatrix /bytescout\\.com/]]", "excludeKeyPages": true, "regexSearch": false, "caseSensitive": false, "inline": true, "name": "output-split-by-barcode", "async": false }';
+ Http http = new Http();
+ HttpRequest request = new HttpRequest();
+ request.setHeader('x-api-key', API_KEY);
+ request.setEndpoint(endPointUrl);
+ request.setHeader('Content-Type', 'application/json');
+ request.setMethod('POST');
+ request.setBody(jsonBody);
+ HttpResponse response = http.send(request);
+ Map json = (Map)JSON.deserializeUntyped(response.getBody());
+ if(response.getStatusCode() == 200)
+ {
+ if ((Boolean)json.get('error') == false)
+ {
+ System.debug('response.getBody() :: '+response.getBody());
+ List