Welcome Guest Search | Active Topics | Sign In | Register

Error Opening Merged file Options
Sagayanathan John
Posted: Thursday, October 11, 2012 2:00:44 PM
Rank: Newbie
Groups: Member

Joined: 10/11/2012
Posts: 3
Hi,

I am getting an error 'There was an error opening this document. The root object is missing or invalid' when i open a merged pdf file.

I generate individual files and merge them using the following code (c#), but when i open the final merged file i get the error mentioned above.

List<string> pdfFileNames;
PdfDocument[] casePDFDocs = new PdfDocument[pdfFileNames.Count];
int i = 0;
foreach (string pdfFileName in pdfFileNames)
{
casePDFDocs[i] = new PdfDocument(pdfFileName);
i++;
}
PdfDocument result = PdfDocument.Merge(casePDFDocs);
result.Save("C:\Temp\MyMergedFile.pdf");



Another thing is there is variation in the size of the merged file. Ex. I am merging three files each of size 52k, but the size of the merged file is around 300k whereas i am expecting it should be around 160k (52k + 52k + 52k )

thanks
eo_support
Posted: Thursday, October 11, 2012 2:27:37 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

The "'There was an error opening this document. The root object is missing or invalid" error may be a bug, or maybe caused by one of the original file is invalid. If you are not already running the latest build, please download the latest build from our download page and try that first. If you are already running the latest build, then we will need the file that's causing the problem for you so that we can debug it here. Please let us know if that's the case so that we can provide you the email address.

The file size increase can be normal. There are a number of factor that can cause file size increase. One factor is if you are running trial version, then we will add a license warning message in the file. That usually will embed an additional font to your file, which cause the file size to increase. Another factor is we do not save lineralized PDF. So if your original PDF is lineralized, then it may grow in size when we resave it.

Thanks!
Sagayanathan John
Posted: Thursday, October 11, 2012 2:35:29 PM
Rank: Newbie
Groups: Member

Joined: 10/11/2012
Posts: 3
Hi,

I can send you the files that cause the problem, please let me know to which email address to send or any place to upload.
Just to give another update, the same works for one set of files but fails for another set. I can send them.

thanks
eo_support
Posted: Thursday, October 11, 2012 3:13:37 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Please check your private message as to where to send the files.

Thanks!
Sagayanathan John
Posted: Thursday, October 11, 2012 4:09:01 PM
Rank: Newbie
Groups: Member

Joined: 10/11/2012
Posts: 3

Hi,

My problem seem to be solved when i upgraded from 3.0.51.2 to the latest version 4.0.36.2
However this seems to be a trial version which puts a warning text in the merged PDF.
We have a license for full version, can you give us instructions on how to download the full version.

thanks
eo_support
Posted: Thursday, October 11, 2012 4:16:15 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

We offer free upgrade for one year. So you can use the new version for free if you purchased within one year. Otherwise there will be an upgrade fee based on how much you have previous paid. If you can let us know your order number, we will be able to find out for sure.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.