Click here to Skip to main content
11,415,390 members (78,230 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#3.0 C# C#4.0
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,
Posted 2-Feb-13 2:10am
Edited 2-Feb-13 2:32am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 9,270
1 OriginalGriff 7,512
2 Maciej Los 3,710
3 Abhinav S 3,325
4 Peter Leow 3,084

Advertise | Privacy | Mobile
Web03 | 2.8.150427.4 | Last Updated 2 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100