Hi Team,
I am using aspose.pdf.dll v 7.9 to convert pdf to tiff.
But my pdf file is not converting properly.
Here i am attaching the pdf file and the converted files. And also the code which i am using to convert.
public static System.Drawing.Image[] ConvertPDFtoMultiPageTiff(string OutputFolder, string FullInputFileName)
{
System.Drawing.Image[] sourceImages = null;<span style="color:blue;">try</span> { <span style="color:#2b91af;">Document</span> pdfDocument = <span style="color:blue;">new</span> <span style="color:#2b91af;">Document</span>(FullInputFileName); <span style="color:green;">//create Resolution object</span> <span style="color:#2b91af;">Resolution</span> resolution = <span style="color:blue;">new</span> <span style="color:#2b91af;">Resolution</span>(300); <span style="color:green;">//create TiffSettings object</span> <span style="color:#2b91af;">TiffSettings</span> tiffSettings = <span style="color:blue;">new</span> <span style="color:#2b91af;">TiffSettings</span>(); tiffSettings.Compression = <span style="color:#2b91af;">CompressionType</span>.CCITT4; <span style="color:blue;">if</span>(tiffSettings.Shape == <span style="color:#2b91af;">ShapeType</span>.Landscape) tiffSettings.Shape = <span style="color:#2b91af;">ShapeType</span>.Portait; tiffSettings.SkipBlankPages = <span style="color:blue;">false</span>; <span style="color:#2b91af;">Stream</span> output = <span style="color:blue;">null</span>; sourceImages = <span style="color:blue;">new</span> System.Drawing.<span style="color:#2b91af;">Image</span>[pdfDocument.Pages.Count]; <span style="color:green;">//create TIFF device</span> <span style="color:#2b91af;">TiffDevice</span> tiffDevice = <span style="color:blue;">new</span> <span style="color:#2b91af;">TiffDevice</span>(resolution, tiffSettings); <span style="color:blue;">for</span> (<span style="color:blue;">int</span> page = 1; page <= pdfDocument.Pages.Count; page++) { output = <span style="color:blue;">new</span> <span style="color:#2b91af;">MemoryStream</span>(); tiffDevice.Process(pdfDocument, page, page, output); sourceImages[page - 1] = System.Drawing.<span style="color:#2b91af;">Image</span>.FromStream(output); sourceImages[page - 1].Save(<span style="color:#2b91af;">Path</span>.Combine(OutputFolder, <span style="color:#2b91af;">String</span>.Concat(<span style="color:#2b91af;">Path</span>.GetFileNameWithoutExtension(FullInputFileName), page.ToString().PadLeft(3, <span style="color:#a31515;">'0'</span>), <span style="color:#a31515;">"."</span>, <span style="color:#a31515;">"tiff"</span>))); output = <span style="color:blue;">null</span>; } } <span style="color:blue;">catch</span> (<span style="color:#2b91af;">Exception</span> ex) { sourceImages = <span style="color:blue;">null</span>; <span style="color:blue;">throw</span> <span style="color:blue;">new</span> <span style="color:#2b91af;">Exception</span>(<span style="color:#2b91af;">String</span>.Format(<span style="color:#a31515;">"Error in splitTiffPages: {0}"</span>, ex.Message)); } <span style="color:blue;">return</span> sourceImages; }<br><br><br>My customer is waiting to fix this issue ASAP. Please help me.<br>Regards<br>Anish<br></pre><br>