diff --git a/.github/workflows/test-net-framework-samples.yml b/.github/workflows/test-net-framework-samples.yml new file mode 100644 index 0000000..59b1f18 --- /dev/null +++ b/.github/workflows/test-net-framework-samples.yml @@ -0,0 +1,188 @@ +name: test-samples + +on: + pull_request: + push: + branches: [ develop, main ] + +jobs: + test-samples: + runs-on: windows-2019 + 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/', + '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: 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..." + + 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..." + + 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 + + - name: Run samples + working-directory: ${{ matrix.dir }} + run: | + sample_name=$(basename "$PWD") + + if [ "$sample_name" != "PrintPDF" ] && [ "$sample_name" != "PrintPDFGUI" ] && [ "$sample_name" != "DisplayPDF" ] && [ "$sample_name" != "DotNETViewer" ] && [ "$sample_name" != "DotNETViewerComponent" ] && [ "$sample_name" != "PDFObjectExplorer" ]; then + 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 + + - 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}} 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/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/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/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. diff --git a/ContentModification/UnderlinesAndHighlights/UnderlinesAndHighlights.cs b/ContentModification/UnderlinesAndHighlights/UnderlinesAndHighlights.cs index f71d182..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. * @@ -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..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. * @@ -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/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/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..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. * */ @@ -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]; @@ -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/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/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; 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/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()) { 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..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. @@ -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.