Hi Anish,
Hi Tilal,
Is there any update on this issue.
Can you please let me know if the issue is fixed.
Regards
Anish
Hi Anish,
The issues you have found earlier (filed as PDFNEWNET-35225) have been fixed in Aspose.Pdf for .NET 8.2.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi Team,
I am able to convert the pdf which i posted earlier in this post.
But as per my understanding , with Aspose.pdf we can able to convert all the pdf to tiff image.
But with latest version of Aspose.pdfv8.2 i am not able to convert the attached pdf to tiff.
Can you please look into this.
Regards
Anish
Hi Anish,
Hi Tilal,
I am using Aspose.pdf.Dll for framework4.
My OS is XP
Framwork : 4.0
Please see the code which i am using
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>(200); <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; tiffSettings.Depth = Aspose.Pdf.Devices.<span style="color:#2b91af;">ColorDepth</span>.Format8bpp; <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:green;">//tiffSettings.Brightness = .40f;</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>(); <span style="color:green;">//tiffDevice.Process(pdfDocument, page, page, Path.Combine(OutputFolder, String.Concat(Path.GetFileNameWithoutExtension(FullInputFileName), ".",page.ToString().PadLeft(3, '0'))));</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), <span style="color:#a31515;">"."</span>, page.ToString().PadLeft(3, <span style="color:#a31515;">'0'</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; }</pre>Regards<br>Anish<br>
anishvj:I am using Aspose.pdf.Dll for framework4.
My OS is XP
Framwork : 4.0
Please see the code which i am usingpublic 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>(200); <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; tiffSettings.Depth = Aspose.Pdf.Devices.<span style="color:#2b91af;">ColorDepth</span>.Format8bpp; <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:green;">//tiffSettings.Brightness = .40f;</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>(); <span style="color:green;">//tiffDevice.Process(pdfDocument, page, page, Path.Combine(OutputFolder, String.Concat(Path.GetFileNameWithoutExtension(FullInputFileName), ".",page.ToString().PadLeft(3, '0'))));</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), <span style="color:#a31515;">"."</span>, page.ToString().PadLeft(3, <span style="color:#a31515;">'0'</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; }</div></BLOCKQUOTE></font></pre><pre style="color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"><font face="Arial" size="2">Hi Anish,</font></pre><pre style="color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"><font face="Arial" size="2">Thanks for sharing the details.</font></pre><pre style="color: black; background-color: white; background-position: initial initial; background-repeat: initial initial;"><p class="MsoNormal"><font face="Arial" size="2">I have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-35537. We
will investigate this issue in details and will keep you updated on the status
of a correction.We apologize for your inconvenience.<o:p></o:p>
The issues you have found earlier (filed as PDFNEWNET-35537) have been fixed in Aspose.Pdf for .NET 9.2.0.
The blog post for this release is created over this link
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.