Skip to content

Commit d9882e0

Browse files
PDFPig support (#962)
* Initial commit for PDF Pig support Issue: 105642 * Move PDFPig implementation to dotnetcore folder * Add exception catching in GxStartPage * Fix class naming error * Move the first 'documentBuilder.AddPage' to the init method to ensure the proper initialization of 'pageBuilder,' which is required for initializing 'gxXPage' * Support standard page size. * Fix System.NotSupportedException: Stream does not support reading. * Various PDF Pig report implementation fixes * Provide logging for not supported features * Read chosen report implementation from property value * Try create AddedImage from url and try create Type1 font from font name * Constructor with two arguments in GxReportBuilderPdf8 ended up invoking the default constructor of the base class which itext4. * Constructor with two arguments in GxReportBuilderPdf8 ended up invoking the default constructor of the base class which itext4. * _appPath was not being properly initialized. * Unify the PdfPig version with the one used in GxPdfReportsCS. * Remove and sort usings. Force build action. * Avoid NullReferenceException when handling unknown fonts just as Bold fonts. --------- Co-authored-by: Claudia Murialdo <cmurialdo@genexus.com>
1 parent 96e2a97 commit d9882e0

File tree

10 files changed

+1073
-14
lines changed

10 files changed

+1073
-14
lines changed

dotnet/src/dotnetcore/GxPdfReportsCS/GlobalSuppressions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:com.genexus.reports.NativeSharpFunctionsMS.getRegistrySubValues(System.String,System.String)~System.Collections.ArrayList")]
1717
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:com.genexus.reports.NativeSharpFunctionsMS.ReadRegKey(System.String)~System.String")]
1818
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:com.genexus.reports.MSPDFFontDescriptor.getTrueTypeFontLocation(System.String)~System.String")]
19-
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:com.genexus.reports.PDFReportItextBase.getAcrobatLocation~System.String")]
20-
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:com.genexus.reports.PDFReportItextBase.loadSubstituteTable")]
19+
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:com.genexus.reports.PDFReportBase.getAcrobatLocation~System.String")]
20+
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:com.genexus.reports.PDFReportBase.loadSubstituteTable")]

dotnet/src/dotnetcore/GxPdfReportsCS/GxPdfReportsCS.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
<ItemGroup>
1616
<EmbeddedResource Include="..\..\dotnetframework\GxPdfReportsCS\sRGB Color Space Profile.icm" Link="sRGB Color Space Profile.icm" />
1717
</ItemGroup>
18+
<ItemGroup>
19+
<PackageReference Include="PdfPig" Version="0.1.8" PrivateAssets="All"/>
20+
</ItemGroup>
1821

1922
<ItemGroup>
2023
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />

dotnet/src/dotnetcore/GxPdfReportsCS/PDFReportItext8.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class GxReportBuilderPdf8 : GxReportBuilderPdf
3535
public GxReportBuilderPdf8() { }
3636
public GxReportBuilderPdf8(string appPath, Stream outputStream)
3737
{
38-
38+
_appPath = appPath;
3939
_pdfReport = new com.genexus.reports.PDFReportItext8(appPath);
4040
if (outputStream != null)
4141
{
@@ -49,7 +49,7 @@ public GxReportBuilderPdf8(string appPath, Stream outputStream)
4949
namespace com.genexus.reports
5050
{
5151

52-
public class PDFReportItext8 : PDFReportItextBase
52+
public class PDFReportItext8 : PDFReportBase
5353
{
5454
static IGXLogger log = GXLoggerFactory.GetLogger<PDFReportItext8>();
5555

0 commit comments

Comments
 (0)