515
Views
9
Comments
Page Break in PDF
Application Type
Reactive

I am having a pdf designed in web block  inside that I am having list of images when I click on print in pdf preview the image is breaking how should I avoid this kind of page break issue and in what way should I handle the page preak so that it wont break any single images.


Img demo.jpg
2024-03-22 09-17-23
Chandra Vikas Sharma

Hi, 

 Which forge component you are using for  Generate PDF .

2022-11-25 06-39-01
Rajeshree

I am Not using any forge component the entire pdf is designed in a web block

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Rajeshree,

"The entire pdf is designed in a web block" doesn't make sense in OutSystems. OutSystems does not have any native PDF support, so if you are doing anything with a PDF, you need a Forge component, or some other component you created.

2022-11-25 06-39-01
Rajeshree

Thank you for your input earlier we were using ultimate pdf,we were trying some another approach but I guess we should proceed with ultimate pdf 

2021-01-04 08-13-48
Toto
 
MVP

Hi @RAJESHREE CHANDRA,

We also having trouble with ultimate pdf breaking pages, because this plugin will calculate the paper size with the content and will cut directly to new pages when already hit the paper size margin.

What we do is we're using different plugin (html2pdfconverter : https://www.outsystems.com/forge/component-overview/209/html2pdfconverter) and using screen as pages. so when we generating pdf, we create screens to fit 1 page  of the pdf, so there's no unwanted cutting in the pages.

UserImage.jpg
Nix

hi! could you please explain more on how you are limiting the content of the screen to fit the page? Are you doing it on a dynamic content of a screen? I am also using html2pdfconverter and having trouble with images getting split between pages.

2021-01-04 08-13-48
Toto
 
MVP

Hi,

What we do is counting the height of the screen (when generating the screen dynamically) and split into new page when the height is already pass the specified number.

For images, we also still having the same problem like yours (still in progress)

Thanks

UserImage.jpg
Nurul Mukhlisa

Hi, can I know did you find the way to solve it? I'm encountering the same problem at the moment :)

UserImage.jpg
Sathish Kumar R


Use this CSS in a container. 

page-break-before: always;

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.