-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solution to reproduce the bug including the PDF
- Loading branch information
1 parent
7eeba65
commit 1caed02
Showing
7 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> | ||
</startup> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{53D8BFC3-4D33-4C51-BA1C-DA92D05177A4}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<RootNamespace>IronPdf_turn180degree_FormatBug</RootNamespace> | ||
<AssemblyName>IronPdf_turn180degree_FormatBug</AssemblyName> | ||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="IronPdf, Version=5.2.0.22321, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>packages\IronPdf.5.2.0.1\lib\net40\IronPdf.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Drawing" /> | ||
<Reference Include="System.Web" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="App.config" /> | ||
<None Include="packages.config" /> | ||
<None Include="test_formula.pdf"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<ProjectView>ShowAllFiles</ProjectView> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.28307.572 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IronPdf_turn180degree_FormatBug", "IronPdf_turn180degree_FormatBug.csproj", "{53D8BFC3-4D33-4C51-BA1C-DA92D05177A4}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{53D8BFC3-4D33-4C51-BA1C-DA92D05177A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{53D8BFC3-4D33-4C51-BA1C-DA92D05177A4}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{53D8BFC3-4D33-4C51-BA1C-DA92D05177A4}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{53D8BFC3-4D33-4C51-BA1C-DA92D05177A4}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {B7AB5CB2-8045-4A33-8C1E-63333E2BFA5A} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System.IO; | ||
using System.Reflection; | ||
using IronPdf; | ||
|
||
namespace IronPdf_turn180degree_FormatBug | ||
{ | ||
internal class Program | ||
{ | ||
private static void Main() | ||
{ | ||
var filenamePattern = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory + | ||
@"\test_formula#rotation#.pdf"; | ||
var rotated000 = filenamePattern.Replace("#rotation#", string.Empty); | ||
var rotated090 = filenamePattern.Replace("#rotation#", "_090"); | ||
var rotated180 = filenamePattern.Replace("#rotation#", "_180"); | ||
var rotated270 = filenamePattern.Replace("#rotation#", "_270"); | ||
var rotated360 = filenamePattern.Replace("#rotation#", "_360"); | ||
|
||
var pdf = new PdfDocument(rotated000); | ||
pdf.RotateAllPages(90); //90 | ||
while (!pdf.Stream.CanWrite) continue; | ||
|
||
pdf.SaveAs(rotated090); //incorrect | ||
pdf.RotateAllPages(90); //180 | ||
while (!pdf.Stream.CanWrite) continue; | ||
|
||
pdf.SaveAs(rotated180); //correct | ||
|
||
|
||
pdf.RotateAllPages(90); //270 | ||
while (!pdf.Stream.CanWrite) continue; | ||
|
||
pdf.SaveAs(rotated270); //incorrect | ||
|
||
|
||
pdf.RotateAllPages(90); //360 | ||
while (!pdf.Stream.CanWrite) continue; | ||
|
||
pdf.SaveAs(rotated360); //correct | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="IronPdf" version="5.2.0.1" targetFramework="net472" /> | ||
</packages> |
Binary file not shown.