detect xps and oxps

Peter Volz 1,295 Reputation points
2024-01-27T20:07:05.0233333+00:00

Hello experts I wanna use Stream to open xps and oxps files and read the first bytes to detect if it's xps or oxps ? I think their difference is at least the 11th byte, anyone knows their magic numbers? For xps and oxps? Thanks.

Developer technologies | VB
Developer technologies | C#
{count} votes

Accepted answer
  1. Castorix31 90,686 Reputation points
    2024-01-27T23:18:38.21+00:00

    Open FixedDocumentSequence.fdseq from the file with ZipArchive, ZipArchiveEntry, ... There should be
    "http://schemas.microsoft.com/xps/2005/06" or "http://schemas.openxps.org/oxps/v1.0"

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.