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#
  4. Programatically discover the version of a pdf file

Programatically discover the version of a pdf file

Scheduled Pinned Locked Moved C#
questionannouncement
3 Posts 2 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.
  • N Offline
    N Offline
    Neophyte30
    wrote on last edited by
    #1

    I would like to write a little helper app to identify pdf files in a shared folder that have been saved as version 1.5, as they should be 1.4 or earlier to be accessible to Acrobat Reader v5 I have been looking at using FileInfo - but I guess the metadata to identify the pdf version is hidden a little deeper? Can anyone point me in the right direction?

    L 1 Reply Last reply
    0
    • N Neophyte30

      I would like to write a little helper app to identify pdf files in a shared folder that have been saved as version 1.5, as they should be 1.4 or earlier to be accessible to Acrobat Reader v5 I have been looking at using FileInfo - but I guess the metadata to identify the pdf version is hidden a little deeper? Can anyone point me in the right direction?

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, AFAIK PDF files start with an "eye catcher" string that contains the version number. For 1.5 it is "25 50 44 46 2D 31 2E 35 0D" in hex byte values ("%PDF-1.5"+CR). So you should open and read the first few bytes and compare. :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      Happy 2008!


      N 1 Reply Last reply
      0
      • L Luc Pattyn

        Hi, AFAIK PDF files start with an "eye catcher" string that contains the version number. For 1.5 it is "25 50 44 46 2D 31 2E 35 0D" in hex byte values ("%PDF-1.5"+CR). So you should open and read the first few bytes and compare. :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        Happy 2008!


        N Offline
        N Offline
        Neophyte30
        wrote on last edited by
        #3

        //Works like a charm! Ta muchly! // :-D Ignore my previous response! Having written and executed my little applet, I didn't get any results. Which was odd, because I knew there were at least a few of these rogue files. On further investigation, it appears that the string says they are 1.4 - but are being reported on the properties-pdf tab as version 1.5. I'll dig a little deeper and get back to you.

        modified on Friday, January 11, 2008 8:14:52 AM

        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