Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main from develop #28

Merged
merged 21 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
86aa76c
Add QRCode sample.
datalogics-josepha Mar 11, 2024
ab91637
Merge pull request #27 from datalogics-josepha/qr
datalogics-robl Mar 12, 2024
779f309
Add initial GitHub Actions workflow file
datalogics-saharay Mar 19, 2024
64cc95c
Merge pull request #29 from datalogics-saharay/add-initial-workflow
datalogics-aarroyo Mar 19, 2024
95051c8
Build .NET Framework samples in Github Actions CI
datalogics-saharay Mar 19, 2024
4759e3e
Change GitHub runner to windows-2019
datalogics-saharay Mar 19, 2024
e4f859b
Add steps to install NuGet and necessary NuGet packages
datalogics-saharay Mar 20, 2024
76d1f00
Build samples with .csproj files instead of .sln files
datalogics-saharay Mar 20, 2024
9254ff4
Add x64 as platform for msbuild command
datalogics-saharay Mar 20, 2024
cd8807a
Build DotNETViewerComponent dependency with DotNETViewer sample
datalogics-saharay Mar 20, 2024
8c71097
Add workflow step to run sample executables
datalogics-saharay Mar 21, 2024
8b696fe
Disable running the Printing samples in CI
datalogics-saharay Mar 21, 2024
26208da
Disable running the Display samples in CI
datalogics-saharay Mar 21, 2024
d86e90e
Rename Factur-XConverter exe to match .csproj file
datalogics-saharay Mar 21, 2024
6e847d9
Call DocToImages sample with necessary command line arguments
datalogics-saharay Mar 22, 2024
6f82c1a
Save sample output files resulting from a CI build
datalogics-saharay Mar 22, 2024
8a8050c
Correct the sample output paths so CI can find them
datalogics-saharay Mar 26, 2024
5e4fc8a
Correct issues with quotes in sample descriptions
datalogics-saharay Mar 27, 2024
7637212
Merge pull request #30 from datalogics-saharay/APDFL-5453-add-CI-for-…
datalogics-robl Mar 28, 2024
39689f1
Fix render flag setting.
datalogics-josepha Apr 2, 2024
b3bf46e
Merge pull request #31 from datalogics-josepha/fix
datalogics-rgailiunas Apr 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 188 additions & 0 deletions .github/workflows/test-net-framework-samples.yml
Original file line number Diff line number Diff line change
@@ -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}}
4 changes: 2 additions & 2 deletions Annotations/InkAnnotations/InkAnnotations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion Annotations/LinkAnnotation/LinkAnnotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion Annotations/PolyLineAnnotations/PolyLineAnnotations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion Annotations/PolygonAnnotations/PolygonAnnotations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion ContentCreation/AddElements/AddElements.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion ContentCreation/AddHeaderFooter/AddHeaderFooter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion ContentCreation/Clips/Clips.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion ContentCreation/CreateBookmarks/CreateBookmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion ContentCreation/GradientShade/GradientShade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion ContentCreation/RemoteGoToActions/RemoteGoToActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion ContentCreation/WriteNChannelTiff/WriteNChannelTiff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion ContentModification/Action/Action.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.");

Expand Down
2 changes: 1 addition & 1 deletion ContentModification/AddCollection/AddCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Loading
Loading