Windows 2003 Indexing Service Custom Properties (PDF Files)

Greetings,

I am using DSOFile obj to save/retrieve custom file property (MyCustomProperty) information to PDF files (Works Great!)

I’d like to now include the MyCustomProperty to MS Index Service Catalog…

I changed the following reg setting as follows…

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex\Catalogs\MyIndex\Properties]

"B725F130-47EF-101A-A5F1-02608C9EEBAB MyCustomProperty"="31,128,1,1"

Then Stopped MIS and deleted the catalog files and restarted MIS…

When you view the property list from MMC the MyCustomPropery doesn’t show up…

Is this not possible I thought MIS was able to accept Custom Properties…

What am I doing wrong

Thanks for any assistance…

Sincerely confused,

JB



Answer this question

Windows 2003 Indexing Service Custom Properties (PDF Files)

  • MikeDai

    Phill - The version of DSO I used can be downloaded from the following site http://www.microsoft.com/downloads/details.aspx FamilyId=9BA6FAC6-520B-4A0A-878A-53EC8300C4C2&displaylang=en This version saved Custom File Properties to each file...be advised they wont show up using Adobe reader but when you reopen the PDF using DSO you will see the property and it's value in the Propery object.

    1st Problem - Unable to add Custom Properties to MS Indexing Services

    Solution - I was finally able to get MS indexing service to recognize my custom property (shows up in the Indexing Service “Property Set” column list. The solution was to stop the service, completely erase the existing catalog and then restart the service as to rebuild the catalog from scratch. There is also a timing issue in the way it uses the registry and the ControlSet001…002 and CurrentControlSet. Once I changed all related setting under each ControlSet it worked.

    2nd Problem - MSINDX query unable to find the my custom property stored in each PDF file.

    Possible Solution – The issue here is the MS Indexing Service IFilter interface to produce custom filters for other specific file formats (PDF). Adobe has it’s own IFilter dll which does not support custom properties. Possible solutions are various third party offerings in this arena which I will not pursue...too much time spent on this Custom Property approach.

    As far as increases your ability to accurately locate information within PDF files you can download Adobe free IFilter interface (PDF 6.0 Filter) - from the following location… http://www.adobe.com/support/downloads/detail.jsp ftpID=2611 It's abilities to find text is highly dependent on where data resides (table objects, footers, headers and such).

    Hope this helps...

    JB

    PS...FYI - For what it's worth Custom Properties work fine when using MS office documents (MS Office IFilter interface supports them)


  • Peediaj

    jbelisle - Thank you for the response. I have the same version of the DSOFile.dll you reference, but it won't let me update standard document properties in .pdf files (using vba/vbs). I get an error message when I try to do so. I can update standard document properties in Office files without problems. So, a couple questions if I may

    [1] Is there any special code you created to handle updates to .pdf files versus Office documents

    [2] I notice you refer to using DSOfile.dll to update the 'custom document properties' of .pdf files. Have you ever updated the 'standard document properties' of .pdf files this way (Maybe DSOFile.dll can't update anything but customedocument properties in .pdf files )


  • Shawn Rheal

    JB - I'm afraid I can't help you out, but I'm trying to get to the same place you are I think. Can you tell me where you got your version of the DSOFile.dll, or provide me with a copy of it The version I have won't write to .pdf files - and that's what I really need next. After that I'd also like to accomplish indexing of the pdf files.

    I can tell you one thing. Most Desktop search tools won't index a whole .pdf file. Just the first few paragraphs/pages. I'm guessing Windows indexing may have a similar limitation.

  • shmulik_segal

    Phill - 1. No...Custom Property save works the same on both .PDF and Office docs (no special coding)

    2. Unfortunately the only writeable file property object in DSOFile is the custom properties.

    If I have time I may attempt a retest querying custom PDF properties via WIS using Adobe 8.0...

    I'll be interested to know how you make out...

    Good luck!

    JB

    Bellow the vb code I created to set the PDF custom property

    Private Function SetCustomFileProperty(ByVal fName As String, _

    ByVal PropName As String, _

    ByVal PropData As Object, _

    ByVal PropType As DSOFile.dsoFilePropertyType)

    Dim ImpersonatContext As WindowsImpersonationContext

    Dim UserWi As WindowsIdentity

    Dim Cp As DSOFile.CustomProperty

    Dim Cpe As IEnumerator

    Dim bFound As Boolean = False

    Dim sAudit As String

    UserWi = WindowsIdentity.GetCurrent

    ImpersonatContext = UserWi.Impersonate()

    Dim Dso As New DSOFile.OleDocumentProperties

    Try

    'sAudit = Now.ToString & "|" & User.Identity.Name & "->"

    Dso.Open(fName)

    Cpe = Dso.CustomProperties.GetEnumerator()

    While (Cpe.MoveNext)

    Cp = Cpe.Current

    If Cp.Name = PropName Then

    bFound = True

    End If

    End While

    If Not bFound Then

    Dso.CustomProperties.Add(PropName, PropType)

    Cp = Dso.CustomProperties.Item(PropName)

    Select Case Cp.Type

    Case DSOFile.dsoFilePropertyType.dsoPropertyTypeString : Cp.Value = CType(PropData, String)

    Case DSOFile.dsoFilePropertyType.dsoPropertyTypeBool : Cp.Value = CType(PropData, Boolean)

    Case DSOFile.dsoFilePropertyType.dsoPropertyTypeDate : Cp.Value = CType(PropData, Date)

    Case DSOFile.dsoFilePropertyType.dsoPropertyTypeDouble : Cp.Value = CType(PropData, Double)

    Case DSOFile.dsoFilePropertyType.dsoPropertyTypeLong : Cp.Value = CType(PropData, Integer)

    End Select

    '& sAudit & PropData & vbLf

    Dso.Save()

    End If

    Catch ex As Exception

    lblAppError.Text = ex.Message

    Finally

    If Not Dso Is Nothing Then Dso.Close()

    If Not ImpersonatContext Is Nothing Then ImpersonatContext.Undo()

    End Try


  • shades921

    jbelisle - Thank you for the coding example. My code is decidedly simpler, meaning only that I obviously missed some fundamental requirements for making it work as I wish it to. I'll spend some studying this code and merge it into what I already have put together. Again, my heartfelt thanks. I've been working on this off and on for some time and yours is the first code I've seen that even manages to address updating custom properties without having to go to the source code of DSOFile, add some changes and recompile.
  • Jon Stroh

    Eric - Thanks for the Tip on handling .pdf files with windows indexing. I'm encouraged by the responses I've gotten to my original post. At least I know my goal is achieveable. I'm re-energized :>)
  • magicalclick

    No problemo...happy to contribute as many others have for me. :)


  • markep12

    Thanks for the Response Eric!

    I'll give Adobe 8.0 a try when time permits.

    JB


  • LLiu

    There are known compatibility issues with older versions of the PDF IFilter and WDS 3.0. I would encourage you to download version 8 of the Adobe Reader. This package contains a new version of the PDF IFilter that fixes this issue.

    Also there is a limit on the amount of text that can be indexed for a given document. No document can add more then 2 MB of additional data to the full text index. In reality this is pretty big and is actually large enough to fully index the Moby-Dick novel!



  • Windows 2003 Indexing Service Custom Properties (PDF Files)