Includes PdfSharp DLL and few activities
Custom Activity(Merge PDF File)
To use iText Sharp library in Nuget custom package - Please suggest
Thanks for such a useful package “VaidotasKumza.PdfSharp.Activities”.
I am current using Merge PDF activity from above package (the version of package is prior to addition of GetPageCount activity).
I’m merging 3 PDFs using this activity. The PDF are named as follows:
Following are the arguments supplied to this activity:
Input: FolderPath - I am supply folder path where above PDF are present.
Output: MergedFilePath - Same folder & file name is XYZ_Combined.pdf
All PDFs are sorted into ascending order (numbers are used after underscore in PDF’s name).
As PDF’s name contains number, I’m assuming that this activity combines all the PDFs based on their name in ascending order.
This activity was working fine in DEV & UAT environment.
But in PROD, for most of PDF combination, it was producing result as expected. But it soons starts to combine PDFs in some arbitrary sequence.
There were no exception thrown by this activity. The end product i.e. combined were in a wrong sequence. Can u please help to resolve this issue?
Hey @Rohit, thanks for the feedback, I will look into this when I have time, probably later today.
I’m using Directory.GetFiles to get all PDFs from a folder now, right here in the remarks https://docs.microsoft.com/en-us/dotnet/api/system.io.directory.getfiles?view=netframework-4.7.2
it says " The order of the returned file names is not guaranteed; use the Sort() method if a specific sort order is required."
So until I update activities you can invoke this code
and use FilePathArray input instead of FolderPath
Thanks for the quick explanation @Timber.
Was really frustrated by behavior of this activity.
Now I got the logic.
Will use above proposed solution.
Waiting for new version of this package & many other future useful stuff from you.
I have tried to uninstalled and install again the package, but i still have not found the activities, eg:getpagecount.
Thanks for this activity helps us a lot. However, when we deploy the project to Orchestrator with this activity, we are getting this error
Is there anything we need to do to fix this ?