PdfDocument to byte[] using PdfMerger iText7
问题 I've a requirement, where I am generating different pdf' using iText 7.1.11 . I am using PdfMerger to merge all pdf's on the fly. I am able to generate pdf successfully at my local system, but the application needs to send bye[] in response. The solution I found here and here . but the problem is PdfMerger does not accept Document object, and I am not sure if i revert my code to use Document instead of PdfDocument will it work or not. Below is the code, with what I tried. public static void