//
// Copyright (c) Smart Energia. All rights reserved.
//
namespace Download_Faturas
{
using System.Data.OleDb;
using System.Globalization;
using System.Net.Http.Headers;
using System.Reflection;
using System.Reflection.Metadata.Ecma335;
using System.Runtime.Intrinsics.X86;
using System.Text;
using System.Text.Json;
using System.Text.RegularExpressions;
using iText.Kernel.Pdf;
using iText.Kernel.Utils;
///
/// Custom PDF splitter that allows specifying a function to create the next PDF writer.
///
///
/// Initializes a new instance of the class.
///
/// The PDF document to split.
/// A function that returns the next PdfWriter given a PageRange.
public class CustomPdfSplitter(PdfDocument pdfDocument, Func nextWriter) : PdfSplitter(pdfDocument)
{
///
/// Gets the next PDF writer for the specified page range.
///
/// The page range for which to get the next PDF writer.
/// The next PDF writer.
protected override PdfWriter GetNextPdfWriter(PageRange documentPageRange)
{
return nextWriter.Invoke(documentPageRange);
}
}
}