```
Magick: Postscript delegate failed `C:\CCP\CCP_363.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/713
at ImageMagick.MagickImageCollection.HandleReadException(MagickException exception)
at ImageMagick.MagickImageCollection.Read(String fileName, MagickReadSettings readSettings)
```
Problem starts after once read timeout and thread abort in ASP.NET application. Its already kept to 300ms timeout.
Subsequent try gets following.
```
Magick: unable to create temporary file `C:\CCP\CCP_363.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/400
at ImageMagick.MagickImageCollection.HandleReadException(MagickException exception)
at ImageMagick.MagickImageCollection.Read(String fileName, MagickReadSettings readSettings)
```
PDF Size: 829kb
PDF Pages: 17
```
Magick: unable to extend cache `C:\Windows\TEMP\magick-3700Zf3OhYnRtPra17': No space left on device @ error/cache.c/OpenPixelCache/3691
```
It create more than 1.3GB temp files. Its not removing temp files after writing Tiff. I just cleared about 10Gb+ temp files of different tests. But the issue remains is lots of time taken for conversion along with unexpected errors as noted above.
Comments: ** Comment from web user: jitudavda **
Following single method works to convert the pdf to tiff. This is the method that produce above behaviour in ASP.NET 4.0 application. While reading, it creates 1-2GB for 700-900Kb pdf file. For smaller pdf having single page, it works nicely.
- "MagickReadSettings" are all required one [ Tiff, GRAY, Percent(200) ]
- For compression, each image is iterated and assigned Group4 with Quality 100.
- There seems no error reported for Image reading.
```
/// <summary>
/// Convert multi-page PDF to multi-page TIFF with Group4 Compression
/// </summary>
/// <param name="tiffFileName">Tiff Filename only</param>
/// <param name="dstTiffFileName">Destination Tiff file name with full path</param>
/// <param name="pdfPath">Source PDF file name with full path</param>
/// <returns></returns>
public static string ConvertPDF2Tiff(String pdfPath, String dstTiffFileName, String tiffFileName)
{
String retVal = string.Empty;
try
{
LogManager.Log("Inside ConvertPDF2Tiff:" + pdfPath);
MagickReadSettings settings = new MagickReadSettings();
settings.Density = new MagickGeometry(new Percentage(200), new Percentage(200));
settings.Format = MagickFormat.Tiff; //MagickFormat.Tiff64;
settings.ColorSpace = ColorSpace.GRAY;
using (MagickImageCollection images = new MagickImageCollection())
{
LogManager.Log("Reading PDF as Images now");
images.Read(pdfPath, settings);
LogManager.Log("Reading PDF as Images:" + images.Count);
foreach (MagickImage image in images)
{
image.Quality = 100;
image.CompressionMethod = CompressionMethod.Group4;
if(image.ReadWarning !=null) retVal += image.ReadWarning.Message + " Error\n";
}
LogManager.Log("Writing Tiff:" + dstTiffFileName);
images.Write(dstTiffFileName);
LogManager.Log("Written Tiff:" + dstTiffFileName);
}
}
catch (Exception ex)
{
retVal = ex.Message;
LogManager.Log("ConvertPDF2Tiff failed", ex, tiffFileName);
}
LogManager.Log("Exiting ConvertPDF2Tiff:" + retVal);
return retVal;
}
```