We have uploaded 0kB .xhtml file as binary component in Tridion and are trying to publish the binary using AddBinary.

Engine.PublishingContext.RenderedItem.AddBinary(binaryComponent, structureGroup)

When we publish the binary it is getting deployed as a 1kB file with NUL character.

Our requirement is to publish this as empty binary of 0kB.

Thanks for the help in advance.

  • Why do you need to publish a binary with 0 kb ?
    – Hiren Kaku
    Nov 18, 2015 at 20:59
  • What are you trying to achieve, and what have you tried so far? Is the output 1Kb or a single byte? (In which case, perhaps a string terminator) Is it a kilobyte of NUL characters? May 16, 2016 at 15:06

1 Answer 1


Can you try this :

Engine.PublishingContext.RenderedItem.AddBinary(item.GetAsStream(),filename,filename,null,"MIME Type");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.