How to embed the PDFjs into your C# Project

TL;DR is recommended if you're okay with just viewing PDFs. If you need more complicated features, then convert the PDF into base64 and pass it to a javascript function which decodes and call the which is implemented at viewer.js However, it's really, really slow. The example source is at If you needed … Continue reading How to embed the PDFjs into your C# Project

C# Conditional assembly reference

If you want to include assemblies conditionally upon its preprocessor from c# project, you can use Condition keyword. See the following snippet. xx.csproj <Reference Condition=" $(DefineConstants.Contains('XXX_LIB_OS')) " Include="DRVNAME1, Version=, Culture=neutral, PublicKeyToken=xxxxx, processorArchitecture=AMD64"> ... </Reference> <Reference Condition=" $(DefineConstants.Contains('XXX_LIB_APP')) " Include="APPNAME1, Version=, Culture=neutral, PublicKeyToken=xxxxxxx, processorArchitecture=AMD64"> ... </Reference> Then define the constant <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> <DebugSymbols>true</DebugSymbols> <OutputPath> ... … Continue reading C# Conditional assembly reference