Manual page breaks with drawDOM and exportPDF

1 Answer 30 Views
PDF Processing PDF Viewer
Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
Bernd asked on 10 Jul 2024, 09:10 AM

Hi.

In your PDFProcessing component you have the possibility as shown on this page, to add manual page breaks using CSS classes. 

I am using the drawDOM and exportPDF functionalities similar to what is shown here to generate a Base64String of my pages and then push that string directly to a PDFViewer instance so I can generate a PDF on the fly and show it in the viewer. The question is if there is a simliar functionality to add manual page breaks as with the PDFProcessing component if I generate the PDF on the fly?

To show what I've done, I have put my code here.

Thanks for any help.

Greetings,

Bernd

1 Answer, 1 is accepted

Sort by
0
Accepted
Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
answered on 10 Jul 2024, 10:13 AM

Hi again.

Ok, sorry, I just found out, that the drawDOM function has a "forcePageBreak" parameter similar to the PDFProcessing component. So I used it and it works perfectly. 

I have also updated my StackBlitz example I mentioned in the post above for anyone who is looking for something similar.

Greetings,

Bernd

 

Filip
Telerik team
commented on 11 Jul 2024, 01:20 PM

Hi, Bernd,

I am glad to hear that you have managed to find a solution and thank you for sharing it with the community.

Regards,
Filip

Tags
PDF Processing PDF Viewer
Asked by
Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
Answers by
Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
Share this question
or