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
- Framework: 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; try { Document pdfDocument = new Document(FullInputFileName); //create Resolution object Resolution resolution = new Resolution(200); //create TiffSettings object TiffSettings tiffSettings = new TiffSettings(); tiffSettings.Compression = CompressionType.CCITT4; tiffSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Format8bpp; if (tiffSettings.Shape == ShapeType.Landscape) tiffSettings.Shape = ShapeType.Portait; tiffSettings.SkipBlankPages = false; //tiffSettings.Brightness = .40f; Stream output = null; sourceImages = new System.Drawing.Image[pdfDocument.Pages.Count]; //create TIFF device TiffDevice tiffDevice = new TiffDevice(resolution, tiffSettings); for (int page = 1; page <= pdfDocument.Pages.Count; page++) { output = new MemoryStream(); //tiffDevice.Process(pdfDocument, page, page, Path.Combine(OutputFolder, String.Concat(Path.GetFileNameWithoutExtension(FullInputFileName), ".",page.ToString().PadLeft(3, '0')))); tiffDevice.Process(pdfDocument, page, page, output); sourceImages[page - 1] = System.Drawing.Image.FromStream(output); sourceImages[page - 1].Save(Path.Combine(OutputFolder, String.Concat(Path.GetFileNameWithoutExtension(FullInputFileName), ".", page.ToString().PadLeft(3, '0')))); output = null; } } catch (Exception ex) { sourceImages = null; throw new Exception(String.Format("Error in splitTiffPages: {0}", ex.Message)); } return sourceImages; }
Hi Anish,
Thanks for sharing the details.
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.
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.
The issues you have found earlier (filed as PDFNET-35444) have been fixed in Aspose.PDF for .NET 25.3.