function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Cris9931Cris9931 

print document is not displaying correctly

Hello, we generate in Salesforce documents and I don't know how to configure to be like this: 

User-added image

But currently in our org is like this:

 

User-added image

Which doesnt look nice. Notice how the table is not ending on the first page and on the second page it doesnt even looks like a table because the horizontal line is missing...

How can I solve this?

ShirishaShirisha (Salesforce Developers) 
Hi Cristian,

Greetings!

Please refer this below thread for the suggestions to load the page as expected.

https://salesforce.stackexchange.com/questions/78084/how-to-add-page-breaks-to-visual-force-page-rendered-as-pdf-so-that-a-dynamicall

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
David jack 12David jack 12
hello
Its version problem of software, suppose we are using office 2010 and we will open in 2016, Then the file format will be changed.
Cris9931Cris9931

Hi Shirisha,

Just to remember that this is not visualforce nor LWC it's just plain CSS and HTML in a third app which is installed in Salesforce.

I've managed to solve half of the problem by closing the table in first page but then the last row is spanning on the second page, like so:

User-added image

 

What I added in the code is just:

tr {page-break-inside: avoid;}

As I mentioned in the picture I need to move that horizontal bar from first page on second to make it look like a table..