Does anyone know of a good .NET library to convert TIFF files, that may be multi-page, to PDF files?
The TIFF files are stored on a file share, and the PDF files need to be stored in the same location as the TIFF file.
The tool is supposed to be used for converting high volumes of TIFF files.
Here is an example using PDFSharp
using System;
using System.Collections.Generic;
using System.Text;
using PdfSharp.Drawing;
using PdfSharp.Pdf;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
PdfDocument s_document = new PdfDocument();
PdfPage page = s_document.AddPage();
XGraphics gfx = XGraphics.FromPdfPage(page);
XImage image = XImage.FromFile(@"C:\Image.tif");
page.Width = image.PointWidth;
page.Height = image.PointHeight;
gfx.DrawImage(image, 0, 0);
s_document.Save(@"C:\Doc.pdf");
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With