Skip to content

Commit 8603204

Browse files
committed
update context objects sample
1 parent af08cc9 commit 8603204

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

net/developer-guide/basic-usage/context-objects-complete-guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,18 +367,18 @@ using (var converter = new Converter(
367367
if (loadContext.HierarchyLevel == 0)
368368
{
369369
Console.WriteLine(" -> This is the main document");
370-
return new PdfLoadOptions { RemoveEmbeddedFiles = false };
371370
}
372371
else if (loadContext.HierarchyLevel == 1)
373372
{
374373
Console.WriteLine(" -> This is an embedded file in the main document");
375-
return new PdfLoadOptions();
376374
}
377375
else
378376
{
379377
Console.WriteLine($" -> This is nested {loadContext.HierarchyLevel} levels deep");
380-
return new PdfLoadOptions();
381378
}
379+
380+
// Return appropriate load options for the document type
381+
return new PdfLoadOptions();
382382
}))
383383
{
384384
int itemCount = 0;
@@ -388,7 +388,7 @@ using (var converter = new Converter(
388388
{
389389
itemCount++;
390390

391-
// SaveContext also shows hierarchy level during conversion
391+
// SaveContext shows hierarchy level during conversion
392392
var outputName = $"contract-L{saveContext.HierarchyLevel}-I{saveContext.ItemIndex}.pdf";
393393
Console.WriteLine($"Saving: {outputName}");
394394

0 commit comments

Comments
 (0)