I have following 2 methods:
1. Convert PDF to Tiff
string loadfile = @"D:\Data\PDF_Farbe\PDF091.pdf";
string savefile = @"D:\Data\newTEST\PDF091.tiff";
string saveMultifiles = @"D:\Data\newTEST\sectest{0}.tiff";
RasterCodecs.Startup();
RasterCodecs codecs = new RasterCodecs();
LeadTools_RasterSupport_Unlock();
RasterImage image;
CodecsImageInfo imgIngfo = codecs.GetInformation(loadfile, true);
int count = imgIngfo.TotalPages;
for (int i = 1; i <= count; i++)
{
image = codecs.Load(loadfile, 32, CodecsLoadByteOrder.Rgb, i, i);
codecs.Save(image, string.Format(saveMultifiles, i), RasterImageFormat.Tif, 1, 1, 1, 1, CodecsSavePageMode.Append);
}
2. Merge PDFs
List<string> pdfFileList = new List<string>();
pdfFileList.Add(@"D:\Data\PDF_Farbe\PDF091.pdf");
pdfFileList.Add(@"D:\Data\PDF_Farbe\PDF091_1.pdf");
pdfFileList.Add(@"D:\Data\PDF_Farbe\PDF091_2.pdf");
pdfFileList.Add(@"D:\Data\PDF_Farbe\PDF091_3.pdf");
pdfFileList.Add(@"D:\Data\PDF_Farbe\PDF091_4.pdf");
foreach (string str in pdfFileList)
{
image = codecs.Load(str);
codecs.Save(image, @"D:\Data\newTEST\testPDF.PDF", RasterImageFormat.RasPdfG4, 1, 1, image.PageCount, 1, CodecsSavePageMode.Append);
}
but the output is gray, i want it in color. How can i do this in both?