Unable to merge PDF files. Invalid PDF file error
![]() 11/28/2007 12:35 AM
|
---|
After I create PDF file using PdfExporter, I'm unable to merge it with another PDF files (I'm using Cete Software's DynamicPDF/PDFMerger). Every time I'm trying to load PDF file I'm getting 'Invalid PDF File. Cross-Reference not found'. There is no problem with Acrobat Reader, but if you open it in Acrobat Professional you will notice a 'Rebuild' screen pop up and it will prompt you to save the file when it is closed. After that, saved file can be used with PDFMerger. |
![]() 11/28/2007 12:43 PM
|
---|
Hi, That was a bug indeed in older versions of CadLib, can you please try the latest version? Thank you, Wout |
![]() 11/28/2007 8:02 PM
|
---|
Hi Wout, Thanks Oleg. |
![]() 11/28/2007 8:05 PM
|
---|
Hi Oleg, Yes, it changed: the GraphicsConfig.CorrectColorForBackgroundColor replaces the old setting. It was better design having it all consistently controlled by GraphicsConfig, since there are a bunch of other settings as well, that setting was just one of them. Let me know if that helped! Wout |
![]() 11/28/2007 8:21 PM
|
---|
Hi Wout, Thanks for your help ! Oleg |
![]() 1/24/2008 2:23 AM
|
---|
Hi Wout, I've got into the same problem (with Dynamic PDF) right after I start using memory strem instead of the file stream. Following code is working without any problem: Dim _filestream As Stream = File.Create('testpdfx.pdf') Dim _filestream As MemoryStream = New MemoryStream() Right after I initialize MyDocument I'm getting error:
|
![]() 1/24/2008 11:04 AM
|
---|
Hi Oleg, Use MemoryStream.ToArray() in stead of GetBuffer(). GetBuffer returns the complete buffer, which is typically a bit more than the actually used part of the buffer. Also try calling MemoryStream.Flush() before getting its contents with ToArray(). Let me know if that helped. Wout |
![]() 1/25/2008 1:50 AM
|
---|
It worked ! Thanks Wout. |