ASP源码
PHP源码
.NET源码
JSP源码
官网:
http://sourceforge.net/projects/itextsharp/
http://hardrock.cnblogs.com/
http://www.rubypdf.com/
现在的版本是3.18版,记得在引用里导入itextsharp.下面的代码是把图象合并到一个多页pdf的例子.
private void process(string[] files, string newpdf)
{
iT***Sharp.text.Document document = new iT***Sharp.text.Document(iT***Sharp.text.PageSize.A4, 25, 25, 25, 25);
try
{
iT***Sharp.text.pdf.PdfWriter.GetInstance(document, new FileStream(newpdf, Fi***ode.Create, Fi***ccess.ReadWrite));
do***ent.Open();
iT***Sharp.text.Image image;
for (int i = 0; i < fi***.Length; i++)
{
image = iT***Sharp.text.Image.GetInstance(files[i]);
if (im***.Height > iT***Sharp.text.PageSize.A4.Height - 25)
{
im***.ScaleToFit(iT***Sharp.text.PageSize.A4.Width - 25, iT***Sharp.text.PageSize.A4.Height - 25);
}
else if (im***.Width > iT***Sharp.text.PageSize.A4.Width - 25)
{
im***.ScaleToFit(iT***Sharp.text.PageSize.A4.Width - 25, iT***Sharp.text.PageSize.A4.Height - 25);
}
im***.Alignment = iT***Sharp.text.Image.ALIGN_MIDDLE;
//***ge.SetDpi(72, 72);
do***ent.NewPage();
do***ent.Add(image);
//Phrase phrase3 = new Phrase("ma***o:dr***[email protected]