I am creating an asp.net web application in C # to convert a bunch of .xps files to .pdf , and I want to check the input file, which will be converted by content type, and not the file extension for security reasons.
.xps
.pdf
According to this resource, it will be application/vnd.ms-xpsdocument or application/oxps depending on the file
application/vnd.ms-xpsdocument
application/oxps
According to this file signature table signature of XPS files:
50 4B 03 04