Click here to Skip to main content
15,885,636 members
Articles / Desktop Programming / Windows Forms

View PDF files in C# using the Xpdf and muPDF library, Print PostScript.

Rate me:
Please Sign up or sign in to vote.
4.78/5 (39 votes)
26 Nov 2010GPL34 min read 1.6M   311   245  
Wrapper C# class written in C++\CLI and a sample implementation in C# to render PDF files.
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="8.00"
	Name="pdfutils"
	ProjectGUID="{5E3040DA-5B10-4D4F-AC72-281A4FE33793}"
	RootNamespace="pdfutils"
	Keyword="Win32Proj"
	>
	<Platforms>
		<Platform
			Name="Win32"
		/>
	</Platforms>
	<ToolFiles>
	</ToolFiles>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
			IntermediateDirectory="$(ConfigurationName)"
			ConfigurationType="1"
			UseOfMFC="2"
			CharacterSet="2"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories="&quot;..\..\xpdfWin\xpdf&quot;;&quot;..\..\xpdfWin\goo&quot;;&quot;..\..\xpdfWin\fofi&quot;;&quot;..\..\xpdfWin\splash&quot;;&quot;..\..\freetype-2.3.1\include&quot;"
				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
				MinimalRebuild="true"
				BasicRuntimeChecks="3"
				RuntimeLibrary="3"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				Detect64BitPortabilityProblems="true"
				DebugInformationFormat="4"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="..\..\bin\xpdf_D.lib"
				LinkIncremental="2"
				IgnoreDefaultLibraryNames="libcmt.lib; libcmtd.lib"
				GenerateDebugInformation="true"
				SubSystem="1"
				TargetMachine="1"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCAppVerifierTool"
			/>
			<Tool
				Name="VCWebDeploymentTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
			IntermediateDirectory="$(ConfigurationName)"
			ConfigurationType="1"
			UseOfMFC="2"
			CharacterSet="2"
			WholeProgramOptimization="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCCLCompilerTool"
				AdditionalIncludeDirectories="&quot;..\..\xpdfWin\xpdf&quot;;&quot;..\..\xpdfWin\goo&quot;;&quot;..\..\xpdfWin\fofi&quot;;&quot;..\..\xpdfWin\splash&quot;;&quot;..\..\freetype-2.3.1\include&quot;"
				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
				RuntimeLibrary="2"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				Detect64BitPortabilityProblems="true"
				DebugInformationFormat="3"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="..\..\bin\xpdf.lib"
				LinkIncremental="1"
				IgnoreDefaultLibraryNames="libcmt.lib"
				GenerateDebugInformation="true"
				SubSystem="1"
				OptimizeReferences="2"
				EnableCOMDATFolding="2"
				TargetMachine="1"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCAppVerifierTool"
			/>
			<Tool
				Name="VCWebDeploymentTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
	</Configurations>
	<References>
	</References>
	<Files>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
			>
			<File
				RelativePath="..\..\libAFPDFLib\jpeg.cpp"
				>
			</File>
			<File
				RelativePath=".\pdfutils.cpp"
				>
			</File>
			<File
				RelativePath=".\stdafx.cpp"
				>
			</File>
		</Filter>
		<Filter
			Name="Header Files"
			Filter="h;hpp;hxx;hm;inl;inc;xsd"
			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
			>
			<File
				RelativePath="..\..\libAFPDFLib\jpeg.h"
				>
			</File>
			<File
				RelativePath=".\stdafx.h"
				>
			</File>
		</Filter>
		<Filter
			Name="Resource Files"
			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
			>
		</Filter>
		<Filter
			Name="libjpg"
			>
			<File
				RelativePath="..\..\jpeg\cderror.h"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\cdjpeg.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\cdjpeg.h"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jcapimin.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jcapistd.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jccoefct.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jccolor.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jcdctmgr.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jchuff.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jchuff.h"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jcinit.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jcmainct.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jcmarker.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jcmaster.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jcomapi.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jconfig.h"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jcparam.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jcphuff.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jcprepct.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jcsample.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jctrans.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdapimin.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdapistd.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdatadst.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdatasrc.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdcoefct.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdcolor.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdct.h"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jddctmgr.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdhuff.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdhuff.h"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdinput.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdmainct.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdmarker.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdmaster.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdmerge.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdphuff.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdpostct.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdsample.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jdtrans.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jerror.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jerror.h"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jfdctflt.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jfdctfst.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jfdctint.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jidctflt.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jidctfst.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jidctint.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jidctred.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jinclude.h"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jmemansi.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jmemdosa.asm"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jmemmgr.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jmemsys.h"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jmorecfg.h"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jpegint.h"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jpeglib.h"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jquant1.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jquant2.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jutils.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\jversion.h"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\rdbmp.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\rdcolmap.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\rdgif.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\rdppm.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\rdrle.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\rdswitch.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\rdtarga.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\transupp.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\transupp.h"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\wrbmp.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\wrgif.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\wrppm.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\wrrle.c"
				>
			</File>
			<File
				RelativePath="..\..\jpeg\wrtarga.c"
				>
			</File>
		</Filter>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Engineer HidraQuim SA de CV
Mexico Mexico
I'm a Chemical Engineering that loves the programming.
2003 - Graduated from Technical Programmer UNIVA México.
2009 - Graduated from Chemical Engineering Universidad de Guadalajara, Mexico.
Programmer by Hobby since 6 years ago.

Comments and Discussions