This mail was sent to a Company address instead of to the mailing list.
Brian, could you please make sure NOT to use the address i...@1t3xt.info?
Use itext-questions@lists.sourceforge.net instead.

In the meantime, your question was answered on the mailing-list.
If you didn't receive that answer, you're probably not subscribed to the 
list.
Normally, the answer should be archived here soon:
http://thread.gmane.org/gmane.comp.java.lib.itext.general/62617

On 30/07/2012 15:55, Brian Holmes wrote:
> I've tried implementing this with a new table variable for every page and I 
> still am getting the first page (page 1 and 2 of the pdf repeating).
>
>                  PdfPTable table = new PdfPTable(columnCount);
>                  table.WidthPercentage = 100;
>                  table.SplitLate = false;
>
>                  for (int i = 1; i <= 2; i++)
>                  {
>                      PdfImportedPage page;
>                      page = writer.GetImportedPage(reader, i);
>                      table.AddCell(iTextSharp.text.Image.GetInstance(page));
>                  }
>
>                  document.Add(table);
>                  document.NewPage();
>                  PdfPTable table2 = new PdfPTable(columnCount);
>                  table2.WidthPercentage = 100;
>
>                  for (int j = 3; j <= 4; j++)
>                  {
>                      PdfImportedPage page;
>                      page = writer.GetImportedPage(reader, j);
>                      table2.AddCell(iTextSharp.text.Image.GetInstance(page));
>                  }
>
>                  document.Add(table2);
>
> I have this hard-coded to work with a pdf of exactly four pages initially 
> just to make sure I can get this working but still no success.
>
> Any pointers on this would be appreciated.  Thanks.
>
> -----Original Message-----
> From: i...@1t3xt.info [mailto:i...@1t3xt.info]
> Sent: Saturday, July 28, 2012 7:51 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] Importing Document Error
>
> On Fri, 27 Jul 2012 19:29:12 +0000, Brian Holmes 
> <brian.hol...@etcconnect.com> wrote:
>> I'm trying to import a pdf into a new document but have 2 pages within
>> a single page.  Unfortunately the output keeps repeating the first 2
> pages.
>> Could you be of assistance with how my code (below) should be modified?
>
> This looks all wrong:
>> if (i % 2 == 0)
>>      {
>>          table.CompleteRow();
>>          document.Add(table);
>>          table.DeleteLastRow();
>>          document.NewPage();
>>      }
> I've never seen that kind of construction.
> What are you trying to achieve?
> Seems like you're always adding the same row deliberately.
>
> If you want 2 pages next to eachother on one page, why don't you create a new 
> PdfPTable with one row and two columns for every two pages?


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to