Includes PdfSharp DLL and few activities

Package: VaidotasKumza.PdfSharp.Activities
Author: @Timber


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?

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 Directory.GetFiles Method (System.IO) | Microsoft Learn
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

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:

1 Like

Dear Timber,

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

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

Hi @Timber i have used your package we have used for merging pdfs it ran good ,but recently we have seen appintegration for pdf it a activity from uipath go to merge pdfs, we have combined dependency dlls in a absurb manner

currently we are running out of crazy issue
the issue is when we uninstall vaidotkumzpdfsharp activites from packages section the corresponding xaml in which we used merge pdfs was opening and wherever we used merge pdfs ativity we are getting a error message “activity could not be loaded because of errors in xaml”(its a general issue)
but the problem here is when we install vaidotkumzpdfsharp activites from packages section corresponding xaml is not opening , getting a error message “workflow document has encountered errors object reference is not set to instance of object”

previously when we get error message “activity could not be loaded because of errors in xaml” when we paste the package of vaidotkumzpdfsharp activites in packages folder of uipath then xaml opens successfully without any error

please kindly advise

This package is Available now?