We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Merging 2 separate files(PDF + WORD/PDF) into 1 PDF

We have a requirement whereby we need to create a single PDF document by merging two separate documents - one of these could be either in Word or PDF format and the second one is always in PDF format.

The solution we have put in place is as follows:

  • We use Aspose.Word to convert the Word document into PDF (if the first document is not already in a PDF format
  • Then we use Aspose.PDF to merge the two PDF documents into a single PDF document
  • The challenge we are facing is that the resulting PDF doesn’t retain the fonts in the original documents and defaults to a specific default font (e.g. Arial) in those situations where the font in the original document is not stored in the server where Aspose.Word / PDF is executed.

Questions we have are:

  • Is it possible to convert a word document to PDF format and retain the actual fonts present in the original document without the need to install those fonts on the server side?
  • Is it possible to retain the fonts from the original PDF documents when merging them into a single document using Aspose.PDF without the need to install such fonts on the server?
  • Or do we need to install on the server every font that we require to be retained from the original document into the output PDF? Are there any considerations re type of font licence we need to bear in mind?
  • As an alternative, when Aspose.Word or Aspose.PDF encounter a font in the original document that is not present on the server, is it possible to have the relevant text copied as an image into the output PDF document?


We request you please create a separate topic for the above question in Aspose.Words forum category where you will be assisted accordingly.

You can try embedding fonts in the PDF document before merging it with other file.

It would always be better if you install all required fonts on the server. This way API will produce expected results. You can also disable the license verification by using below lines of the code:

Document document = new Document(dataDir + "threaddump.pdf");

About Aspose.Words, we again request you to post in respective forum category. As far as Aspose.PDF is concerned, we are afraid that this feature is not included in the API. Can you please share a sample source and expected output PDF for our reference so that we can further look into it?