Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to convert LZW type tiff file to PDF c++?

How to convert LZW type tiff file to PDF c++?

Scheduled Pinned Locked Moved C / C++ / MFC
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    raesa
    wrote on last edited by
    #1

    Hi, Can anyone tell me how to convert a LZW compression type tiff file to PDF? Please do help me out. Thnx in advance.

    R J 2 Replies Last reply
    0
    • R raesa

      Hi, Can anyone tell me how to convert a LZW compression type tiff file to PDF? Please do help me out. Thnx in advance.

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      There are two steps to go about it: 1. Uncompress the archive using the same library that you used to compress. 2. Given the extracted file is a tiff image, you can use a virtual pdf printer to print to PDF. Or if you are wanting to do this from your program, use a pdf library like Haru[^]

      It is a crappy thing, but it's life -^ Carlo Pallini

      1 Reply Last reply
      0
      • R raesa

        Hi, Can anyone tell me how to convert a LZW compression type tiff file to PDF? Please do help me out. Thnx in advance.

        J Offline
        J Offline
        Jijo Raj
        wrote on last edited by
        #3

        Hello Raesa, This article will help you - Convert Tiff To Pdf[^]. Regards, Jijo.

        _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

        R 1 Reply Last reply
        0
        • J Jijo Raj

          Hello Raesa, This article will help you - Convert Tiff To Pdf[^]. Regards, Jijo.

          _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

          R Offline
          R Offline
          raesa
          wrote on last edited by
          #4

          Hi.... Thnx for the reply.... I downloaded the code and executed it on the tiff files that i have. The code seems to execute perfectly for the tiff files that are of 'CCIT Group 4 FAX' and 'CCIT Group 3 FAX '.But for the files having compression type as 'LZW', i get a blank PDF file as output. Please do let me know is there a way of converting the LZW type tiff files. Thank You.

          R 1 Reply Last reply
          0
          • R raesa

            Hi.... Thnx for the reply.... I downloaded the code and executed it on the tiff files that i have. The code seems to execute perfectly for the tiff files that are of 'CCIT Group 4 FAX' and 'CCIT Group 3 FAX '.But for the files having compression type as 'LZW', i get a blank PDF file as output. Please do let me know is there a way of converting the LZW type tiff files. Thank You.

            R Offline
            R Offline
            Rajesh R Subramanian
            wrote on last edited by
            #5

            I don't get it. Are the tiff files compressed to an archive using LZW or the tiff compression itself uses the LZW algorithm to reduce size?

            It is a crappy thing, but it's life -^ Carlo Pallini

            S R 2 Replies Last reply
            0
            • R Rajesh R Subramanian

              I don't get it. Are the tiff files compressed to an archive using LZW or the tiff compression itself uses the LZW algorithm to reduce size?

              It is a crappy thing, but it's life -^ Carlo Pallini

              S Offline
              S Offline
              Stuart Dootson
              wrote on last edited by
              #6

              Rajesh R Subramanian wrote:

              the tiff compression itself uses the LZW algorithm

              That one. TIFF files can use many different compression formats. I remember, many, many, many years ago, writing an encoder or decoder (can't remember which) for TIFF files with CCITT group 3 compression on an IBM mainframe using PL/I. That was an experience...

              Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

              1 Reply Last reply
              0
              • R Rajesh R Subramanian

                I don't get it. Are the tiff files compressed to an archive using LZW or the tiff compression itself uses the LZW algorithm to reduce size?

                It is a crappy thing, but it's life -^ Carlo Pallini

                R Offline
                R Offline
                raesa
                wrote on last edited by
                #7

                Hi.... Actually here i have been given a set of tiff files.Now when you go and look into each tiff file's page properties (View Menu -> Page properties), you will be able to see its compression type.My task requires the tiff files with 'LZW' type compression to be converted to PDF.Wheni execute the code that you had suggested in your previous link, i get a blank PDF file.It seems to work for the other tiff files with different compression type but for the LZW compression type it doesn't seem to work. I have no idea what to do. Please do let me know if you have any solution.Thanks alot.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups