Skip to content

Commit 0a36c24

Browse files
committed
Added support for prince_options[debug].
1 parent 245cdbc commit 0a36c24

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

docraptor.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
swagger: '2.0'
22

33
info:
4-
version: "0.0.1"
4+
version: "1.1.0"
55
title: DocRaptor v1
66

77
host: docraptor.com
@@ -277,6 +277,9 @@ definitions:
277277
disallow_modify:
278278
type: boolean
279279
description: Disallow modification of this PDF.
280+
debug:
281+
type: boolean
282+
description: Enable Prince debug mode.
280283
input:
281284
type: string
282285
description: Specify the input format.

src/main/csharp/DocRaptor/Client/Configuration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ public static String ToDebugReport()
266266
.GetExecutingAssembly()
267267
.GetReferencedAssemblies()
268268
.Where(x => x.Name == "System.Core").First().Version.ToString() + "\n";
269-
report += " Version of the API: 0.0.1\n";
269+
report += " Version of the API: 1.1.0\n";
270270
report += " SDK Package Version: 0.2.0\n";
271271

272272
return report;

src/main/csharp/DocRaptor/Model/PrinceOptions.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,14 @@ public enum InputEnum {
6464
/// <param name="DisallowCopy">Disallow copying of this PDF..</param>
6565
/// <param name="DisallowAnnotate">Disallow annotation of this PDF..</param>
6666
/// <param name="DisallowModify">Disallow modification of this PDF..</param>
67+
/// <param name="Debug">Enable Prince debug mode..</param>
6768
/// <param name="Input">Specify the input format. (default to InputEnum.Html).</param>
6869
/// <param name="Version">Specify a specific verison of PrinceXML to use..</param>
6970
/// <param name="Javascript">Enable PrinceXML JavaScript. DocRaptor JavaScript parsing is also available elsewhere..</param>
7071
/// <param name="CssDpi">Set the DPI when rendering CSS. Defaults to 96 but can be set with Prince 9.0 and up..</param>
7172
/// <param name="Profile">In Prince 9.0 and up you can set the PDF profile..</param>
7273

73-
public PrinceOptions(string Baseurl = null, bool? NoXinclude = null, bool? NoNetwork = null, string HttpUser = null, string HttpPassword = null, string HttpProxy = null, int? HttpTimeout = null, bool? Insecure = null, string Media = null, bool? NoAuthorStyle = null, bool? NoDefaultStyle = null, bool? NoEmbedFonts = null, bool? NoSubsetFonts = null, bool? NoCompress = null, bool? Encrypt = null, int? KeyBits = null, string UserPassword = null, string OwnerPassword = null, bool? DisallowPrint = null, bool? DisallowCopy = null, bool? DisallowAnnotate = null, bool? DisallowModify = null, InputEnum? Input = null, string Version = null, bool? Javascript = null, int? CssDpi = null, string Profile = null)
74+
public PrinceOptions(string Baseurl = null, bool? NoXinclude = null, bool? NoNetwork = null, string HttpUser = null, string HttpPassword = null, string HttpProxy = null, int? HttpTimeout = null, bool? Insecure = null, string Media = null, bool? NoAuthorStyle = null, bool? NoDefaultStyle = null, bool? NoEmbedFonts = null, bool? NoSubsetFonts = null, bool? NoCompress = null, bool? Encrypt = null, int? KeyBits = null, string UserPassword = null, string OwnerPassword = null, bool? DisallowPrint = null, bool? DisallowCopy = null, bool? DisallowAnnotate = null, bool? DisallowModify = null, bool? Debug = null, InputEnum? Input = null, string Version = null, bool? Javascript = null, int? CssDpi = null, string Profile = null)
7475
{
7576
this.Baseurl = Baseurl;
7677
this.NoXinclude = NoXinclude;
@@ -102,6 +103,7 @@ public PrinceOptions(string Baseurl = null, bool? NoXinclude = null, bool? NoNet
102103
this.DisallowCopy = DisallowCopy;
103104
this.DisallowAnnotate = DisallowAnnotate;
104105
this.DisallowModify = DisallowModify;
106+
this.Debug = Debug;
105107
// use default value if no "Input" provided
106108
if (Input == null)
107109
{
@@ -273,6 +275,13 @@ public PrinceOptions(string Baseurl = null, bool? NoXinclude = null, bool? NoNet
273275
[DataMember(Name="disallow_modify", EmitDefaultValue=false)]
274276
public bool? DisallowModify { get; set; }
275277

278+
/// <summary>
279+
/// Enable Prince debug mode.
280+
/// </summary>
281+
/// <value>Enable Prince debug mode.</value>
282+
[DataMember(Name="debug", EmitDefaultValue=false)]
283+
public bool? Debug { get; set; }
284+
276285
/// <summary>
277286
/// Specify a specific verison of PrinceXML to use.
278287
/// </summary>
@@ -331,6 +340,7 @@ public override string ToString()
331340
sb.Append(" DisallowCopy: ").Append(DisallowCopy).Append("\n");
332341
sb.Append(" DisallowAnnotate: ").Append(DisallowAnnotate).Append("\n");
333342
sb.Append(" DisallowModify: ").Append(DisallowModify).Append("\n");
343+
sb.Append(" Debug: ").Append(Debug).Append("\n");
334344
sb.Append(" Input: ").Append(Input).Append("\n");
335345
sb.Append(" Version: ").Append(Version).Append("\n");
336346
sb.Append(" Javascript: ").Append(Javascript).Append("\n");
@@ -483,6 +493,11 @@ public bool Equals(PrinceOptions other)
483493
this.DisallowModify != null &&
484494
this.DisallowModify.Equals(other.DisallowModify)
485495
) &&
496+
(
497+
this.Debug == other.Debug ||
498+
this.Debug != null &&
499+
this.Debug.Equals(other.Debug)
500+
) &&
486501
(
487502
this.Input == other.Input ||
488503
this.Input != null &&
@@ -588,6 +603,9 @@ public override int GetHashCode()
588603
if (this.DisallowModify != null)
589604
hash = hash * 59 + this.DisallowModify.GetHashCode();
590605

606+
if (this.Debug != null)
607+
hash = hash * 59 + this.Debug.GetHashCode();
608+
591609
if (this.Input != null)
592610
hash = hash * 59 + this.Input.GetHashCode();
593611

0 commit comments

Comments
 (0)