You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+78-4Lines changed: 78 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -160,9 +160,9 @@ var result = await pdftk.SplitAsync(pdfBytes);
160
160
161
161
if(result.Success)
162
162
{
163
-
foreach (varpdfPageinresult.Result)
163
+
foreach (var(fileName, bytes)inresult.Result)
164
164
{
165
-
// Do something with each pdfPage (byte[]).
165
+
// Do something with each pdfPage.
166
166
}
167
167
}
168
168
```
@@ -203,9 +203,83 @@ if(result.Success)
203
203
204
204
### Replace a Page
205
205
206
-
Replace a page in a PDF.
206
+
Replace a page in a PDF with another PDF.
207
207
208
-
*Not Implemented yet.*
208
+
```csharp
209
+
varpdftk=newPDFtk();
210
+
211
+
varresult=awaitpdftk.ReplacePage(
212
+
awaitFile.ReadAllBytesAsync("MyDocument.pdf"),
213
+
page: 3,
214
+
awaitFile.ReadAllBytesAsync("replacement.pdf")
215
+
);
216
+
217
+
if(result.Success)
218
+
{
219
+
// Do something with result.Result (bytes[])
220
+
}
221
+
```
222
+
### Replace Pages
223
+
224
+
Replace multiple pages within a PDF with another PDF.
225
+
226
+
```csharp
227
+
varpdftk=newPDFtk();
228
+
229
+
varresult=awaitpdftk.ReplacePage(
230
+
awaitFile.ReadAllBytesAsync("MyDocument.pdf"),
231
+
startPage: 3,
232
+
endPage: 5,
233
+
awaitFile.ReadAllBytesAsync("replacement.pdf")
234
+
);
235
+
236
+
if(result.Success)
237
+
{
238
+
// Do something with result.Result (bytes[])
239
+
}
240
+
```
241
+
242
+
### Attach files
243
+
244
+
Attaches files to a PDF, if `page` argument is supplied then files are attached to a given page, if `page` argument is not specified then files are attached at document level.
0 commit comments