0

I have created an EvevtReceiver with item was added and item was updated on document library. I am trying to upload a pdf into document library and save the modifieddate of pdf into a column called metadata in my dcoument library. i have tested the code by manually updating the column and it is working fine but when i am trying to load the pdf using pdf reader it is not working.

base.ItemAdded(properties);

    SPFile f = properties.ListItem.File;

    SPListItem currentItem = properties.ListItem;

    byte[] b = f.OpenBinary();

    PdfReader pdf = new PdfReader(b);

    properties.ListItem["Metadata"] = pdf.Info["Creator"];
    properties.ListItem.Update();
  • Please define "is not working" – Emaborsa Feb 11 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.