selectpdf 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1b01d19459d947fb94bf4f77dc1aafbba803a743048833cdc09e4afe28fd503
4
- data.tar.gz: '076768d12da86311acb539d4db80e13386dc5f787ffbd0b154a199d9c5f7f37e'
3
+ metadata.gz: 8eaf046e0be6119e542567c9aaa8619c54e7f6c99819a84c9d96f2b7b38d21af
4
+ data.tar.gz: 3cab0ed9984ebd11cfa25dde675327a94ffd37203e9e35e57932910fbd5e956f
5
5
  SHA512:
6
- metadata.gz: a437743ef3ddca89b6226abe8e8796f563b02c536880087c7059fba6dfe386056aa422b3bcca0cc3c9bd502e5e39a50dde355cd9aa7496bc828a09541533ff1b
7
- data.tar.gz: 12a433f79e0bcbab9a7ca9e63d5d2cf071de04e1470d2b929c1737e03369eb502037c751aaa04a5ad09bf7a001cc58306f9ec5c7c3abb490be021b8121976e09
6
+ metadata.gz: 106e81246f60e07de4cd302133b317624c79784b852974fb77092d3d31ea28d11dc74ec29bda1552c48cb4f7473f0457a42fd187c18893a9d2d9cdc9fa2a83d7
7
+ data.tar.gz: 026b2222f8282cbf80f0e5b8a8684d0de2ea4a3eb366bb39638175088dcfb75549f9f46d259a08ec205a1df51f6a778c5968c305fab961656c04b9204b7b63ed
data/CHANGELOG.md CHANGED
@@ -1,2 +1,5 @@
1
+ ### 1.4.0
2
+ * Pdf Merge Client, Pdf To Text Client
3
+
1
4
  ### 1.3.0
2
5
  * Html To Pdf Client
data/README.md CHANGED
@@ -14,9 +14,7 @@ SelectPdf HTML To PDF Online REST API is a professional solution that lets you c
14
14
  * Hide web page elements during the conversion.
15
15
  * Automatically generate bookmarks during the html to pdf conversion.
16
16
  * Support for partial page conversion.
17
- * Easy integration, no third party libraries needed.
18
17
  * Works in all programming languages.
19
- * No installation required.
20
18
 
21
19
  Sign up for for free to get instant API access to SelectPdf [HTML to PDF API](https://selectpdf.com/html-to-pdf-api/).
22
20
 
@@ -42,3 +40,82 @@ Sign up for for free to get instant API access to SelectPdf [HTML to PDF API](ht
42
40
  print("An error occurred: #{e}")
43
41
  end
44
42
 
43
+ ## Pdf Merge API
44
+
45
+ SelectPdf Pdf Merge REST API is an online solution that lets you merge local or remote PDFs into a final PDF document.
46
+
47
+ ### Features
48
+
49
+ * Merge local PDF document.
50
+ * Merge remote PDF from public url.
51
+ * Set PDF viewer options and PDF document information.
52
+ * Secure generated PDF with a password.
53
+ * Works in all programming languages.
54
+
55
+ See [PDF Merge API](https://selectpdf.com/pdf-merge-api/) page for full list of parameters.
56
+
57
+ ### Sample Code
58
+
59
+ require 'selectpdf'
60
+ print "This is SelectPdf-#{SelectPdf::CLIENT_VERSION}\n"
61
+
62
+ test_url = 'https://selectpdf.com/demo/files/selectpdf.pdf'
63
+ test_pdf = 'Input.pdf'
64
+ local_file = 'Result.pdf'
65
+ api_key = 'Your API key here'
66
+
67
+ begin
68
+ client = SelectPdf::PdfMergeClient.new(api_key)
69
+
70
+ # specify the pdf files that will be merged (order will be preserved in the final pdf)
71
+ client.add_file(test_pdf) # add PDF from local file
72
+ client.add_url_file(test_url) # add PDF from public url
73
+
74
+ # merge pdfs to local file
75
+ client.save_to_file(local_file)
76
+ rescue SelectPdf::ApiException => e
77
+ print("An error occurred: #{e}")
78
+ end
79
+
80
+ ## Pdf To Text API
81
+
82
+ SelectPdf Pdf To Text REST API is an online solution that lets you extract text from your PDF documents or search your PDF document for certain words.
83
+
84
+ ### Features
85
+
86
+ * Extract text from PDF.
87
+ * Search PDF.
88
+ * Specify start and end page for partial file processing.
89
+ * Specify output format (plain text or html).
90
+ * Use a PDF from an online location (url) or upload a local PDF document.
91
+
92
+ See [Pdf To Text API](https://selectpdf.com/pdf-to-text-api/) page for full list of parameters.
93
+
94
+ ### Sample Code
95
+
96
+ require 'selectpdf'
97
+ print "This is SelectPdf-#{SelectPdf::CLIENT_VERSION}\n"
98
+
99
+ test_pdf = 'Input.pdf'
100
+ local_file = 'Result.txt'
101
+ api_key = 'Your API key here'
102
+
103
+ begin
104
+ client = SelectPdf::PdfToTextClient.new(api_key)
105
+
106
+ # set parameters - see full list at https://selectpdf.com/pdf-to-text-api/
107
+ client.start_page = 1 # start page (processing starts from here)
108
+ client.end_page = 0 # end page (set 0 to process file til the end)
109
+ client.output_format = SelectPdf::OutputFormat::TEXT # set output format (Text or HTML)
110
+
111
+ print "Starting pdf to text ...\n"
112
+
113
+ # convert local pdf to local text file
114
+ client.text_from_file_to_file(test_pdf, local_file)
115
+
116
+ print "Finished! Number of pages processed: #{client.number_of_pages}.\n"
117
+ rescue SelectPdf::ApiException => e
118
+ print("An error occurred: #{e}")
119
+ end
120
+
121
+