1

Possible Duplicate:
Opening a PDF in WPF Application

Is there a way to load a PDF into a WPF FixedDocument or FlowDocument without 3rd party components?

Community
  • 1
  • 1
Boris Kafarov
  • 11
  • 1
  • 2
  • 2
    Yes, by parsing the PDF language yourself and building a FixedDocument manually from scratch. – Ross Feb 04 '12 at 14:57
  • If you manage to convert your PDF document into the XPS format, then you could load that into WPF natively. However, you’ll still probably need a third-party component for the conversion (unless you manually use the Microsoft XPS Document Writer). – Douglas Feb 04 '12 at 15:06

1 Answers1

1

You can do this by using a PDF converter to generate image files for each page in the PDF file and then combine these to a FixedDocument.

For the PDF conversion you can use Ghostscript (use the in-process gsdll32.dll). There is a GPL licensed version and a commercial version.

The drawback is that your documents are rendered during the conversion and you will not be able search the resulting FixedDocument or improve the quality by rendering it at a higher DPI.

Martin Liversage
  • 104,481
  • 22
  • 209
  • 256