GemBox Support Forum

Failed to print merged PDFs

Hi there,

I use Gembox.Pdf (1.5) to merge different PDF streams to one PDF stream. I do that exactly as it is shown in the example.

The PDF stream is generated correctly (as far as I can say, because I can open the generated PDF in a PDF reader), but if I generate a XPS from the document, I get:

System.IO.FileFormatException: ‘Invalid file format.’

If I print the documents (the generated XPS) separately, everything is fine. So I think there must be something wrong with the merged document.

I could send you a example project with some PDFs to merge if you want.


Hi Günter,

Yes, please send us an example project that reproduces your issue so that we can investigate it.
You can submit a support ticket and send the project as an attachment.


Opened a ticket.

Thx so far!

Hi Günter,

Please try again with this bugfix:

Or this NuGet package:
Install-Package GemBox.Pdf -Version 17.0.1123-hotfix

Does this solve your issue?


Hi Mario

Your hotfix solved the problem and pinting is now possible!

Thanks for your help and fast support!