combine multiple PDFs into one file?

1 Answer 1080 Views
PDF Processing
Brent
Top achievements
Rank 1
Brent asked on 28 Jun 2022, 12:13 AM

Any chance you could provide simple sample code (ideally stackblitz) demonstrating how to combine multiple PDFExport's into a single PDF file?

the need to combine comes from wanting page numbering to start at 1 within each individual pdf render.

totally open to using the lower level exportPDF from the drawing library... perhaps there's a straightforward path to combining the individual DataURI's?  also open to using additional 3rd party npmjs libraries

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 29 Jun 2022, 12:05 PM

Hi Brent,

It is possible to use drawDOM for the first element that you want to export and then use it again to export the second element. You can then append the generated content of the first drawDOM function with the second one and only then export it to PDF. I have prepared a simple example demonstrating such implementation :

Note that the paging is configured for the drawDOM:

Another option would be to use our Document Processing library:

Hope this helps.

 

Regards,
Konstantin Dikov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
PDF Processing
Asked by
Brent
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or