This post is in response to a comment here. Let’s say you have a PDF with hyperlinks pointing to URLs like http://www.bing.com and you want to make these instead point to a page internal to the PDF. (Personally I can’t think of why this would be needed but someone apparently…
Tag: iTextSharp
How to recompress images in a PDF using iTextSharp
(I originally posted this on Stack Overflow) iText and iTextSharp have some methods for replacing indirect objects. Specifically there’s PdfReader.KillIndirect() which does what it says and PdfWriter.AddDirectImageSimple(iTextSharp.text.Image, PRIndirectReference) which you can then use to replace what you killed off. In pseudo C# code you’d do: Below is a full working…
#3 – VB.Net iTextSharp Tutorial – Add a scaled image to a document
This is part of a series of iTextSharp tutorials for VB 2010 Express. See this post for an overview and to answer any basic questions that you may have. This post is a followup to the previous one, this time it scales the image based on the document’s size
#2 – VB.Net iTextSharp Tutorial – Add an image to a document
This is part of a series of iTextSharp tutorials for VB 2010 Express. See this post for an overview and to answer any basic questions that you may have.
#1 – VB.Net iTextSharp Tutorial – Hello World
This is the first in the series of iTextSharp tutorials for VB 2010 Express. See this post for an overview and to answer any basic questions that you may have. This is the starter, the “hello world” program done in VB.Net. The comments in the code should hopefully be enough…
VB.Net tutorial for iTextSharp
iTextSharp is a great open source PDF creation and manipulation library and is a port of the original Java version iText. Unfortunately I’ve found the documentation and samples lacking, especially for VB.Net. The only good collection of tutorials that I’ve found was written by Mike Brind. While they were a…
Setting a Paragraph’s Absolute Position with iTextSharp
Man, you’d think this would have been easier. The Paragraph object in iTextSharp doesn’t have a position property so you can’t absolutely position it. If you search online they’ll tell you to use a PdfContentByte instead which does not work if you want to handle multiple lines automatically. Also, and…
iTextSharp SetCMYKColorFillF Values
This took a little while for me to figure out but when calling SetCMYKColorFillF(Single, Single, Single, Single) make sure that your singles are from 0 to 1, not 0 to 100 as normal CMYK values are represented. So for a 78%/18%/18%/6% use: SetCMYKColorFillF(0.78F, 0.18F, 0.18F, 0.06F)