Click here to Skip to main content
15,912,837 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
i am generating PDF file using iTextSharp.
it is running properly with small data. but when i am trying to generate PDF with large data ,then first page of PDF file is coming as blank and all the data are getting print from second page.

Please help me on this.
Posted
Updated 31-May-15 23:43pm
v2
Comments
[no name] 1-Jun-15 3:30am    
which dimension you are using A4 size or A5
Member 8825505 16-Jul-15 15:42pm    
Have you got solution for this problem please update..i am facing this issue for 3 days..not able to find solution i tried many solution but none works ! Please help me.

For A4 size document use following dimension
var pgSize = new iTextSharp.text.Rectangle(600f, 700f);
                        Document doc = new Document(pgSize, 1.5f, 1.5f, 1f, 0.5f);


                        BaseFont bf = BaseFont.CreateFont("c:\\\\windows\\\\fonts\\\\calibri.ttf", BaseFont.IDENTITY_H, false);
 
Share this answer
 
Create pdf document with this diamention;

Rectangle rec = new Rectangle(PageSize.A4); //PageSize.A4.Rotate()
Document pdfDoc = new Document(rec);


Hope this will resolve your issue.
 
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