|
iText sharp Read PDF file an draw it resized on another
Message-ID:<ggn0vp$hf7$01$1@news.t-online.com>
Subject:iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Thu, 27 Nov 2008 21:46:48 +0100
As already mentioned in the title:
I'm trying to read an existing pdf, resize it and then draw it on a new one.
Does somebody know how to do this? (API-Commands, c# prefered)
Reading and drawing works, I'm just looking for a simple way to make the
read pdf smaller,
so that it fits on a new page with additional text on top of that page.
Thank you for your help.
MfG
S.H.
Message-ID:<492fc110$0$27228$9a622dc7@news.kpnplanet.nl>
Subject:Re: iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Fri, 28 Nov 2008 10:57:52 +0100
> As already mentioned in the title:
>
> I'm trying to read an existing pdf, resize it and then draw it on a new
one.
>
> Does somebody know how to do this? (API-Commands, c# prefered)
>
> Reading and drawing works, I'm just looking for a simple way to make the
> read pdf smaller,
> so that it fits on a new page with additional text on top of that page.
Explained here very well:
http://itextsharp.sourceforge.net/tutorial/ch10.html
Govert
http://www.noliturbare.com
Message-ID:<ggouch$3b2$02$1@news.t-online.com>
Subject:Re: iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Fri, 28 Nov 2008 15:14:41 +0100
> Explained here very well:
> http://itextsharp.sourceforge.net/tutorial/ch10.html
>
> Govert
I'm sorry, but that is not really what I was looking for.
Or I'm to stupid to unterstand your intention.
I'd like to read an existing pdf page, resize it, and draw it on a new page.
The page you linked, describes positioning of new text and graphics.
MfG
S.H.
Message-ID:<4930e7a6$0$27232$9a622dc7@news.kpnplanet.nl>
Subject:Re: iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Sat, 29 Nov 2008 07:54:45 +0100
> > Explained here very well:
> > http://itextsharp.sourceforge.net/tutorial/ch10.html
> >
> I'm sorry, but that is not really what I was looking for.
> Or I'm to stupid to unterstand your intention.
>
> I'd like to read an existing pdf page, resize it, and draw it on a new
page.
> The page you linked, describes positioning of new text and graphics.
Simple example (scales 1st page of In.PDF on an A4 page (lowerleft corner)
of Out.PDF):
....
PdfReader reader = new PdfReader("In.PDF");
Document doc = new Document(PageSize.A4, 0, 0, 0, 0);
PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream("Out.PDF",
FileMode.Create));
doc.Open();
PdfContentByte cb = writer.DirectContent;
PdfImportedPage page = writer.GetImportedPage(reader, 1); //page #1
float Scale = 0.67f;
cb.AddTemplate(page, Scale, 0, 0, Scale, 0, 0);
doc.Close();
....
Govert
http://www.noliturbare.com
Message-ID:<ggrjsv$cav$01$1@news.t-online.com>
Subject:Re: iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Sat, 29 Nov 2008 15:34:07 +0100
You helped me very much with this snippet. Thanks alot.
MfG
S.H.
Message-ID:<ggn0vp$hf7$01$1@news.t-online.com>
Subject:iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Thu, 27 Nov 2008 21:46:48 +0100
As already mentioned in the title:
I'm trying to read an existing pdf, resize it and then draw it on a new one.
Does somebody know how to do this? (API-Commands, c# prefered)
Reading and drawing works, I'm just looking for a simple way to make the
read pdf smaller,
so that it fits on a new page with additional text on top of that page.
Thank you for your help.
MfG
S.H.
Message-ID:<492fc110$0$27228$9a622dc7@news.kpnplanet.nl>
Subject:Re: iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Fri, 28 Nov 2008 10:57:52 +0100
> As already mentioned in the title:
>
> I'm trying to read an existing pdf, resize it and then draw it on a new
one.
>
> Does somebody know how to do this? (API-Commands, c# prefered)
>
> Reading and drawing works, I'm just looking for a simple way to make the
> read pdf smaller,
> so that it fits on a new page with additional text on top of that page.
Explained here very well:
http://itextsharp.sourceforge.net/tutorial/ch10.html
Govert
http://www.noliturbare.com
Message-ID:<ggouch$3b2$02$1@news.t-online.com>
Subject:Re: iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Fri, 28 Nov 2008 15:14:41 +0100
> Explained here very well:
> http://itextsharp.sourceforge.net/tutorial/ch10.html
>
> Govert
I'm sorry, but that is not really what I was looking for.
Or I'm to stupid to unterstand your intention.
I'd like to read an existing pdf page, resize it, and draw it on a new page.
The page you linked, describes positioning of new text and graphics.
MfG
S.H.
Message-ID:<4930e7a6$0$27232$9a622dc7@news.kpnplanet.nl>
Subject:Re: iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Sat, 29 Nov 2008 07:54:45 +0100
> > Explained here very well:
> > http://itextsharp.sourceforge.net/tutorial/ch10.html
> >
> I'm sorry, but that is not really what I was looking for.
> Or I'm to stupid to unterstand your intention.
>
> I'd like to read an existing pdf page, resize it, and draw it on a new
page.
> The page you linked, describes positioning of new text and graphics.
Simple example (scales 1st page of In.PDF on an A4 page (lowerleft corner)
of Out.PDF):
....
PdfReader reader = new PdfReader("In.PDF");
Document doc = new Document(PageSize.A4, 0, 0, 0, 0);
PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream("Out.PDF",
FileMode.Create));
doc.Open();
PdfContentByte cb = writer.DirectContent;
PdfImportedPage page = writer.GetImportedPage(reader, 1); //page #1
float Scale = 0.67f;
cb.AddTemplate(page, Scale, 0, 0, Scale, 0, 0);
doc.Close();
....
Govert
http://www.noliturbare.com
Message-ID:<ggrjsv$cav$01$1@news.t-online.com>
Subject:Re: iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Sat, 29 Nov 2008 15:34:07 +0100
You helped me very much with this snippet. Thanks alot.
MfG
S.H.
Message-ID:<ggn0vp$hf7$01$1@news.t-online.com>
Subject:iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Thu, 27 Nov 2008 21:46:48 +0100
As already mentioned in the title:
I'm trying to read an existing pdf, resize it and then draw it on a new one.
Does somebody know how to do this? (API-Commands, c# prefered)
Reading and drawing works, I'm just looking for a simple way to make the
read pdf smaller,
so that it fits on a new page with additional text on top of that page.
Thank you for your help.
MfG
S.H.
Message-ID:<492fc110$0$27228$9a622dc7@news.kpnplanet.nl>
Subject:Re: iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Fri, 28 Nov 2008 10:57:52 +0100
> As already mentioned in the title:
>
> I'm trying to read an existing pdf, resize it and then draw it on a new
one.
>
> Does somebody know how to do this? (API-Commands, c# prefered)
>
> Reading and drawing works, I'm just looking for a simple way to make the
> read pdf smaller,
> so that it fits on a new page with additional text on top of that page.
Explained here very well:
http://itextsharp.sourceforge.net/tutorial/ch10.html
Govert
http://www.noliturbare.com
Message-ID:<ggouch$3b2$02$1@news.t-online.com>
Subject:Re: iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Fri, 28 Nov 2008 15:14:41 +0100
> Explained here very well:
> http://itextsharp.sourceforge.net/tutorial/ch10.html
>
> Govert
I'm sorry, but that is not really what I was looking for.
Or I'm to stupid to unterstand your intention.
I'd like to read an existing pdf page, resize it, and draw it on a new page.
The page you linked, describes positioning of new text and graphics.
MfG
S.H.
Message-ID:<4930e7a6$0$27232$9a622dc7@news.kpnplanet.nl>
Subject:Re: iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Sat, 29 Nov 2008 07:54:45 +0100
> > Explained here very well:
> > http://itextsharp.sourceforge.net/tutorial/ch10.html
> >
> I'm sorry, but that is not really what I was looking for.
> Or I'm to stupid to unterstand your intention.
>
> I'd like to read an existing pdf page, resize it, and draw it on a new
page.
> The page you linked, describes positioning of new text and graphics.
Simple example (scales 1st page of In.PDF on an A4 page (lowerleft corner)
of Out.PDF):
....
PdfReader reader = new PdfReader("In.PDF");
Document doc = new Document(PageSize.A4, 0, 0, 0, 0);
PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream("Out.PDF",
FileMode.Create));
doc.Open();
PdfContentByte cb = writer.DirectContent;
PdfImportedPage page = writer.GetImportedPage(reader, 1); //page #1
float Scale = 0.67f;
cb.AddTemplate(page, Scale, 0, 0, Scale, 0, 0);
doc.Close();
....
Govert
http://www.noliturbare.com
Message-ID:<ggrjsv$cav$01$1@news.t-online.com>
Subject:Re: iText(sharp) - Read PDF file an draw it _resized_ on another
Date:Sat, 29 Nov 2008 15:34:07 +0100
You helped me very much with this snippet. Thanks alot.
MfG
S.H.
|