That's another question. Do:

Paragraph spacer = new Paragraph("\n");
spacer.setSpacingAfter(200);
document.add(spacer);
Paragraph p = new Paragraph();
p.add(new Chunk("Test"));
document.add(p);


> -----Original Message-----
> From: 柳 祥军 [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, March 17, 2005 7:29 AM
> To: Paulo Soares
> Subject: Re: [iText-questions] Re: how to solve this problem 
> with using a template to generate pdf file
> 
> Thank for your help with patience.  As i am not familiar with 
> PdfContentByte.clip(), i saw some example in Gmane.  however 
> this method 
> seem not be very good,  it seem to be more appropriate for 
> that if to get 
> some section of a page, we can use clip() to excerpt the 
> section with a 
> appropriate rectange, but my program isn't so, it take two 
> step to generate 
> a resulting pdf, its detail as follow:
>  the first step is to add  content from a template , the code 
> as follow:
>         reader = new PdfReader(tempDir + "template.pdf");
>         for(int i=1; i<=reader.getNumberOfPages(); i++){
>           PdfContentByte cb = pdfWriter.getDirectContent();
>           cb.addTemplate(pdfWriter.getImportedPage(reader,i),0,0);
>           if(i<reader.getNumberOfPages()) document.newPage(); 
>         }
> the second step is to add other thing using document.add(), 
> for example,
>         document.add(new Chunk("Test"))
> 
> here i want that the content added in the second step  can 
> closely be near 
> by the end of the content of the last page added in the first 
> step.  so i 
> don't run newPage() again for the last page as the other page 
> in the "for{} 
> " above,  only for to make them to be added the same page.  
> however  the 
> content added later overrides the one added before.  Do you have good 
> suggestion?
> 
> Best wishes
> Liu
>     
> 
> >From: "Paulo Soares" <[EMAIL PROTECTED]>
> >Reply-To: "Paulo Soares" <[EMAIL PROTECTED]>
> >To: <[email protected]>,"Liu" 
> <[EMAIL PROTECTED]>
> >Subject: Re: [iText-questions] Re: how to solve this problem 
> with using a 
> template to generate pdf file
> >Date: Thu, 17 Mar 2005 00:15:29 -0000
> >
> >If you know where the blank is you can clip the page when placing it.
> >
> >----- Original Message -----
> >From: "Liu" <[EMAIL PROTECTED]>
> >To: <[email protected]>
> >Sent: Wednesday, March 16, 2005 3:26 PM
> >Subject: [iText-questions] Re: how to solve this problem with using a
> >template to generate pdf file
> >
> >
> > > sir:
> > >   i want only a method to make use of the blank part of a 
> page at the 
> end
> > > completely,   make it not to appear that there is very 
> big blank part 
> in
> >the
> > > first page while it continue to add content to the second 
> page,  for
> >exacmple,
> > > i use a template like 'ImportedPage' to add the first 
> page and this 
> page
> >has
> > > very big blank at the end,  then continue add other thing 
> to the second
> >page.
> > > i don't need this case. Do you has any suggestion to solove it?
> > >
> > > Best wishes
> > > Liu
> > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > SF email is sponsored by - The IT Product Guide
> > > Read honest & candid reviews on hundreds of IT Products from real 
> users.
> > > Discover which products truly live up to the hype. Start 
> reading now.
> > > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> > > _______________________________________________
> > > iText-questions mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
> 
> _________________________________________________________________
> 享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  
> 
> 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to