Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions RazorPDF/PdfResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

using System.Web.Mvc;

namespace RazorPDF
Expand Down
13 changes: 5 additions & 8 deletions RazorPDF/PdfView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
using System.Collections.Generic;

using System.IO;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Xml;
using System.Xml.Linq;
using iTextSharp.text;
using iTextSharp.text.html;
using iTextSharp.text.pdf;
Expand All @@ -39,8 +36,8 @@ public PdfView(ViewEngineResult result)
public void Render(ViewContext viewContext, TextWriter writer)
{
// generate view into string
var sb = new System.Text.StringBuilder();
TextWriter tw = new System.IO.StringWriter(sb);
var sb = new StringBuilder();
TextWriter tw = new StringWriter(sb);
_result.View.Render(viewContext, tw);
var resultCache = sb.ToString();

Expand Down Expand Up @@ -82,8 +79,8 @@ public void Render(ViewContext viewContext, TextWriter writer)

private static XmlTextReader GetXmlReader(string source)
{
byte[] byteArray = Encoding.UTF8.GetBytes(source);
MemoryStream stream = new MemoryStream(byteArray);
var byteArray = Encoding.UTF8.GetBytes(source);
var stream = new MemoryStream(byteArray);

var xtr = new XmlTextReader(stream);
xtr.WhitespaceHandling = WhitespaceHandling.None; // Helps iTextSharp parse
Expand Down
6 changes: 3 additions & 3 deletions RazorPDF/RazorPDF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RazorPDF</RootNamespace>
<AssemblyName>RazorPDF</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
Expand All @@ -36,8 +36,8 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="itextsharp, Version=4.1.2.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca">
<HintPath>..\packages\iTextSharp.4.1.2\lib\itextsharp.dll</HintPath>
<Reference Include="iTextSharp">
<HintPath>..\packages\iTextSharp-LGPL.4.1.6\lib\iTextSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion RazorPDF/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="iTextSharp" version="4.1.2" />
<package id="iTextSharp-LGPL" version="4.1.6" targetFramework="net40" />
</packages>