Pdf conversion to tiff

Hi Anish,


I would like to update you that the above shared ETA relates to document (2013 Pepper Tank 435798_Renewal Exhibits REVISED.pdf). The recent shared document (Carla_Hamilton_GRD.pdf) fails on another reason. So we have logged another separate issue as PDFNEWNET-35444 for further investigation. We will update you its ETA after completion of its investigation.

Sorry for the inconvenience faced.

Best Regards,

Hi Tilal,
Is there any update on this issue.
Can you please let me know if the issue is fixed.

Regards
Anish

Hi Anish,


Thanks for your patience. We have a good news for you PDFNEWNET-35225 (2013 Pepper Tank 435798_Renewal Exhibits REVISED.pdf) issue has been resolved and its fix will be included in upcoming release of Aspose.Pdf for .NET 8.2. It will be published soon after completion of testing.

Best Regards,

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,


Thanks for your inquiry. I’m afraid I’m unable to notice any issue while using Aspose.Pdf for .NET 8.2 .NET Framework 4.0 client profile dll. Please find attached output file. Please share your environment details, so we will investigate it further.


//open document
Document pdfDocument = new Document(myDir + “SKMBT_65213070110120.pdf”);
//create Resolution object
Resolution resolution = new Resolution(300);
//create TiffSettings object
TiffSettings tiffSettings = new TiffSettings();
tiffSettings.Compression = CompressionType.CCITT4;
tiffSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Default;
tiffSettings.SkipBlankPages = false;
//create TIFF device
TiffDevice tiffDevice = new TiffDevice(resolution, tiffSettings);
//convert a particular page and save the image to stream
tiffDevice.Process(pdfDocument, myDir + “SKMBT_65213070110120_output.tiff”);

Please feel free to contact us for any further assistance.

Best Regards,

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 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;
    }</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.