create an XPS document

L

Lloyd Dupont

I would like to export my document has an XPS document.
I already have some printing code.

The problem which I am facing is making the whole process without dialog.

Through the print menu the user get a dialog where he can choose his printer
of choice among available printer, which can be the XPS output if it's
available. Then there is a second dialog letting him specify the output
file.

I would like to be able to do everything programatically so that I test if
the XPS printer is there and set the output file.

How do I do that?

I was thinking to set PrinterName to "Microsoft XPS Document Writer" but
it's obviously an internationalized english sentence and that won't work in
non english country...

Any tips?
 
L

Lloyd Dupont

Hi Kevin,
Thanks for the tip.
I wonder though, it looks quite hard to go from the GDI+ drawing method to
the XPS document constrution methods....
Any tips on that?
A Graphics.DrawXXX() => XPS method table?
 
K

Kevin Spencer

Hi Lloyd,

How hard it is to save as XPS depends on how your document and your current
printing code is constructed. Any document can be expressed in XML or XHTML,
except for the images and other binary content, using markup language. So,
you take the text portions of the document and translate them into the XPS
XML format, with references to the binary content, which is also stored in
the XPS file. The XPS file is essentially a compressed set of files and
folders, like a zip file, and in fact can be opened using WinZip or any
other zip file compression software.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
L

Lloyd Dupont

How hard it is to save as XPS depends on how your document and your
current printing code is constructed. Any document can be expressed in XML
or XHTML, except for the images and other binary content, using markup
language. So, you take the text portions of the document and translate
them into the XPS
well, here is a .. problem.
I don't use simple DrawString() call.
I used Uniscribe to decompose the text in glyphs and then I draw the glyphs
along curve....
But I will investigate... thanks for the tip.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top