Few clarifications

Hi,

I am evaluating Aspose Pdf kit for PDF merger capability and found it very good.

I have got few requirements in our project.Does Aspose Pdf support them?

  1. Ability to open password protected documents and merge them together
  2. To generate table of contents based on documents section.
  3. Ability to take documents to be merged from byte array or URI reference
  4. Ability to return merged document as byte array
  5. Ability to control security of the merged document which include SAVE.The option to disable saving of the document is mandatory.

Any help would be highly appreciated.

Prashant

Hello prashant,

Regarding your query related to Aspose.pdf.kit, following are the answers to your questions.

  1. Ability to open password protected documents and merge them together.

Answer) you can open any password protected pdf and can merge them. For this purpose, Aspose.pdf.kit has a class named PdfFileEditor, you can set the value for Ownerpassword property. For information on how to merge pdf files, please visit Concatenate PDF Documents

  1. To generate table of contents based on documents section

Answer) I am sorry to inform you that currently this feature is not supported by Aspose.pdf.kit

  1. Ability to take documents to be merged from byte array or URI reference

Answer) Aspose.pdf.kit supports concatenation of pdf files, if the input format of pdf file is, memory stream, IO stream or string variable containing path to the input pdf file. Your requirement can be achieved programmatically, if we take the input in the form of Byte array and convert it to Memory stream before we pass it merge the pdf files. For information on how to convert the byte array into memory stream, please visit MemoryStream Class (System.IO) | Microsoft Learn

  1. Ability to return merged document as byte array

Answer) you can achieve your requirement, once the files have been concatenated, return the output as memory stream and again convert it back into Byte array.

  1. Ability to control security of the merged document which include SAVE.The option to disable saving of the document is mandatory.

Answer) Aspose.pdf.kit supports the feature to set privileges over the pdf file, for related information on how to set privileges over pdf file, please visit Set Privileges on PDF Document.

one more thing, while setting security permissions, please use DocumentPrivilege instead of PdfPrivilege

Hi,

Thanks for the solutions.It resolves most of the queries i have.There are few doubts:

3) Ability to take documents to be merged from byte array or URI reference

Answer) Aspose.pdf.kit supports concatenation of pdf files, if the input format of pdf file is, memory stream, IO stream or string variable containing path to the input pdf file. Your requirement can be achieved programmatically, if we take the input in the form of Byte array and convert it to Memory stream before we pass it merge the pdf files. For information on how to convert the byte array into memory stream, please visit http://msdn.microsoft.com/en-us/library/system.io.memorystream.aspx

My Comments:Your solution is fine for byte array.But what about URI reference?

Does Aspose support URI reference facility?

5) Ability to control security of the merged document which include SAVE.The option to disable saving of the document is mandatory.

Answer) Aspose.pdf.kit supports the feature to set privileges over the pdf file, for related information on how to set privileges over pdf file, please visit Set Privileges on PDF Document.

My Comments:I am specifically looking for disabling/Enabling the SAVE option which i could not find in PDF Privilege enumeration.Does Aspose support this feature?

New Requirement

6).Extraction of text,image etc of each individual documents and merge them into a single document.

Thanks again for all your support so far.

Prashant

Hi Prashant,

Your solution is fine for byte array.But what about URI reference?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Does Aspose support URI reference facility?

My comment: URI reference is not supported directly in Aspose.Pdf.Kit. As a workaround you can create file stream from the URI by yourself.

I am specifically looking for disabling/Enabling the SAVE option which i could not find in PDF Privilege enumeration.Does Aspose support this feature?

My comment: This feature is not supported. The SAVE option can’t be disabled.

Extraction of text,image etc of each individual documents and merge them into a single document.

My comment: Extracting text and image is supported but I am afraid it is not easy to merge them into a single document. Can you please elaborate your requirement?