Click here to Skip to main content
15,881,870 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
SQL
I have a HTML template which I converted into PDF. All works fine now the issue comes when it converts PDF & only 1-2 lines shows in second page. So what I need if only 1-2 lines comes on second page then it prints entire data in single page.

Any guidance, suggestions really appreciated.
Posted
Updated 20-Jan-15 18:49pm
v2
Comments
Sergey Alexandrovich Kryukov 20-Jan-15 16:08pm    
Why? why?!
—SA
Mas11 21-Jan-15 1:05am    
I really appreciated your answer that's why we have preview functionality where we can fix these types of stuff but the problem is that my manager is told me he needs this kind of functionality. If there is any way then please let me know. I'm using express PDF.

Decrease font size,or modify the other settings to make sure all your content in one page.
 
Share this answer
 
Not a good idea. I would leave it as is, possibly adding some orphan control. The user must decide what paper size to use and, deal with consequences. Anyway, any user can preview the document and decide to change the size.

The trick with automatic change of the paper size only looks clever, but this is not what user wants. For a user, the choice of the paper size is primary. If is defined not by the fitness of some particular text, but many other things: corporate standards, size of the user's paper folder or cabinet, after all. :-)

Don't try to do it.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900