Skip to content

Commit

Permalink
Merge pull request #21 from Didstopia/development
Browse files Browse the repository at this point in the history
Preparing for a new release
  • Loading branch information
Dids committed Mar 22, 2018
2 parents ee30100 + d21b088 commit df0ee64
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Didstopia.PDFSharp.Tests/Didstopia.PDFSharp.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<ReleaseVersion>1.0.0-beta5</ReleaseVersion>
<ReleaseVersion>1.0.0-beta6</ReleaseVersion>
<Description>A .NET Standard 2.0 library for reading, writing and editing PDF files.

This is a modified fork based on several OSS projects. For more information see the license.</Description>
Expand All @@ -19,7 +19,7 @@ This is a modified fork based on several OSS projects. For more information see
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0002" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.1" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Didstopia.PDFSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ Global
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
description = @A .NET Standard 2.0 library for reading, writing and editing PDF files.\r\n\r\nThis is a modified fork based on several OSS projects. For more information see the license.
version = 1.0.0-beta5
version = 1.0.0-beta6
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion Didstopia.PDFSharp/Didstopia.PDFSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ReleaseVersion>1.0.0-beta5</ReleaseVersion>
<ReleaseVersion>1.0.0-beta6</ReleaseVersion>
<VersionPrefix>0.0.1</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Authors>Didstopia, ststeiger, roceh, empira</Authors>
Expand Down
17 changes: 11 additions & 6 deletions Didstopia.PDFSharp/Drawing/XImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,22 @@ public static XImage FromImageSource(IImageSource imageSouce)
/// <param name="path">The path to a BMP, PNG, GIF, JPEG, TIFF, or PDF file.</param>
public static bool ExistsFile(string path)
{
// Support for "base64:" pseudo protocol is a MigraDoc feature, currently completely implemented in MigraDoc files. TODO: Does support for "base64:" make sense for PDFsharp? Probably not as PDFsharp can handle images from streams.
//if (path.StartsWith("base64:")) // The Image is stored in the string here, so the file exists.
// return true;

if (PdfReader.TestPdfFile(path) > 0)
// Support for "base64:" pseudo protocol is a MigraDoc feature, currently completely implemented in MigraDoc files. TODO: Does support for "base64:" make sense for PDFsharp? Probably not as PDFsharp can handle images from streams.
//if (path.StartsWith("base64:")) // The Image is stored in the string here, so the file exists.
// return true;

// NOTE: The old method below would try to validate the PDF file,
// which has nothing to do with checking for the existence of a file
return File.Exists(path);

/*if (PdfReader.TestPdfFile(path) > 0)
return true;
#if !NETFX_CORE && !UWP && !PORTABLE
return File.Exists(path);
#else
return false;
#endif
#endif*/
}

internal XImageState XImageState
Expand Down
2 changes: 1 addition & 1 deletion Didstopia.PDFSharp/Drawing/XPdfForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ internal XPdfForm(Stream stream)
/// <summary>
/// Creates an XPdfForm from a file.
/// </summary>
public static new XPdfForm FromFile(string path)
public static XPdfForm FromFile(string path)
{
// TODO: Same file should return same object (that's why the function is static).
return new XPdfForm(path);
Expand Down

0 comments on commit df0ee64

Please sign in to comment.