ConcatenateFiles creates corrupted text in PDF

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
stewarth
Posts: 7
Joined: Mon Nov 10 2014

ConcatenateFiles creates corrupted text in PDF

Post by stewarth » Mon Nov 09 2015

Hi -

I have the following scenario (I appreciate the drivers mentioned are fairly old)

We install Amyuni printer driver 4.5.1.0 ("Our PDF Driver")
Second application installs Amyuni printer driver 4.5.2.1 ("Their PDF Driver")

Both printers appear in Control Panel.

I try to merge two existing PDFs with the ConcatenateFiles method.
The merge succeeds but the content of the 1st PDF is corrupted - random letters appearing in place of the proper ones - e.g.

"Please e8teg 1i2g a8r *atoi8al A8s2ga8ue 82Cmeg o8 twe mifes amine oh twese retaols
age 8it algear1 swic89 ig oh twe1 age cgi8dp :we attauwer 8ites tell 1i2 Cige ami2t twe ugerotp"

If I only have 4.5.1.0 installed then merge is OK
If i only have 4.5.2.1 installed then PDF is corrupted
If i have both 4.5.1.0 & 4.5.2.1 'installed' then PDF is corrupted

If i start from 4.5.1.0 + 4.5.2.1 installed (corrupt merges) & update our driver to 4.5.3.9 (.ini ="Our PDF Driver") then merge starts working OK
If i then re-install their driver 4.5.2.1 (.ini ="Their PDF Driver") then merge starts corrupting again

It would appear that, even though we are using a differently named drivers ("Our PDF Driver"), if another product installs version 4.5.2.1 then causes the concatenate to stop working properly.

Do you have any suggestions, since we clearly have no control over what version of Amyuni another product uses?

Jose
Amyuni Team
Posts: 549
Joined: Tue Oct 01 2002
Contact:

Re: ConcatenateFiles creates corrupted text in PDF

Post by Jose » Mon Nov 09 2015

Hello Stewart,

Based on your comments, it appears that you are using the ActiveX interface of the Amyuni PDF Converter.

v4.5.1.0, v4.5.2.1 and v4.5.3.9 use the same CLSID and since you can only have on one CLSID registered for a particular version, I suggest that you look at the GetVersionInformation to determine which version of the cdintf.dll that is registered.

If the GetVersionInformation() reports that you are not using v4.5.1.0 or v4.5.3.9, then you can register the appropriate DLL. When you exit your application you can register the v4.5.2.1 to return the system to its pervious state.

The GetVersionInformation method reports major and minor version of cdintf dll and printer driver files.

You can find more information on this method from the link below:
http://www.amyuni.com/WebHelp/Amyuni_Do ... mation.htm

Thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite

stewarth
Posts: 7
Joined: Mon Nov 10 2014

Re: ConcatenateFiles creates corrupted text in PDF

Post by stewarth » Mon Nov 09 2015

Thanks for the response.

We are using the dll interface to the PDF Converter printer driver, with the printer being installed during setup of our application. The cdintf450 dll is loaded in via a LoadLibrary() call.

It appears that 4.5.2.1 has an issue with concatenate - is this a known issue?

The other application in question is produced by another group in my company, so we might be able to get them to change to 4.5.3.9 if it was known that 4.5.2.1 had an issue.

Thanks.

stewarth
Posts: 7
Joined: Mon Nov 10 2014

Re: ConcatenateFiles creates corrupted text in PDF

Post by stewarth » Thu Nov 19 2015

Could i please get a comment from Amyuni as to whether the PDF merge facility works in version 4.5.2.1?

In my testing it does not

Jose
Amyuni Team
Posts: 549
Joined: Tue Oct 01 2002
Contact:

Re: ConcatenateFiles creates corrupted text in PDF

Post by Jose » Wed Dec 02 2015

Hello,

Unfortunately it is difficult to answer this question.

Based on your comments, you are saying that v4.5.2.1 was not able to concatenate a PDF document that version v4.5.2.9 was able to handle.
This seems to indicate that there was an issue with that particular document in v4.5.2.1. However this does not mean that v4.5.2.1 had issues concatenating all PDF documents.

Hope this answers your question?

Thanks.
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite

stewarth
Posts: 7
Joined: Mon Nov 10 2014

Re: ConcatenateFiles creates corrupted text in PDF

Post by stewarth » Thu Dec 03 2015

4.5.1.0 can generate 2 PDFs & merge them successfully.
Installing 4.5.2.1 & trying the same thing resulted in corrupt merge file - readable, but with garbage content in the 1st part
Installing 4.5.4.9 & trying the same thing results in OK merge
Running the 4.5.2.1 install again results in corrupt merges.

We have decided not to use Amyuni for this function - instead we are using an open source PDF library (PDFSharp) to do the merge (Amyuni still used to create the two PDFs that are to be merged, but PDFSharp doing the merge).

This results in a successful merge regardless of Amyuni driver installed.

Devteam
Posts: 115
Joined: Fri Oct 14 2005
Location: Montreal
Contact:

Re: ConcatenateFiles creates corrupted text in PDF

Post by Devteam » Mon Dec 14 2015

Hello Stewarth

If version 4.5.3.9 worked in all scenarios, integrating that version with your application could be a solution, newer versions of a Windows driver do not get overwritten by older versions unless they are explicitly uninstalled first. Another solution could be to use cdintf.dll version 4.5.1.0 or 4.5.3.9 side by side with your application, instead of using the dll installed as part of the printer driver.

For future support requests, it will be better if you can provide us sample files that allows reproducing the issue on our end, that way we can give you more precise information.

Please note that the Merge method of Amyuni PDF Converter provides several features that you will not find in many opensource or free libraries, for example:
- Support for reading files with compressed objects streams.
- Support for merging files that comply with the PDF-A specification without breaking the PDF-A compliance.

Thank you for using Amyuni PDF libraries.

Best regards
Amyuni Support
Amyuni Development Team

Efficient and accurate conversion to PDF, XPS, PDF/A and more. Free trials at - http://www.amyuni.com

Post Reply