From 86aa76cdb95189de6a617d14579fa527e95cdf92 Mon Sep 17 00:00:00 2001 From: Joseph Argento Date: Mon, 11 Mar 2024 16:04:27 -0500 Subject: [PATCH 01/17] Add QRCode sample. --- ContentModification/AddQRCode/AddQRCode.cs | 40 +++++++++++++ .../AddQRCode/AddQRCode.csproj | 59 +++++++++++++++++++ ContentModification/AddQRCode/App.config | 6 ++ ContentModification/README.md | 3 + 4 files changed, 108 insertions(+) create mode 100644 ContentModification/AddQRCode/AddQRCode.cs create mode 100644 ContentModification/AddQRCode/AddQRCode.csproj create mode 100644 ContentModification/AddQRCode/App.config diff --git a/ContentModification/AddQRCode/AddQRCode.cs b/ContentModification/AddQRCode/AddQRCode.cs new file mode 100644 index 0000000..5cd16aa --- /dev/null +++ b/ContentModification/AddQRCode/AddQRCode.cs @@ -0,0 +1,40 @@ +using System; +using Datalogics.PDFL; + +/* + * + * This sample shows how to add a QR barcode to a PDF page + * + * Copyright (c) 2024, Datalogics, Inc. All rights reserved. + * + */ +namespace AddCollection +{ + class AddQRCode + { + static void Main(string[] args) + { + Console.WriteLine("AddQRCode Sample:"); + + using (Library lib = new Library()) + { + Console.WriteLine("Initialized the library."); + + String sInput = Library.ResourceDirectory + "Sample_Input/sample_links.pdf"; + String sOutput = "../AddQRCode-out.pdf"; + + if (args.Length > 0) + sInput = args[0]; + + using (Document doc = new Document(sInput)) + { + Page page = doc.GetPage(0); + + page.AddQRBarcode("Datalogics", 72.0, page.CropBox.Top - 1.5 * 72.0, 72.0, 72.0); + + doc.Save(SaveFlags.Full, sOutput); + } + } + } + } +} diff --git a/ContentModification/AddQRCode/AddQRCode.csproj b/ContentModification/AddQRCode/AddQRCode.csproj new file mode 100644 index 0000000..e72a2dc --- /dev/null +++ b/ContentModification/AddQRCode/AddQRCode.csproj @@ -0,0 +1,59 @@ + + + + + Debug + x64 + {C5493EAE-45F6-4502-9D26-5BFEC574729F} + Exe + AddQRCode + AddQRCode + v4.7.2 + 512 + true + true + + + + + x64 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x64 + pdbonly + false + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + 18.* + + + + \ No newline at end of file diff --git a/ContentModification/AddQRCode/App.config b/ContentModification/AddQRCode/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/ContentModification/AddQRCode/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ContentModification/README.md b/ContentModification/README.md index 8b6c3ff..caeb696 100644 --- a/ContentModification/README.md +++ b/ContentModification/README.md @@ -4,6 +4,9 @@ Creates an action associated with a link annotation on a PDF page. ## ***AddCollection*** Adds a collection to a PDF document to turn that document into a PDF Portfolio. +## ***AddQRCode*** +Adds a QR barcode to the Page of a PDF document. + ## ***ChangeLayerConfiguration*** Sets the on/off states for Optional Content Groups (Layers) within a PDF document. From 779f3098b277726c6a4ba2f6be56293f66cc362b Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Tue, 19 Mar 2024 10:12:22 -0500 Subject: [PATCH 02/17] Add initial GitHub Actions workflow file --- .github/workflows/test-net-framework-samples.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/test-net-framework-samples.yml diff --git a/.github/workflows/test-net-framework-samples.yml b/.github/workflows/test-net-framework-samples.yml new file mode 100644 index 0000000..2fb4bb2 --- /dev/null +++ b/.github/workflows/test-net-framework-samples.yml @@ -0,0 +1,10 @@ +name: test-samples + +on: + pull_request: + push: + branches: [ develop, main ] + +jobs: + build-and-run-samples: + runs-on: windows-latest From 95051c8b141b570f7293ad9502f233f77f90c59c Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Tue, 19 Mar 2024 11:15:56 -0500 Subject: [PATCH 03/17] Build .NET Framework samples in Github Actions CI - Let's add the list of sample directories to the workflow file. - Added steps for checking out code, modifying PATH to include path to msbuild, and build sample solution files using MSBuild. - The reason we need to use MSBuild to build the samples in CI is because we are unable to install Visual Studio on the GitHub Actions runner. --- .../workflows/test-net-framework-samples.yml | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/.github/workflows/test-net-framework-samples.yml b/.github/workflows/test-net-framework-samples.yml index 2fb4bb2..e2ac8dc 100644 --- a/.github/workflows/test-net-framework-samples.yml +++ b/.github/workflows/test-net-framework-samples.yml @@ -8,3 +8,116 @@ on: jobs: build-and-run-samples: runs-on: windows-latest + defaults: + run: + shell: bash + strategy: + fail-fast: false + matrix: + dir: [ + 'Annotations/Annotations/', + 'Annotations/InkAnnotations/', + 'Annotations/LinkAnnotation/', + 'Annotations/PolygonAnnotations/', + 'Annotations/PolyLineAnnotations/', + 'ContentCreation/AddElements/', + 'ContentCreation/AddHeaderFooter/', + 'ContentCreation/Clips/', + 'ContentCreation/CreateBookmarks/', + 'ContentCreation/GradientShade/', + 'ContentCreation/MakeDocWithCalGrayColorSpace/', + 'ContentCreation/MakeDocWithCalRGBColorSpace/', + 'ContentCreation/MakeDocWithDeviceNColorSpace/', + 'ContentCreation/MakeDocWithICCBasedColorSpace/', + 'ContentCreation/MakeDocWithIndexedColorSpace/', + 'ContentCreation/MakeDocWithLabColorSpace/', + 'ContentCreation/MakeDocWithSeparationColorSpace/', + 'ContentCreation/NameTrees/', + 'ContentCreation/NumberTrees/', + 'ContentCreation/RemoteGoToActions/', + 'ContentCreation/WriteNChannelTiff/', + 'ContentModification/Action/', + 'ContentModification/AddCollection/', + 'ContentModification/ChangeLayerConfiguration/', + 'ContentModification/ChangeLinkColors/', + 'ContentModification/CreateLayer/', + 'ContentModification/ExtendedGraphicStates/', + 'ContentModification/FlattenTransparency/', + 'ContentModification/LaunchActions/', + 'ContentModification/MergePDF/', + 'ContentModification/PageLabels/', + 'ContentModification/PDFObject/', + 'ContentModification/UnderlinesAndHighlights/', + 'ContentModification/Watermark/', + 'Display/DisplayPDF/', + 'Display/DotNETViewer/', + 'Display/DotNETViewerComponent/', + 'Display/PDFObjectExplorer/', + 'DocumentConversion/ColorConvertDocument/', + 'DocumentConversion/ConvertToOffice/', + 'DocumentConversion/CreateDocFromXPS/', + 'DocumentConversion/Factur-XConverter/', + 'DocumentConversion/PDFAConverter/', + 'DocumentConversion/PDFXConverter/', + 'DocumentConversion/ZUGFeRDConverter/', + 'DocumentOptimization/PDFOptimize/', + 'Images/DocToImages/', + 'Images/DrawSeparations/', + 'Images/DrawToBitmap/', + 'Images/EPSSeparations/', + 'Images/GetSeparatedImages/', + 'Images/ImageEmbedICCProfile/', + 'Images/ImageExport/', + 'Images/ImageExtraction/', + 'Images/ImageFromStream/', + 'Images/ImageImport/', + 'Images/ImageResampling/', + 'Images/ImageSoftMask/', + 'Images/OutputPreview/', + 'Images/RasterizePage/', + 'InformationExtraction/ListBookmarks/', + 'InformationExtraction/ListInfo/', + 'InformationExtraction/ListLayers/', + 'InformationExtraction/ListPaths/', + 'InformationExtraction/Metadata/', + 'OpticalCharacterRecognition/AddTextToDocument/', + 'OpticalCharacterRecognition/AddTextToImage/', + 'Other/MemoryFileSystem/', + 'Other/StreamIO/', + 'Other/WebApplication/', + 'Printing/PrintPDF/', + 'Printing/PrintPDFGUI/', + 'Security/AddRegexRedaction/', + 'Security/Redactions/', + 'Text/AddGlyphs/', + 'Text/AddUnicodeText/', + 'Text/AddVerticalText/', + 'Text/ExtractAcroFormFieldData/', + 'Text/ExtractCJKTextByPatternMatch/', + 'Text/ExtractTextByPatternMatch/', + 'Text/ExtractTextByRegion/', + 'Text/ExtractTextFromAnnotations/', + 'Text/ExtractTextFromMultiRegions/', + 'Text/ExtractTextPreservingStyleAndPositionInfo/', + 'Text/ListWords/', + 'Text/RegexExtractText/', + 'Text/RegexTextSearch/', + 'Text/TextExtract/' + ] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + + - name: Print PATH variable + run: echo $PATH + + - name: Build samples + working-directory: ${{ matrix.dir }} + run: | + sample_name=$(basename "$PWD") + echo "Building $sample_name sample..." + msbuild.exe $sample_name.sln //p:Configuration=Release From 4759e3e3b1a2c40a5447603fc870f4586fb1028a Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Tue, 19 Mar 2024 13:05:46 -0500 Subject: [PATCH 04/17] Change GitHub runner to windows-2019 - The samples are targeting .NET Framework 4.7.2, and the windows-latest runner does not support it. Let's change the GitHub runner to windows-2019, which should support .NET Framework 4. --- .github/workflows/test-net-framework-samples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-net-framework-samples.yml b/.github/workflows/test-net-framework-samples.yml index e2ac8dc..15106b0 100644 --- a/.github/workflows/test-net-framework-samples.yml +++ b/.github/workflows/test-net-framework-samples.yml @@ -7,7 +7,7 @@ on: jobs: build-and-run-samples: - runs-on: windows-latest + runs-on: windows-2019 defaults: run: shell: bash From e4f859b0be6a099f6c96ebb10025576e64155a66 Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Wed, 20 Mar 2024 11:13:04 -0500 Subject: [PATCH 05/17] Add steps to install NuGet and necessary NuGet packages - That way, the msbuild command that builds the sample will be able to detect that the APDFL NuGet .NET Framework package is present on the GitHub runner. --- .github/workflows/test-net-framework-samples.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/test-net-framework-samples.yml b/.github/workflows/test-net-framework-samples.yml index 15106b0..059d15a 100644 --- a/.github/workflows/test-net-framework-samples.yml +++ b/.github/workflows/test-net-framework-samples.yml @@ -115,6 +115,16 @@ jobs: - name: Print PATH variable run: echo $PATH + - name: Setup NuGet.exe + uses: nuget/setup-nuget@v2 + + - name: Install NuGet packages + working-directory: ${{ matrix.dir }} + run: | + sample_name=$(basename "$PWD") + echo "Installing NuGet packages..." + nuget.exe restore $sample_name.sln + - name: Build samples working-directory: ${{ matrix.dir }} run: | From 76d1f001b3100520037164a568999f16ac6ddb9e Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Wed, 20 Mar 2024 12:00:22 -0500 Subject: [PATCH 06/17] Build samples with .csproj files instead of .sln files - Some of the samples do not have .sln files, so there were some failures while trying to install NuGet packages. Let's run the nuget restore and msbuild commands with the .csproj files instead. - The WebApplication sample doesn't have a .csproj or .sln file, so we will be unable to run it in CI. --- .github/workflows/test-net-framework-samples.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-net-framework-samples.yml b/.github/workflows/test-net-framework-samples.yml index 059d15a..87b5e40 100644 --- a/.github/workflows/test-net-framework-samples.yml +++ b/.github/workflows/test-net-framework-samples.yml @@ -84,7 +84,6 @@ jobs: 'OpticalCharacterRecognition/AddTextToImage/', 'Other/MemoryFileSystem/', 'Other/StreamIO/', - 'Other/WebApplication/', 'Printing/PrintPDF/', 'Printing/PrintPDFGUI/', 'Security/AddRegexRedaction/', @@ -123,11 +122,11 @@ jobs: run: | sample_name=$(basename "$PWD") echo "Installing NuGet packages..." - nuget.exe restore $sample_name.sln + nuget.exe restore $sample_name.csproj - name: Build samples working-directory: ${{ matrix.dir }} run: | sample_name=$(basename "$PWD") echo "Building $sample_name sample..." - msbuild.exe $sample_name.sln //p:Configuration=Release + msbuild.exe $sample_name.csproj //p:Configuration=Release From 9254ff4abba041aa20314ba14499f68b1ab0adaa Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Wed, 20 Mar 2024 13:29:26 -0500 Subject: [PATCH 07/17] Add x64 as platform for msbuild command - The Display samples were failing to build because a platform was not specified. Let's try specifying x64 as the platform to get past that error. --- .github/workflows/test-net-framework-samples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-net-framework-samples.yml b/.github/workflows/test-net-framework-samples.yml index 87b5e40..4888a9a 100644 --- a/.github/workflows/test-net-framework-samples.yml +++ b/.github/workflows/test-net-framework-samples.yml @@ -129,4 +129,4 @@ jobs: run: | sample_name=$(basename "$PWD") echo "Building $sample_name sample..." - msbuild.exe $sample_name.csproj //p:Configuration=Release + msbuild.exe $sample_name.csproj //p:Configuration=Release //p:Platform=x64 From cd8807a1ac0b1df7add6a776b7c09a954b4c9125 Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Wed, 20 Mar 2024 16:24:33 -0500 Subject: [PATCH 08/17] Build DotNETViewerComponent dependency with DotNETViewer sample - It seems that the DotNETViewer sample is reliant on the DotNETViewerComponent sample in order to build. Let's add some logic to the "Build samples" step, so that when we build the DotNetViewer sample the DotNETViewerComponent sample is also built. - The DotNETViewerComponent sample will also require the necessary NuGet packages to be installed when testing the DotNETViewer sample. Let's add some logic to the "Install NuGet packages" step to install the packages for DotNETViewerComponent when the workflow is testing the DotNETViewer sample. --- .github/workflows/test-net-framework-samples.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-net-framework-samples.yml b/.github/workflows/test-net-framework-samples.yml index 4888a9a..d93336f 100644 --- a/.github/workflows/test-net-framework-samples.yml +++ b/.github/workflows/test-net-framework-samples.yml @@ -122,11 +122,23 @@ jobs: run: | sample_name=$(basename "$PWD") echo "Installing NuGet packages..." - nuget.exe restore $sample_name.csproj + + if [ "$sample_name" == "DotNETViewer" ]; then + nuget.exe restore ../DotNETViewerComponent/DotNETViewerComponent.csproj + nuget.exe restore $sample_name.csproj + else + nuget.exe restore $sample_name.csproj + fi - name: Build samples working-directory: ${{ matrix.dir }} run: | sample_name=$(basename "$PWD") echo "Building $sample_name sample..." - msbuild.exe $sample_name.csproj //p:Configuration=Release //p:Platform=x64 + + if [ "$sample_name" == "DotNETViewer" ]; then + msbuild.exe ../DotNETViewerComponent/DotNETViewerComponent.csproj //p:Configuration=Release //p:Platform=x64 + msbuild.exe $sample_name.csproj //p:Configuration=Release //p:Platform=x64 + else + msbuild.exe $sample_name.csproj //p:Configuration=Release //p:Platform=x64 + fi From 8c71097921656abfe7e4bfcb03432bf1caacfcaa Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Thu, 21 Mar 2024 12:10:57 -0500 Subject: [PATCH 09/17] Add workflow step to run sample executables --- .github/workflows/test-net-framework-samples.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test-net-framework-samples.yml b/.github/workflows/test-net-framework-samples.yml index d93336f..028dec6 100644 --- a/.github/workflows/test-net-framework-samples.yml +++ b/.github/workflows/test-net-framework-samples.yml @@ -142,3 +142,9 @@ jobs: else msbuild.exe $sample_name.csproj //p:Configuration=Release //p:Platform=x64 fi + + - name: Run samples + working-directory: ${{ matrix.dir }} + run: | + sample_name=$(basename "$PWD") + bin/Release/$sample_name.exe From 8b696fe216eaf301dbe959df03bf4a9d36ad6114 Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Thu, 21 Mar 2024 12:38:28 -0500 Subject: [PATCH 10/17] Disable running the Printing samples in CI - The Printing samples actually need access to a printer, and the GitHub runner cannot be connected to one. Let's just disable the Printing samples, so they will not run in CI. --- .github/workflows/test-net-framework-samples.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-net-framework-samples.yml b/.github/workflows/test-net-framework-samples.yml index 028dec6..a298b59 100644 --- a/.github/workflows/test-net-framework-samples.yml +++ b/.github/workflows/test-net-framework-samples.yml @@ -147,4 +147,9 @@ jobs: working-directory: ${{ matrix.dir }} run: | sample_name=$(basename "$PWD") - bin/Release/$sample_name.exe + + if [ "$sample_name" != "PrintPDF" ] && [ "$sample_name" != "PrintPDFGUI" ]; then + bin/Release/$sample_name.exe + else + echo "$sample_name will not be run due to GitHub runner limitations." + fi From 26208da1b5be939b275863bb6ec84126f5483bc2 Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Thu, 21 Mar 2024 15:27:43 -0500 Subject: [PATCH 11/17] Disable running the Display samples in CI - The Display samples display a GUI for the user to interact with when run. However, the GitHub runner is not capable of displaying the GUI, so the job gets stuck. Let's disable those samples in CI to allow CI to move forward. --- .github/workflows/test-net-framework-samples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-net-framework-samples.yml b/.github/workflows/test-net-framework-samples.yml index a298b59..d3cd0c3 100644 --- a/.github/workflows/test-net-framework-samples.yml +++ b/.github/workflows/test-net-framework-samples.yml @@ -148,7 +148,7 @@ jobs: run: | sample_name=$(basename "$PWD") - if [ "$sample_name" != "PrintPDF" ] && [ "$sample_name" != "PrintPDFGUI" ]; then + if [ "$sample_name" != "PrintPDF" ] && [ "$sample_name" != "PrintPDFGUI" ] && [ "$sample_name" != "DisplayPDF" ] && [ "$sample_name" != "DotNETViewer" ] && [ "$sample_name" != "DotNETViewerComponent" ] && [ "$sample_name" != "PDFObjectExplorer" ]; then bin/Release/$sample_name.exe else echo "$sample_name will not be run due to GitHub runner limitations." From d86e90e9b9ef9e3abd9b5317a511aff838049ab8 Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Thu, 21 Mar 2024 16:43:00 -0500 Subject: [PATCH 12/17] Rename Factur-XConverter exe to match .csproj file - Also, correct a print statement in the ListPaths sample. --- DocumentConversion/Factur-XConverter/Factur-XConverter.csproj | 4 ++-- InformationExtraction/ListPaths/ListPaths.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DocumentConversion/Factur-XConverter/Factur-XConverter.csproj b/DocumentConversion/Factur-XConverter/Factur-XConverter.csproj index 3b7de51..13d5546 100644 --- a/DocumentConversion/Factur-XConverter/Factur-XConverter.csproj +++ b/DocumentConversion/Factur-XConverter/Factur-XConverter.csproj @@ -6,8 +6,8 @@ x64 {D5F40E4D-BDEF-4472-909A-C6441B594750} Exe - FacturXConverter - FacturXConverter + Factur-XConverter + Factur-XConverter v4.7.2 512 true diff --git a/InformationExtraction/ListPaths/ListPaths.cs b/InformationExtraction/ListPaths/ListPaths.cs index 63a7a8c..d7d6aaa 100644 --- a/InformationExtraction/ListPaths/ListPaths.cs +++ b/InformationExtraction/ListPaths/ListPaths.cs @@ -17,7 +17,7 @@ class ListPaths { static void Main(string[] args) { - Console.WriteLine("ListLayers Sample:"); + Console.WriteLine("ListPaths Sample:"); using (Library lib = new Library()) { From 6e847d9e3fc72e7013408ac8aec98044759a1fc5 Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Fri, 22 Mar 2024 11:26:59 -0500 Subject: [PATCH 13/17] Call DocToImages sample with necessary command line arguments - The DocToImages sample was failing to run in CI because it requires some additional command line arguments. Let's add some logic to the "Run samples" step to run the DocToImages sample with th appropriate arguments. --- .github/workflows/test-net-framework-samples.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-net-framework-samples.yml b/.github/workflows/test-net-framework-samples.yml index d3cd0c3..5e1fbd7 100644 --- a/.github/workflows/test-net-framework-samples.yml +++ b/.github/workflows/test-net-framework-samples.yml @@ -149,7 +149,11 @@ jobs: sample_name=$(basename "$PWD") if [ "$sample_name" != "PrintPDF" ] && [ "$sample_name" != "PrintPDFGUI" ] && [ "$sample_name" != "DisplayPDF" ] && [ "$sample_name" != "DotNETViewer" ] && [ "$sample_name" != "DotNETViewerComponent" ] && [ "$sample_name" != "PDFObjectExplorer" ]; then - bin/Release/$sample_name.exe + if [ "$sample_name" == "DocToImages" ]; then + bin/Release/$sample_name.exe -format=png $HOME/.nuget/packages/adobe.pdf.library.sampleinput/1.0.0/build/Resources/Sample_Input/ducky.pdf + else + bin/Release/$sample_name.exe + fi else echo "$sample_name will not be run due to GitHub runner limitations." fi From 6f82c1a7ffd57ca2f8aa117e2cd9da02d4e60a10 Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Fri, 22 Mar 2024 12:46:51 -0500 Subject: [PATCH 14/17] Save sample output files resulting from a CI build - Add a step that saves the sample directory name as an environment variable, which will be used to name the directory where the sample output will be saved. - Also, list files in a sample directory for more visibility on files that are present. --- .../workflows/test-net-framework-samples.yml | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-net-framework-samples.yml b/.github/workflows/test-net-framework-samples.yml index 5e1fbd7..59b1f18 100644 --- a/.github/workflows/test-net-framework-samples.yml +++ b/.github/workflows/test-net-framework-samples.yml @@ -6,7 +6,7 @@ on: branches: [ develop, main ] jobs: - build-and-run-samples: + test-samples: runs-on: windows-2019 defaults: run: @@ -157,3 +157,32 @@ jobs: else echo "$sample_name will not be run due to GitHub runner limitations." fi + + - name: Set sample_name variable + id: set-sample-name + working-directory: ${{matrix.dir}} + run: echo "SAMPLE_NAME=$(basename "$PWD")" >> "$GITHUB_ENV" + + - name: Save artifacts + uses: actions/upload-artifact@v4 + with: + name: output-${{ env.SAMPLE_NAME }} + path: | + ${{matrix.dir}}*.docx + ${{matrix.dir}}*.xslx + ${{matrix.dir}}*.pptx + ${{matrix.dir}}*.pdf + ${{matrix.dir}}*.tif + ${{matrix.dir}}*.png + ${{matrix.dir}}*.jpg + ${{matrix.dir}}*.eps + ${{matrix.dir}}*.tiff + ${{matrix.dir}}*.bmp + ${{matrix.dir}}*.gif + ${{matrix.dir}}*.json + ${{matrix.dir}}*.txt + ${{matrix.dir}}*.csv + + - name: List files + run: | + ls ${{matrix.dir}} From 8a8050cb620dcd66409a02c611ea13b1fe8a5b86 Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Tue, 26 Mar 2024 11:50:20 -0500 Subject: [PATCH 15/17] Correct the sample output paths so CI can find them - When CI goes to artifact the output files produced by the sample run, it can't find them. Let's have the samples dump their output in the sample directory. --- Annotations/InkAnnotations/InkAnnotations.cs | 4 ++-- Annotations/LinkAnnotation/LinkAnnotation.cs | 2 +- Annotations/PolyLineAnnotations/PolyLineAnnotations.cs | 2 +- Annotations/PolygonAnnotations/PolygonAnnotations.cs | 2 +- ContentCreation/AddElements/AddElements.cs | 2 +- ContentCreation/AddHeaderFooter/AddHeaderFooter.cs | 2 +- ContentCreation/Clips/Clips.cs | 2 +- ContentCreation/CreateBookmarks/CreateBookmarks.cs | 2 +- ContentCreation/GradientShade/GradientShade.cs | 2 +- .../MakeDocWithCalGrayColorSpace.cs | 2 +- .../MakeDocWithCalRGBColorSpace.cs | 2 +- .../MakeDocWithDeviceNColorSpace.cs | 2 +- .../MakeDocWithICCBasedColorSpace.cs | 2 +- .../MakeDocWithIndexedColorSpace.cs | 2 +- .../MakeDocWithLabColorSpace/MakeDocWithLabColorSpace.cs | 2 +- .../MakeDocWithSeparationColorSpace.cs | 2 +- ContentCreation/RemoteGoToActions/RemoteGoToActions.cs | 2 +- ContentCreation/WriteNChannelTiff/WriteNChannelTiff.cs | 2 +- ContentModification/Action/Action.cs | 2 +- ContentModification/AddCollection/AddCollection.cs | 2 +- .../ChangeLayerConfiguration/ChangeLayerConfiguration.cs | 2 +- ContentModification/ChangeLinkColors/ChangeLinkColors.cs | 2 +- ContentModification/CreateLayer/CreateLayer.cs | 2 +- .../ExtendedGraphicStates/ExtendedGraphicStates.cs | 2 +- .../FlattenTransparency/FlattenTransparency.cs | 4 ++-- ContentModification/LaunchActions/LaunchActions.cs | 2 +- ContentModification/PDFObject/PDFObject.cs | 2 +- .../UnderlinesAndHighlights/UnderlinesAndHighlights.cs | 6 +++--- ContentModification/Watermark/Watermark.cs | 4 ++-- .../ColorConvertDocument/ColorConvertDocument.cs | 2 +- DocumentConversion/CreateDocFromXPS/CreateDocFromXPS.cs | 2 +- DocumentConversion/PDFAConverter/PDFAConverter.cs | 2 +- DocumentConversion/PDFXConverter/PDFXConverter.cs | 2 +- DocumentOptimization/PDFOptimize/PDFOptimize.cs | 2 +- Images/DrawSeparations/DrawSeparations.cs | 2 +- Images/GetSeparatedImages/GetSeparatedImages.cs | 2 +- Images/ImageFromStream/ImageFromStream.cs | 4 ++-- Images/ImageImport/ImageImport.cs | 2 +- Images/ImageResampling/ImageResampling.cs | 2 +- Images/ImageSoftMask/ImageSoftMask.cs | 2 +- Images/RasterizePage/RasterizePage.cs | 2 +- InformationExtraction/ListInfo/ListInfo.cs | 2 +- InformationExtraction/Metadata/Metadata.cs | 2 +- .../AddTextToDocument/AddTextToDocument.cs | 2 +- .../AddTextToImage/AddTextToImage.cs | 2 +- Other/MemoryFileSystem/MemoryFileSystem.cs | 2 +- Other/StreamIO/StreamIO.cs | 4 ++-- Security/AddRegexRedaction/AddRegexRedaction.cs | 4 ++-- Security/Redactions/Redactions.cs | 4 ++-- Text/AddGlyphs/AddGlyphs.cs | 2 +- Text/AddUnicodeText/AddUnicodeText.cs | 2 +- Text/AddVerticalText/AddVerticalText.cs | 4 ++-- Text/ExtractAcroFormFieldData/ExtractAcroFormFieldData.cs | 2 +- .../ExtractCJKTextByPatternMatch.cs | 2 +- Text/ExtractTextByPatternMatch/ExtractTextByPatternMatch.cs | 2 +- Text/ExtractTextByRegion/ExtractTextByRegion.cs | 2 +- .../ExtractTextFromAnnotations.cs | 2 +- .../ExtractTextFromMultiRegions.cs | 2 +- .../ExtractTextPreservingStyleAndPositionInfo.cs | 2 +- Text/RegexExtractText/RegexExtractText.cs | 2 +- Text/RegexTextSearch/RegexTextSearch.cs | 2 +- 61 files changed, 71 insertions(+), 71 deletions(-) diff --git a/Annotations/InkAnnotations/InkAnnotations.cs b/Annotations/InkAnnotations/InkAnnotations.cs index 4cb1b0d..41dbf36 100644 --- a/Annotations/InkAnnotations/InkAnnotations.cs +++ b/Annotations/InkAnnotations/InkAnnotations.cs @@ -110,7 +110,7 @@ static void Main(string[] args) // Update the page's content and save the file with clipping page.UpdateContent(); - doc.Save(SaveFlags.Full, "../InkAnnotations-out1.pdf"); + doc.Save(SaveFlags.Full, "InkAnnotations-out1.pdf"); Console.WriteLine("Saved InkAnnotations-out1.pdf"); // Remove 0th scribble @@ -123,7 +123,7 @@ static void Main(string[] args) // Update the page's content and save the file with clipping page.UpdateContent(); - doc.Save(SaveFlags.Full, "../InkAnnotations-out2.pdf"); + doc.Save(SaveFlags.Full, "InkAnnotations-out2.pdf"); // Kill the doc object doc.Dispose(); diff --git a/Annotations/LinkAnnotation/LinkAnnotation.cs b/Annotations/LinkAnnotation/LinkAnnotation.cs index 288a269..ba4bb71 100644 --- a/Annotations/LinkAnnotation/LinkAnnotation.cs +++ b/Annotations/LinkAnnotation/LinkAnnotation.cs @@ -22,7 +22,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/sample.pdf"; - String sOutput = "../LinkAnnotation-out.pdf"; + String sOutput = "LinkAnnotation-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/Annotations/PolyLineAnnotations/PolyLineAnnotations.cs b/Annotations/PolyLineAnnotations/PolyLineAnnotations.cs index 7adc6fe..5da303b 100644 --- a/Annotations/PolyLineAnnotations/PolyLineAnnotations.cs +++ b/Annotations/PolyLineAnnotations/PolyLineAnnotations.cs @@ -24,7 +24,7 @@ static void Main(string[] args) { Console.WriteLine("Initialized the library."); - String sOutput = "../PolyLineAnnotations-out.pdf"; + String sOutput = "PolyLineAnnotations-out.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/Annotations/PolygonAnnotations/PolygonAnnotations.cs b/Annotations/PolygonAnnotations/PolygonAnnotations.cs index e11f405..1beaad0 100644 --- a/Annotations/PolygonAnnotations/PolygonAnnotations.cs +++ b/Annotations/PolygonAnnotations/PolygonAnnotations.cs @@ -24,7 +24,7 @@ static void Main(string[] args) { Console.WriteLine("Initialized the library."); - String sOutput = "../PolygonAnnotations-out.pdf"; + String sOutput = "PolygonAnnotations-out.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/ContentCreation/AddElements/AddElements.cs b/ContentCreation/AddElements/AddElements.cs index 7932ea8..e6daea5 100644 --- a/ContentCreation/AddElements/AddElements.cs +++ b/ContentCreation/AddElements/AddElements.cs @@ -26,7 +26,7 @@ static void Main(string[] args) { Console.WriteLine("Initialized the library."); - String sOutput = "../AddElements-out.pdf"; + String sOutput = "AddElements-out.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/ContentCreation/AddHeaderFooter/AddHeaderFooter.cs b/ContentCreation/AddHeaderFooter/AddHeaderFooter.cs index be1ac0c..ed66780 100644 --- a/ContentCreation/AddHeaderFooter/AddHeaderFooter.cs +++ b/ContentCreation/AddHeaderFooter/AddHeaderFooter.cs @@ -26,7 +26,7 @@ static void Main(string[] args) { Console.WriteLine("Initialized the library."); - String sOutput = "../AddHeaderFooter-out.pdf"; + String sOutput = "AddHeaderFooter-out.pdf"; Console.WriteLine("Output file: " + sOutput); diff --git a/ContentCreation/Clips/Clips.cs b/ContentCreation/Clips/Clips.cs index ef10f53..e09003a 100644 --- a/ContentCreation/Clips/Clips.cs +++ b/ContentCreation/Clips/Clips.cs @@ -24,7 +24,7 @@ static void Main(string[] args) { Console.WriteLine("Initialized the library."); - String sOutput = "../Clips-out.pdf"; + String sOutput = "Clips-out.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/ContentCreation/CreateBookmarks/CreateBookmarks.cs b/ContentCreation/CreateBookmarks/CreateBookmarks.cs index f3818ea..97c4c36 100644 --- a/ContentCreation/CreateBookmarks/CreateBookmarks.cs +++ b/ContentCreation/CreateBookmarks/CreateBookmarks.cs @@ -93,7 +93,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/sample.pdf"; - String sOutput = "../Bookmark-out.pdf"; + String sOutput = "Bookmark-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/ContentCreation/GradientShade/GradientShade.cs b/ContentCreation/GradientShade/GradientShade.cs index fe8fa1b..bb84b75 100644 --- a/ContentCreation/GradientShade/GradientShade.cs +++ b/ContentCreation/GradientShade/GradientShade.cs @@ -23,7 +23,7 @@ static void Main(string[] args) { Console.WriteLine("Initialized the library."); - String sOutput = "../GradientShade-out.pdf"; + String sOutput = "GradientShade-out.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/ContentCreation/MakeDocWithCalGrayColorSpace/MakeDocWithCalGrayColorSpace.cs b/ContentCreation/MakeDocWithCalGrayColorSpace/MakeDocWithCalGrayColorSpace.cs index 51b26c2..39ce3c3 100644 --- a/ContentCreation/MakeDocWithCalGrayColorSpace/MakeDocWithCalGrayColorSpace.cs +++ b/ContentCreation/MakeDocWithCalGrayColorSpace/MakeDocWithCalGrayColorSpace.cs @@ -19,7 +19,7 @@ static void Main(string[] args) using (Library lib = new Library()) { - String sOutput = "../CalGray-out.pdf"; + String sOutput = "CalGray-out.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/ContentCreation/MakeDocWithCalRGBColorSpace/MakeDocWithCalRGBColorSpace.cs b/ContentCreation/MakeDocWithCalRGBColorSpace/MakeDocWithCalRGBColorSpace.cs index 85a6516..4673032 100644 --- a/ContentCreation/MakeDocWithCalRGBColorSpace/MakeDocWithCalRGBColorSpace.cs +++ b/ContentCreation/MakeDocWithCalRGBColorSpace/MakeDocWithCalRGBColorSpace.cs @@ -19,7 +19,7 @@ static void Main(string[] args) { using (Library lib = new Library()) { - String sOutput = "../CalRGB-out.pdf"; + String sOutput = "CalRGB-out.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/ContentCreation/MakeDocWithDeviceNColorSpace/MakeDocWithDeviceNColorSpace.cs b/ContentCreation/MakeDocWithDeviceNColorSpace/MakeDocWithDeviceNColorSpace.cs index 384ccb3..3386946 100644 --- a/ContentCreation/MakeDocWithDeviceNColorSpace/MakeDocWithDeviceNColorSpace.cs +++ b/ContentCreation/MakeDocWithDeviceNColorSpace/MakeDocWithDeviceNColorSpace.cs @@ -18,7 +18,7 @@ static void Main(string[] args) { using (Library lib = new Library()) { - String sOutput = "../DeviceN-out.pdf"; + String sOutput = "DeviceN-out.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/ContentCreation/MakeDocWithICCBasedColorSpace/MakeDocWithICCBasedColorSpace.cs b/ContentCreation/MakeDocWithICCBasedColorSpace/MakeDocWithICCBasedColorSpace.cs index f43ca96..20a5dd6 100644 --- a/ContentCreation/MakeDocWithICCBasedColorSpace/MakeDocWithICCBasedColorSpace.cs +++ b/ContentCreation/MakeDocWithICCBasedColorSpace/MakeDocWithICCBasedColorSpace.cs @@ -20,7 +20,7 @@ static void Main(string[] args) { String sInput = Library.ResourceDirectory + "Sample_Input/sRGB_IEC61966-2-1_noBPC.icc"; - String sOutput = "../ICCBased-out.pdf"; + String sOutput = "ICCBased-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/ContentCreation/MakeDocWithIndexedColorSpace/MakeDocWithIndexedColorSpace.cs b/ContentCreation/MakeDocWithIndexedColorSpace/MakeDocWithIndexedColorSpace.cs index 23c4c36..64115aa 100644 --- a/ContentCreation/MakeDocWithIndexedColorSpace/MakeDocWithIndexedColorSpace.cs +++ b/ContentCreation/MakeDocWithIndexedColorSpace/MakeDocWithIndexedColorSpace.cs @@ -22,7 +22,7 @@ static void Main(string[] args) using (Library lib = new Library()) { - String sOutput = "../Indexed-out.pdf"; + String sOutput = "Indexed-out.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/ContentCreation/MakeDocWithLabColorSpace/MakeDocWithLabColorSpace.cs b/ContentCreation/MakeDocWithLabColorSpace/MakeDocWithLabColorSpace.cs index 23e9eea..0849148 100644 --- a/ContentCreation/MakeDocWithLabColorSpace/MakeDocWithLabColorSpace.cs +++ b/ContentCreation/MakeDocWithLabColorSpace/MakeDocWithLabColorSpace.cs @@ -22,7 +22,7 @@ static void Main(string[] args) using (Library lib = new Library()) { - String sOutput = "../Lab-out.pdf"; + String sOutput = "Lab-out.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/ContentCreation/MakeDocWithSeparationColorSpace/MakeDocWithSeparationColorSpace.cs b/ContentCreation/MakeDocWithSeparationColorSpace/MakeDocWithSeparationColorSpace.cs index 5ae9d36..60d41fc 100644 --- a/ContentCreation/MakeDocWithSeparationColorSpace/MakeDocWithSeparationColorSpace.cs +++ b/ContentCreation/MakeDocWithSeparationColorSpace/MakeDocWithSeparationColorSpace.cs @@ -19,7 +19,7 @@ static void Main(string[] args) using (Library lib = new Library()) { - String sOutput = "../Separation-out.pdf"; + String sOutput = "Separation-out.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/ContentCreation/RemoteGoToActions/RemoteGoToActions.cs b/ContentCreation/RemoteGoToActions/RemoteGoToActions.cs index ef1ffa4..acee91a 100644 --- a/ContentCreation/RemoteGoToActions/RemoteGoToActions.cs +++ b/ContentCreation/RemoteGoToActions/RemoteGoToActions.cs @@ -25,7 +25,7 @@ static void Main(string[] args) { String sFileSpec = Library.ResourceDirectory + "Sample_Input/ducky.pdf"; - String sOutput = "../RemoteGoToActions-out.pdf"; + String sOutput = "RemoteGoToActions-out.pdf"; if (args.Length > 0) sFileSpec = args[0]; diff --git a/ContentCreation/WriteNChannelTiff/WriteNChannelTiff.cs b/ContentCreation/WriteNChannelTiff/WriteNChannelTiff.cs index 9c395db..9ee98dc 100644 --- a/ContentCreation/WriteNChannelTiff/WriteNChannelTiff.cs +++ b/ContentCreation/WriteNChannelTiff/WriteNChannelTiff.cs @@ -27,7 +27,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/sample.pdf"; - String sOutput = "../WriteNChannelTiff-out.tif"; + String sOutput = "WriteNChannelTiff-out.tif"; if(args.Length > 0) sInput = args[0]; diff --git a/ContentModification/Action/Action.cs b/ContentModification/Action/Action.cs index 12d1f47..e5c80fa 100644 --- a/ContentModification/Action/Action.cs +++ b/ContentModification/Action/Action.cs @@ -19,7 +19,7 @@ static void Main(string[] args) using (Library lib = new Library()) { - String sOutput = "../Action-out.pdf"; + String sOutput = "Action-out.pdf"; Console.WriteLine("Initialized the library."); diff --git a/ContentModification/AddCollection/AddCollection.cs b/ContentModification/AddCollection/AddCollection.cs index f06916b..1073c9c 100644 --- a/ContentModification/AddCollection/AddCollection.cs +++ b/ContentModification/AddCollection/AddCollection.cs @@ -26,7 +26,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/Attachments.pdf"; - String sOutput = "../Portfolio.pdf"; + String sOutput = "Portfolio.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/ContentModification/ChangeLayerConfiguration/ChangeLayerConfiguration.cs b/ContentModification/ChangeLayerConfiguration/ChangeLayerConfiguration.cs index 716f2ab..3dc4607 100644 --- a/ContentModification/ChangeLayerConfiguration/ChangeLayerConfiguration.cs +++ b/ContentModification/ChangeLayerConfiguration/ChangeLayerConfiguration.cs @@ -76,7 +76,7 @@ static void Main(string[] args) */ String sInput = Library.ResourceDirectory + "Sample_Input/Layers.pdf"; - String sOutput = "../ChangeLayerConfiguration-out.pdf"; + String sOutput = "ChangeLayerConfiguration-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/ContentModification/ChangeLinkColors/ChangeLinkColors.cs b/ContentModification/ChangeLinkColors/ChangeLinkColors.cs index 4fc7b65..bbf8a4f 100644 --- a/ContentModification/ChangeLinkColors/ChangeLinkColors.cs +++ b/ContentModification/ChangeLinkColors/ChangeLinkColors.cs @@ -27,7 +27,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/sample_links.pdf"; - String sOutput = "../ChangeLinkColors-out.pdf"; + String sOutput = "ChangeLinkColors-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/ContentModification/CreateLayer/CreateLayer.cs b/ContentModification/CreateLayer/CreateLayer.cs index c952144..289f1b4 100644 --- a/ContentModification/CreateLayer/CreateLayer.cs +++ b/ContentModification/CreateLayer/CreateLayer.cs @@ -28,7 +28,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/ducky.pdf"; - String sOutput = "../CreateLayer-out.pdf"; + String sOutput = "CreateLayer-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/ContentModification/ExtendedGraphicStates/ExtendedGraphicStates.cs b/ContentModification/ExtendedGraphicStates/ExtendedGraphicStates.cs index bfefde6..c71669f 100644 --- a/ContentModification/ExtendedGraphicStates/ExtendedGraphicStates.cs +++ b/ContentModification/ExtendedGraphicStates/ExtendedGraphicStates.cs @@ -169,7 +169,7 @@ static void Main(string[] args) String sInput1 = Library.ResourceDirectory + "Sample_Input/ducky_alpha.tif"; String sInput2 = Library.ResourceDirectory + "Sample_Input/rainbow.tif"; - String sOutput = "../ExtendedGraphicStates-out.pdf"; + String sOutput = "ExtendedGraphicStates-out.pdf"; if (args.Length > 0) sInput1 = args[0]; diff --git a/ContentModification/FlattenTransparency/FlattenTransparency.cs b/ContentModification/FlattenTransparency/FlattenTransparency.cs index f0023e4..96261f5 100644 --- a/ContentModification/FlattenTransparency/FlattenTransparency.cs +++ b/ContentModification/FlattenTransparency/FlattenTransparency.cs @@ -31,9 +31,9 @@ static void Main(string[] args) { String sInput1 = Library.ResourceDirectory + "Sample_Input/trans_1page.pdf"; - String sOutput1 = "../FlattenTransparency-out1.pdf"; + String sOutput1 = "FlattenTransparency-out1.pdf"; String sInput2 = Library.ResourceDirectory + "Sample_Input/trans_multipage.pdf"; - String sOutput2 = "../FlattenTransparency-out2.pdf"; + String sOutput2 = "FlattenTransparency-out2.pdf"; if (args.Length > 0) sInput1 = args[0]; diff --git a/ContentModification/LaunchActions/LaunchActions.cs b/ContentModification/LaunchActions/LaunchActions.cs index 2e6d6ee..8a1f214 100644 --- a/ContentModification/LaunchActions/LaunchActions.cs +++ b/ContentModification/LaunchActions/LaunchActions.cs @@ -25,7 +25,7 @@ static void Main(string[] args) { String sInput = Library.ResourceDirectory + "Sample_Input/ducky.pdf"; - String sOutput = "../LaunchActions-out.pdf"; + String sOutput = "LaunchActions-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/ContentModification/PDFObject/PDFObject.cs b/ContentModification/PDFObject/PDFObject.cs index af3a00d..ac81d00 100644 --- a/ContentModification/PDFObject/PDFObject.cs +++ b/ContentModification/PDFObject/PDFObject.cs @@ -26,7 +26,7 @@ static void Main(string[] args) { String sInput = Library.ResourceDirectory + "Sample_Input/sample_links.pdf"; - String sOutput = "../PDFObject-out.pdf"; + String sOutput = "PDFObject-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/ContentModification/UnderlinesAndHighlights/UnderlinesAndHighlights.cs b/ContentModification/UnderlinesAndHighlights/UnderlinesAndHighlights.cs index f71d182..182dcdd 100644 --- a/ContentModification/UnderlinesAndHighlights/UnderlinesAndHighlights.cs +++ b/ContentModification/UnderlinesAndHighlights/UnderlinesAndHighlights.cs @@ -7,8 +7,8 @@ * * This program shows how to add annotations to an existing PDF file that will highlight and underline words. * When you run it, the program generates a PDF output file. The output sample annotates a PDF file showing - * a National Weather Service web page, highlighting the word Cloudy wherever it appears and underlining - * the word Rain. + * a National Weather Service web page, highlighting the word �Cloudy� wherever it appears and underlining + * the word �Rain.� * * Copyright (c) 2007-2023, Datalogics, Inc. All rights reserved. * @@ -26,7 +26,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/sample.pdf"; - String sOutput = "../UnderlinesAndHighlights-out.pdf"; + String sOutput = "UnderlinesAndHighlights-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/ContentModification/Watermark/Watermark.cs b/ContentModification/Watermark/Watermark.cs index a97d0c0..819b5a3 100644 --- a/ContentModification/Watermark/Watermark.cs +++ b/ContentModification/Watermark/Watermark.cs @@ -8,7 +8,7 @@ * * The Watermark sample program shows how to create a watermark and copy it to a new PDF file. * You could use this code to create a message to apply to PDF files you select, like - * Confidential or Draft Copy. Or you might want to place a copyright statement over + * �Confidential� or �Draft Copy.� Or you might want to place a copyright statement over * a set of photographs shown in a PDF file so that they cannot be easily duplicated without * the permission of the owner. * @@ -29,7 +29,7 @@ static void Main(string[] args) String sInput = Library.ResourceDirectory + "Sample_Input/sample.pdf"; String sWatermark = Library.ResourceDirectory + "Sample_Input/ducky.pdf"; - String sOutput = "../Watermark-out.pdf"; + String sOutput = "Watermark-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/DocumentConversion/ColorConvertDocument/ColorConvertDocument.cs b/DocumentConversion/ColorConvertDocument/ColorConvertDocument.cs index 5e2a654..8627731 100644 --- a/DocumentConversion/ColorConvertDocument/ColorConvertDocument.cs +++ b/DocumentConversion/ColorConvertDocument/ColorConvertDocument.cs @@ -32,7 +32,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/ducky.pdf"; - String sOutput = "../ColorConvertDocument-out.pdf"; + String sOutput = "ColorConvertDocument-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/DocumentConversion/CreateDocFromXPS/CreateDocFromXPS.cs b/DocumentConversion/CreateDocFromXPS/CreateDocFromXPS.cs index 54ba990..348cc9d 100644 --- a/DocumentConversion/CreateDocFromXPS/CreateDocFromXPS.cs +++ b/DocumentConversion/CreateDocFromXPS/CreateDocFromXPS.cs @@ -26,7 +26,7 @@ static void Main(string[] args) { String sInput = Library.ResourceDirectory + "Sample_Input/brownfox.xps"; - String sOutput = "../CreateDocFromXPS-out.pdf"; + String sOutput = "CreateDocFromXPS-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/DocumentConversion/PDFAConverter/PDFAConverter.cs b/DocumentConversion/PDFAConverter/PDFAConverter.cs index 4d0cb75..c616cfe 100644 --- a/DocumentConversion/PDFAConverter/PDFAConverter.cs +++ b/DocumentConversion/PDFAConverter/PDFAConverter.cs @@ -24,7 +24,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/ducky.pdf"; - String sOutput = "../PDFAConverter-out.pdf"; + String sOutput = "PDFAConverter-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/DocumentConversion/PDFXConverter/PDFXConverter.cs b/DocumentConversion/PDFXConverter/PDFXConverter.cs index 7afd7a5..deab217 100644 --- a/DocumentConversion/PDFXConverter/PDFXConverter.cs +++ b/DocumentConversion/PDFXConverter/PDFXConverter.cs @@ -25,7 +25,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/sample.pdf"; - String sOutput = "../PDFXConverter-out.pdf"; + String sOutput = "PDFXConverter-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/DocumentOptimization/PDFOptimize/PDFOptimize.cs b/DocumentOptimization/PDFOptimize/PDFOptimize.cs index 2981685..f73c328 100644 --- a/DocumentOptimization/PDFOptimize/PDFOptimize.cs +++ b/DocumentOptimization/PDFOptimize/PDFOptimize.cs @@ -28,7 +28,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/sample.pdf"; - String sOutput = "../PDFOptimizer-out.pdf"; + String sOutput = "PDFOptimizer-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/Images/DrawSeparations/DrawSeparations.cs b/Images/DrawSeparations/DrawSeparations.cs index 1e54499..883c58b 100644 --- a/Images/DrawSeparations/DrawSeparations.cs +++ b/Images/DrawSeparations/DrawSeparations.cs @@ -27,7 +27,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/ducky.pdf"; - String sOutput = "../DrawSeparations-out"; + String sOutput = "DrawSeparations-out"; if (args.Length > 0) sInput = args[0]; diff --git a/Images/GetSeparatedImages/GetSeparatedImages.cs b/Images/GetSeparatedImages/GetSeparatedImages.cs index e4a5509..3c2c905 100644 --- a/Images/GetSeparatedImages/GetSeparatedImages.cs +++ b/Images/GetSeparatedImages/GetSeparatedImages.cs @@ -24,7 +24,7 @@ static void Main(string[] args) Console.WriteLine("GetSeparatedImages Sample:"); String sInput = Library.ResourceDirectory + "Sample_Input/ducky.pdf"; - String sOutput = "../GetSeparatedImages-out.tiff"; + String sOutput = "GetSeparatedImages-out.tiff"; if (args.Length > 0) sInput = args[0]; diff --git a/Images/ImageFromStream/ImageFromStream.cs b/Images/ImageFromStream/ImageFromStream.cs index 7653947..80bad5f 100644 --- a/Images/ImageFromStream/ImageFromStream.cs +++ b/Images/ImageFromStream/ImageFromStream.cs @@ -30,8 +30,8 @@ static void Main(string[] args) String bitmapInput = Library.ResourceDirectory + "Sample_Input/Datalogics.bmp"; String jpegInput = Library.ResourceDirectory + "Sample_Input/ducky.jpg"; - String pngOutput = "../ImageFromStream-out.png"; - String docOutput = "../ImageFromStream-out2.pdf"; + String pngOutput = "ImageFromStream-out.png"; + String docOutput = "ImageFromStream-out2.pdf"; if (args.Length > 0) bitmapInput = args[0]; diff --git a/Images/ImageImport/ImageImport.cs b/Images/ImageImport/ImageImport.cs index 01761de..6e2530b 100644 --- a/Images/ImageImport/ImageImport.cs +++ b/Images/ImageImport/ImageImport.cs @@ -28,7 +28,7 @@ static void Main(string[] args) Document doc = new Document(); String sInput = Library.ResourceDirectory + "Sample_Input/ducky.jpg"; - String sOutput = "../ImageImport-out1.pdf"; + String sOutput = "ImageImport-out1.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/Images/ImageResampling/ImageResampling.cs b/Images/ImageResampling/ImageResampling.cs index d066b45..0bf1ee8 100644 --- a/Images/ImageResampling/ImageResampling.cs +++ b/Images/ImageResampling/ImageResampling.cs @@ -78,7 +78,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/ducky.pdf"; - String sOutput = "../ImageResampling-out.pdf"; + String sOutput = "ImageResampling-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/Images/ImageSoftMask/ImageSoftMask.cs b/Images/ImageSoftMask/ImageSoftMask.cs index fb2f311..2398501 100644 --- a/Images/ImageSoftMask/ImageSoftMask.cs +++ b/Images/ImageSoftMask/ImageSoftMask.cs @@ -27,7 +27,7 @@ static void Main(string[] args) String sInput = Library.ResourceDirectory + "Sample_Input/ducky.jpg"; String sMask = Library.ResourceDirectory + "Sample_Input/Mask.tif"; - String sOutput = "../ImageSoftMask-out.pdf"; + String sOutput = "ImageSoftMask-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/Images/RasterizePage/RasterizePage.cs b/Images/RasterizePage/RasterizePage.cs index 1b8341c..887b232 100644 --- a/Images/RasterizePage/RasterizePage.cs +++ b/Images/RasterizePage/RasterizePage.cs @@ -41,7 +41,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/ducky.pdf"; - String sOutput = "../RasterizePage.pdf"; + String sOutput = "RasterizePage.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/InformationExtraction/ListInfo/ListInfo.cs b/InformationExtraction/ListInfo/ListInfo.cs index e5fcef2..a9c1c5f 100644 --- a/InformationExtraction/ListInfo/ListInfo.cs +++ b/InformationExtraction/ListInfo/ListInfo.cs @@ -26,7 +26,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/sample.pdf"; - String sOutput = "../ListInfo-out.pdf"; + String sOutput = "ListInfo-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/InformationExtraction/Metadata/Metadata.cs b/InformationExtraction/Metadata/Metadata.cs index a196dc3..698389a 100644 --- a/InformationExtraction/Metadata/Metadata.cs +++ b/InformationExtraction/Metadata/Metadata.cs @@ -24,7 +24,7 @@ static void Main(string[] args) String sInput1 = Library.ResourceDirectory + "Sample_Input/sample.pdf"; String sInput2 = Library.ResourceDirectory + "Sample_Input/Ducky_with_metadata.pdf"; - String sOutput = "../sample-metadata-out.pdf"; + String sOutput = "sample-metadata-out.pdf"; if (args.Length > 0) sInput1 = args[0]; diff --git a/OpticalCharacterRecognition/AddTextToDocument/AddTextToDocument.cs b/OpticalCharacterRecognition/AddTextToDocument/AddTextToDocument.cs index 19e5e74..0c3b0e4 100644 --- a/OpticalCharacterRecognition/AddTextToDocument/AddTextToDocument.cs +++ b/OpticalCharacterRecognition/AddTextToDocument/AddTextToDocument.cs @@ -55,7 +55,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/scanned_images.pdf"; - String sOutput = "../AddTextToDocument-out.pdf"; + String sOutput = "AddTextToDocument-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/OpticalCharacterRecognition/AddTextToImage/AddTextToImage.cs b/OpticalCharacterRecognition/AddTextToImage/AddTextToImage.cs index d2dc427..f25e89f 100644 --- a/OpticalCharacterRecognition/AddTextToImage/AddTextToImage.cs +++ b/OpticalCharacterRecognition/AddTextToImage/AddTextToImage.cs @@ -24,7 +24,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/text_as_image.jpg"; - String sOutput = "../AddTextToImage-out.pdf"; + String sOutput = "AddTextToImage-out.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/Other/MemoryFileSystem/MemoryFileSystem.cs b/Other/MemoryFileSystem/MemoryFileSystem.cs index 0d94cb8..0176730 100644 --- a/Other/MemoryFileSystem/MemoryFileSystem.cs +++ b/Other/MemoryFileSystem/MemoryFileSystem.cs @@ -27,7 +27,7 @@ static void Main(string[] args) { Console.WriteLine("Initialized the library."); - String sOutput = "../TempFileSystem.pdf"; + String sOutput = "TempFileSystem.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/Other/StreamIO/StreamIO.cs b/Other/StreamIO/StreamIO.cs index 89249f9..752ad67 100644 --- a/Other/StreamIO/StreamIO.cs +++ b/Other/StreamIO/StreamIO.cs @@ -120,8 +120,8 @@ static void Main(string[] args) { String sInput = Library.ResourceDirectory + "Sample_Input/sample.pdf"; - String sOutput1 = "../StreamIO-out1.pdf"; - String sOutput2 = "../StreamIO-out2.pdf"; + String sOutput1 = "StreamIO-out1.pdf"; + String sOutput2 = "StreamIO-out2.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/Security/AddRegexRedaction/AddRegexRedaction.cs b/Security/AddRegexRedaction/AddRegexRedaction.cs index de8669c..7725895 100644 --- a/Security/AddRegexRedaction/AddRegexRedaction.cs +++ b/Security/AddRegexRedaction/AddRegexRedaction.cs @@ -25,8 +25,8 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/AddRegexRedaction.pdf"; - String sOutput1 = "../AddRegexRedaction-out.pdf"; - String sOutput2 = "../AddRegexRedaction-out-applied.pdf"; + String sOutput1 = "AddRegexRedaction-out.pdf"; + String sOutput2 = "AddRegexRedaction-out-applied.pdf"; // Highlight and redact occurrences of the phrases that match this regular expression. // Uncomment only the one you are interested in seeing displayed redacted. diff --git a/Security/Redactions/Redactions.cs b/Security/Redactions/Redactions.cs index e424405..ff82eec 100644 --- a/Security/Redactions/Redactions.cs +++ b/Security/Redactions/Redactions.cs @@ -23,8 +23,8 @@ static void Main(string[] args) { Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/sample.pdf"; - String sOutput1 = "../Redactions-out.pdf"; - String sOutput2 = "../Redactions-out-applied.pdf"; + String sOutput1 = "Redactions-out.pdf"; + String sOutput2 = "Redactions-out-applied.pdf"; if (args.Length > 0) sInput = args[0]; diff --git a/Text/AddGlyphs/AddGlyphs.cs b/Text/AddGlyphs/AddGlyphs.cs index b7f7cc2..97e1e59 100644 --- a/Text/AddGlyphs/AddGlyphs.cs +++ b/Text/AddGlyphs/AddGlyphs.cs @@ -23,7 +23,7 @@ static void Main(string[] args) { Console.WriteLine("Initialized the library."); - String sOutput = "../AddGlyphs-out.pdf"; + String sOutput = "AddGlyphs-out.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/Text/AddUnicodeText/AddUnicodeText.cs b/Text/AddUnicodeText/AddUnicodeText.cs index c1a1cbe..b485acc 100644 --- a/Text/AddUnicodeText/AddUnicodeText.cs +++ b/Text/AddUnicodeText/AddUnicodeText.cs @@ -23,7 +23,7 @@ static void Main(string[] args) { Console.WriteLine("Initialized the library."); - String sOutput = "../AddUnicodeText-out.pdf"; + String sOutput = "AddUnicodeText-out.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/Text/AddVerticalText/AddVerticalText.cs b/Text/AddVerticalText/AddVerticalText.cs index 4c26b49..13b7545 100644 --- a/Text/AddVerticalText/AddVerticalText.cs +++ b/Text/AddVerticalText/AddVerticalText.cs @@ -6,7 +6,7 @@ /* * * This program describes how to render text from top to bottom on a page. The program provides - * a WritingMode Vertical with a string of Unicode characters to present sample text. + * a WritingMode �Vertical� with a string of Unicode characters to present sample text. * * The sample offers several rows of Unicode characters. The sample PDF file thus presents multiple columns * of vertical text. The characters appear in English as well as Mandarin, Japanese, and Korean. @@ -27,7 +27,7 @@ static void Main(string[] args) { Console.WriteLine("Initialized the library."); - String sOutput = "../AddVerticalText-out.pdf"; + String sOutput = "AddVerticalText-out.pdf"; if (args.Length > 0) sOutput = args[0]; diff --git a/Text/ExtractAcroFormFieldData/ExtractAcroFormFieldData.cs b/Text/ExtractAcroFormFieldData/ExtractAcroFormFieldData.cs index ec73198..e02997f 100644 --- a/Text/ExtractAcroFormFieldData/ExtractAcroFormFieldData.cs +++ b/Text/ExtractAcroFormFieldData/ExtractAcroFormFieldData.cs @@ -16,7 +16,7 @@ class ExtractAcroFormFieldData { // Set Defaults static String sInput = Library.ResourceDirectory + "Sample_Input/ExtractAcroFormFieldData.pdf"; - static String sOutput = "../ExtractAcroFormFieldData-out.json"; + static String sOutput = "ExtractAcroFormFieldData-out.json"; static void Print(AcroFormTextFieldObject t) { diff --git a/Text/ExtractCJKTextByPatternMatch/ExtractCJKTextByPatternMatch.cs b/Text/ExtractCJKTextByPatternMatch/ExtractCJKTextByPatternMatch.cs index b7533ad..7c94ad4 100644 --- a/Text/ExtractCJKTextByPatternMatch/ExtractCJKTextByPatternMatch.cs +++ b/Text/ExtractCJKTextByPatternMatch/ExtractCJKTextByPatternMatch.cs @@ -23,7 +23,7 @@ static void Main(string[] args) // Set Defaults String sInput = Library.ResourceDirectory + "Sample_Input/ExtractUnicodeText.pdf"; - String sOutput = "../ExtractCJKTextByPatternMatch-out.txt"; + String sOutput = "ExtractCJKTextByPatternMatch-out.txt"; String sPattern = "『世界人権宣言』"; using (Document doc = new Document(sInput)) diff --git a/Text/ExtractTextByPatternMatch/ExtractTextByPatternMatch.cs b/Text/ExtractTextByPatternMatch/ExtractTextByPatternMatch.cs index a54ff55..0f8a088 100644 --- a/Text/ExtractTextByPatternMatch/ExtractTextByPatternMatch.cs +++ b/Text/ExtractTextByPatternMatch/ExtractTextByPatternMatch.cs @@ -23,7 +23,7 @@ static void Main(string[] args) // Set Defaults String sInput = Library.ResourceDirectory + "Sample_Input/ExtractTextByPatternMatch.pdf"; - String sOutput = "../ExtractTextByPatternMatch-out.txt"; + String sOutput = "ExtractTextByPatternMatch-out.txt"; String sPattern = "((1-)?(\\()?\\d{3}(\\))?(\\s)?(-)?\\d{3}-\\d{4})"; // phone numbers using (Document doc = new Document(sInput)) diff --git a/Text/ExtractTextByRegion/ExtractTextByRegion.cs b/Text/ExtractTextByRegion/ExtractTextByRegion.cs index e44d945..98914fc 100644 --- a/Text/ExtractTextByRegion/ExtractTextByRegion.cs +++ b/Text/ExtractTextByRegion/ExtractTextByRegion.cs @@ -16,7 +16,7 @@ class ExtractTextByRegion { // Set Defaults static String sInput = Library.ResourceDirectory + "Sample_Input/ExtractTextByRegion.pdf"; - static String sOutput = "../ExtractTextByRegion-out.txt"; + static String sOutput = "ExtractTextByRegion-out.txt"; // Rectangular region to extract text in points (origin of the page is bottom left) // (545,576,694,710) is a rectangle encompassing the invoice entry for this sample. diff --git a/Text/ExtractTextFromAnnotations/ExtractTextFromAnnotations.cs b/Text/ExtractTextFromAnnotations/ExtractTextFromAnnotations.cs index 62c07b6..2099eed 100644 --- a/Text/ExtractTextFromAnnotations/ExtractTextFromAnnotations.cs +++ b/Text/ExtractTextFromAnnotations/ExtractTextFromAnnotations.cs @@ -19,7 +19,7 @@ class ExtractTextFromAnnotations // Set Defaults static String sInput = Library.ResourceDirectory + "Sample_Input/sample_annotations.pdf"; - static String sOutput = "../ExtractTextFromAnnotations-out.json"; + static String sOutput = "ExtractTextFromAnnotations-out.json"; static void Print(AnnotationTextObject t) { diff --git a/Text/ExtractTextFromMultiRegions/ExtractTextFromMultiRegions.cs b/Text/ExtractTextFromMultiRegions/ExtractTextFromMultiRegions.cs index f8cbf7d..49eddf8 100644 --- a/Text/ExtractTextFromMultiRegions/ExtractTextFromMultiRegions.cs +++ b/Text/ExtractTextFromMultiRegions/ExtractTextFromMultiRegions.cs @@ -17,7 +17,7 @@ class ExtractTextFromMultiRegions { // Set Defaults static String sInput = Library.ResourceDirectory + "Sample_Input/ExtractTextFromMultiRegions"; - static String sOutput = "../ExtractTextFromMultiRegions-out.csv"; + static String sOutput = "ExtractTextFromMultiRegions-out.csv"; // Rectangular regions to extract text in points (origin of the page is bottom left) // (Left, Right, Bottom, Top) diff --git a/Text/ExtractTextPreservingStyleAndPositionInfo/ExtractTextPreservingStyleAndPositionInfo.cs b/Text/ExtractTextPreservingStyleAndPositionInfo/ExtractTextPreservingStyleAndPositionInfo.cs index 5de37dd..bb31c4a 100644 --- a/Text/ExtractTextPreservingStyleAndPositionInfo/ExtractTextPreservingStyleAndPositionInfo.cs +++ b/Text/ExtractTextPreservingStyleAndPositionInfo/ExtractTextPreservingStyleAndPositionInfo.cs @@ -20,7 +20,7 @@ class ExtractTextPreservingStyleAndPositionInfo { // Set Defaults static String sInput = Library.ResourceDirectory + "Sample_Input/sample.pdf"; - static String sOutput = "../ExtractTextPreservingStyleAndPositionInfo-out.json"; + static String sOutput = "ExtractTextPreservingStyleAndPositionInfo-out.json"; static void Main(string[] args) { diff --git a/Text/RegexExtractText/RegexExtractText.cs b/Text/RegexExtractText/RegexExtractText.cs index f6b446f..38d346d 100644 --- a/Text/RegexExtractText/RegexExtractText.cs +++ b/Text/RegexExtractText/RegexExtractText.cs @@ -111,7 +111,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/RegexExtractText.pdf"; - String sOutput = "../RegexExtractText-out.json"; + String sOutput = "RegexExtractText-out.json"; // Uncomment only one regular expression you are interested in seeing the match information of (as a JSON file). // Phone numbers diff --git a/Text/RegexTextSearch/RegexTextSearch.cs b/Text/RegexTextSearch/RegexTextSearch.cs index 00b003a..1a78bca 100644 --- a/Text/RegexTextSearch/RegexTextSearch.cs +++ b/Text/RegexTextSearch/RegexTextSearch.cs @@ -25,7 +25,7 @@ static void Main(string[] args) Console.WriteLine("Initialized the library."); String sInput = Library.ResourceDirectory + "Sample_Input/RegexTextSearch.pdf"; - String sOutput = "../RegexTextSearch-out.pdf"; + String sOutput = "RegexTextSearch-out.pdf"; // Highlight occurrences of the phrases that match this regular expression. // Uncomment only the one you are interested in seeing displayed with highlights. From 5e4fc8ae0ca7d80f63d12db85c3b67f43f127aee Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Wed, 27 Mar 2024 11:27:17 -0500 Subject: [PATCH 16/17] Correct issues with quotes in sample descriptions --- .../UnderlinesAndHighlights/UnderlinesAndHighlights.cs | 4 ++-- ContentModification/Watermark/Watermark.cs | 2 +- Text/AddVerticalText/AddVerticalText.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ContentModification/UnderlinesAndHighlights/UnderlinesAndHighlights.cs b/ContentModification/UnderlinesAndHighlights/UnderlinesAndHighlights.cs index 182dcdd..11a7c75 100644 --- a/ContentModification/UnderlinesAndHighlights/UnderlinesAndHighlights.cs +++ b/ContentModification/UnderlinesAndHighlights/UnderlinesAndHighlights.cs @@ -7,8 +7,8 @@ * * This program shows how to add annotations to an existing PDF file that will highlight and underline words. * When you run it, the program generates a PDF output file. The output sample annotates a PDF file showing - * a National Weather Service web page, highlighting the word �Cloudy� wherever it appears and underlining - * the word �Rain.� + * a National Weather Service web page, highlighting the word "Cloudy" wherever it appears and underlining + * the word "Rain." * * Copyright (c) 2007-2023, Datalogics, Inc. All rights reserved. * diff --git a/ContentModification/Watermark/Watermark.cs b/ContentModification/Watermark/Watermark.cs index 819b5a3..073dce4 100644 --- a/ContentModification/Watermark/Watermark.cs +++ b/ContentModification/Watermark/Watermark.cs @@ -8,7 +8,7 @@ * * The Watermark sample program shows how to create a watermark and copy it to a new PDF file. * You could use this code to create a message to apply to PDF files you select, like - * �Confidential� or �Draft Copy.� Or you might want to place a copyright statement over + * "Confidential" or "Draft Copy." Or you might want to place a copyright statement over * a set of photographs shown in a PDF file so that they cannot be easily duplicated without * the permission of the owner. * diff --git a/Text/AddVerticalText/AddVerticalText.cs b/Text/AddVerticalText/AddVerticalText.cs index 13b7545..883454b 100644 --- a/Text/AddVerticalText/AddVerticalText.cs +++ b/Text/AddVerticalText/AddVerticalText.cs @@ -6,7 +6,7 @@ /* * * This program describes how to render text from top to bottom on a page. The program provides - * a WritingMode �Vertical� with a string of Unicode characters to present sample text. + * a WritingMode "Vertical" with a string of Unicode characters to present sample text. * * The sample offers several rows of Unicode characters. The sample PDF file thus presents multiple columns * of vertical text. The characters appear in English as well as Mandarin, Japanese, and Korean. From 39689f1ae8925ea5bedfae84399c663fe78d99cc Mon Sep 17 00:00:00 2001 From: Joseph Argento Date: Tue, 2 Apr 2024 13:12:53 -0500 Subject: [PATCH 17/17] Fix render flag setting. Because Spot Colorants may only be part of Annotation appearances, to do a proper DeviceN rendering of all colorants this needs to be set. Otherwise we collect all the spot colorants including those of Annotation appearances and setup our DeviceN rendering with it....but at the same time we tell PDFL with our render flags "don't consider them", leading to scrambled output. --- Images/GetSeparatedImages/GetSeparatedImages.cs | 3 ++- Images/OutputPreview/OutputPreview.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Images/GetSeparatedImages/GetSeparatedImages.cs b/Images/GetSeparatedImages/GetSeparatedImages.cs index 3c2c905..1b54870 100644 --- a/Images/GetSeparatedImages/GetSeparatedImages.cs +++ b/Images/GetSeparatedImages/GetSeparatedImages.cs @@ -11,7 +11,7 @@ * This sample demonstrates drawing a list of grayscale separations from a PDF file to multi-paged TIFF file. * * - * Copyright (c) 2007-2023, Datalogics, Inc. All rights reserved. + * Copyright (c) 2007-2024, Datalogics, Inc. All rights reserved. * */ @@ -52,6 +52,7 @@ static void Main(string[] args) } PageImageParams pip = new PageImageParams(); + pip.PageDrawFlags = DrawFlags.UseAnnotFaces; pip.HorizontalResolution = 300; pip.VerticalResolution = 300; diff --git a/Images/OutputPreview/OutputPreview.cs b/Images/OutputPreview/OutputPreview.cs index 9370784..b358f6e 100644 --- a/Images/OutputPreview/OutputPreview.cs +++ b/Images/OutputPreview/OutputPreview.cs @@ -6,7 +6,7 @@ * This sample demonstrates creating an Output Preview Image which is used during Soft Proofing prior to printing to visualize combining different Colorants. * * - * Copyright (c)2023, Datalogics, Inc. All rights reserved. + * Copyright (c)2023-2024, Datalogics, Inc. All rights reserved. * */ @@ -75,6 +75,7 @@ static void Main(string[] args) } PageImageParams pip = new PageImageParams(); + pip.PageDrawFlags = DrawFlags.UseAnnotFaces; pip.HorizontalResolution = 300; pip.VerticalResolution = 300;