Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.
Wed Nov 18, 2015 5:56 pm
Hi Spire Support,
Can I use SpirePDF to create a PDF Portfolio from multiple PDF files?
I need to combine separate digitally signed PDF's in one PDF Portfolio without invalidating my signatures.
Any assistance would be greatly appreciated.
Regards
Tjunas
-

Tjunas
-
- Posts: 18
- Joined: Thu Nov 05, 2015 6:40 am
Thu Nov 19, 2015 5:53 am
Hi Tjunas,
Thanks for your inquiry.
Sorry that at present our Spire.PDF doesn't support to create PDF Portfolio, but we have added it as new feature into our schedule. We will inform you when it is supported.
Share sample code for verifying the validity of digital signature:
- Code: Select all
using (var doc = new PdfDocument("..\\..\\one_valid_signature.pdf"))
{
var form = (PdfFormWidget)doc.Form;
for (int i = 0; i < form.FieldsWidget.Count; ++i)
{
var field = form.FieldsWidget[i] as PdfSignatureFieldWidget;
if (field != null && field.Signature != null)
{
PdfSignature signature = field.Signature;
//validity of the digital signature
bool bSignature = signature.VerifySignature();
}
}
}
Best Regards,
Amy
E-iceblue support team
-


amy.zhao
-
- Posts: 3044
- Joined: Wed Jun 27, 2012 8:50 am
Fri May 22, 2020 6:32 am
Hi Tjunas,
Sorry for long silence.
I am glad to inform you that our Spire products support creating a PDF Portfolio now. Please download and test
Spire.Office Platinum Version:5.5.1.
Nuget link:
https://www.nuget.org/packages/Spire.Office/5.5.1Website link:
https://www.e-iceblue.com/Download/down ... t-now.html- Code: Select all
String[] files = new String[]{ "File1.pdf", "File2.pdf" };
using (PdfDocument doc = new PdfDocument())
{
for (int i = 0; i < files.Length; i++)
{ doc.Collection.AddFile(files[i]); }
doc.SaveToFile("output.pdf", FileFormat.PDF);
doc.Dispose();
}
//Create sub folder and add file into it
string[] files = Directory.GetFiles(@"input/");
string inputFile_1 = "input.pdf";
using (PdfDocument doc = new PdfDocument(inputFile_1))
{
for (int i = 0; i < files.Length; i++)
{ doc.Collection.Folders.AddFile(files[i]); PdfFolder folder = doc.Collection.Folders.CreateSubfolder("SubFolder" + i); folder.AddFile(files[i]); }
doc.SaveToFile("output.pdf", FileFormat.PDF);
doc.Dispose();
}
Sincerely,
Amy
E-iceblue support team
-


amy.zhao
-
- Posts: 3044
- Joined: Wed Jun 27, 2012 8:50 am