ConcatenateFiles

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
zaksoft
Posts: 66
Joined: Fri Feb 20 2004

ConcatenateFiles

Post by zaksoft »

Is there any information about error occured when ConcatenateFiles() failed ? It simply return FALSE and it's difficult to find the reason (file 1 and file 2 exist, file 3 doesnt, both created with Acrobat 5 with filed that are filled and flattened, both can be opened separately)

TIA

P.S. I've tryed to investigate and split code using DOCxxx function:
Using this code

try
{
EXTDOCHANDLE hDocument = NULL;
EXTDOCHANDLE hAppend = NULL;

nRetValue = DocOpenA( &hDocument, lpFile1, "");

if ( nRetValue == 0) // This is 0: Ok
nRetValue = DocOpenA( &hAppend, lpFile2, "");

if ( nRetValue == 0) // This is 0: Ok
nRetValue = DocAppend( hDocument, hAppend);

if ( nRetValue == 0) // This is 0: Ok try to save
nRetValue = DocSaveA( &hDocument, lpOutFile);

// nRetValue is now -1000 (sound deja vue - see problems with digital signature), OutFile name is different from other 2 names and does not exist

DocClose( &hDocument);
DocClose( &hAppend);
}

I've found DOCxxx function in .h file, but where con I found some documentation about this functions?
Davide Zaccanti
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Re: ConcatenateFiles

Post by Joan »

Hello,

When concatenating a pdf file the concatenate can fail either because the file can't be open in the Creator, or because it can't be post processed (concatenated and saved).

If you are using an old version of the PDF Creator I suggest that you try version 3.02 it resolves most of the know incompetencies with files generated by other tools.

If you are using a new version of the PDF Creator I suggest that you send your files to support@amyuni.com to check them and confirm if there is any problem supporting these files by our driver and they will tell you when this will fixed.

Hope this helps.
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
zaksoft
Posts: 66
Joined: Fri Feb 20 2004

Re: ConcatenateFiles

Post by zaksoft »

I'll send immediately, but two things:
1) as explained by the code the files can be opened
2) there is no documentation about function and about returning error codes.

I'm using version 3.02.
Davide Zaccanti
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Re: ConcatenateFiles

Post by Joan »

Hello,

The files might be supported for opening but not for editing or encryption. This is why I asked you to send the file to our Support Team to check them.

Do you have this version of the documentation?
ConcatenateFiles Function
The ConcatenateFiles function appends or concatenates a second PDF file to a first one.

Syntax BOOL ConcatenateFiles ( LPCSTR file1, LPCSTR file2, LPCSTR file3 )

Parameters
file1 [in] Full path of the first file.
file2 [in] Full path of the second file to be appended to file1.
file3 [in] Full path of the destination or output file.

Return Value
The return value is True if the files were appended, False if an error occurred appending files.

Remarks
This function is not guaranteed to process files created from PDF generation tools other than the Amyuni PDF Converter, or
Amyuni PDF Creator. It will however work with files coming from most applications.

Example
ConcatenateFiles( "c:\\test1.pdf", "c:\\test2.pdf", "c:\\appended.pdf" );
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
zaksoft
Posts: 66
Joined: Fri Feb 20 2004

Re: ConcatenateFiles

Post by zaksoft »

Yes, but when you get FALSE as return value where is the problem ? How can we spot the underlaying problem ?
Davide Zaccanti
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Re: ConcatenateFiles

Post by Joan »

Hello,

At the moment, this function only returns False. which means that the function fails, it doesn't specify why it fails and actually i don't see how would the function specify why it fails, this is done by checking the files that are being concatenated. This check up can be done manually or automatically but it cant be done inside the concatenat function.

I will check with our developers about your point however.
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
Post Reply