VaidotasKumza.PdfSharp.Activities


#1

Includes PdfSharp DLL and few activities

Package: VaidotasKumza.PdfSharp.Activities
Author: @Timber


Custom Activity(Merge PDF File)
To use iText Sharp library in Nuget custom package - Please suggest
#2

Hi @Timber,

Thanks for such a useful package “VaidotasKumza.PdfSharp.Activities”.:grinning::grinning:

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:

  1. XYZ_1.pdf
  2. XYZ_2.pdf
  3. XYZ_3.pdf

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?


#3

Hey @Rohit, thanks for the feedback, I will look into this when I have time, probably later today.


#4

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 Capture
and use FilePathArray input instead of FolderPath


#5

Thanks for the quick explanation @Timber.

Was really frustrated by behavior of this activity.:sweat:
Now I got the logic. :grinning:

Will use above proposed solution.

Waiting for new version of this package & many other future useful stuff from you. :+1::+1:


#6

Dear Timber,

I have tried to uninstalled and install again the package, but i still have not found the activities, eg:getpagecount.


#7

Hi Timber
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 ?

Thank you
Abhishek