Click here to Skip to main content
15,442,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am creating XPS document using C#, that's fine but created document size is going high,
For example the document consists of 1 page and document size nearly 500kb,
file size maters in our application please help to decrease size of the document through coding.

Hope i would get a good solution from you all,

Thanking you all,
Updated 2-Feb-13 1:32am

1 solution

Without your code, and knowing what you are saving in the file, we can't really help you very much.

However, if extreme size is a problem, then XPS may well be the wrong format for you: a simple XPS file containing only the word "Hello." created by Word2010 is 83Kb, and adding a tiny 11K JPG to that takes it up to 93KB. If you are storing the wrong info, then XPS may have been a bad choice.

It is possible that the bulk of the file is overhead which allows it to work on any system - fonts and suchlike - and choosing a different format may reduce this significantly.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900