Error concatenation PDF's

Hi,

We are using Pdf.Kit and are aware of the fact that we will have to migrate to Aspose.Pdf shortly.
Currently however we’re still using Pdf.Kit and have the following issue:

When concatenating two Pdf files (streams) we get the following message:
<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>NL</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”> com.aspose.<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”><span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”>pdf.kit.nj cannot be cast to com.aspose.<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”><span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”>pdf.kit.md

The stack trace is not very infomative since the class names are obscurified:
<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”> at com.aspose.pdf.kit.oi.l
<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”> at com.aspose.<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”><span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”>pdf.kit.oi.a
<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”> at com.aspose.<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”><span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”>pdf.kit.oi.
<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”> at com.aspose.<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”><span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”>pdf.kit.oi.
<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”> at com.aspose.<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”><span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”>pdf.kit.Form.
<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”> at com.aspose.<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”><span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”>pdf.kit.PdfFileEditor.a
<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”> at com.aspose.<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”><span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”>pdf.kit.<span style=“font-size:11.0pt;font-family:
“Courier New”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
color:#1F497D;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:
AR-SA” lang=“EN-US”>PdfFileEditor.concatenate

This it the calling method that causes the exception:
public static void concatenatePDF(InputStream stream1, InputStream stream2, OutputStream out) throws Exception
{
try
{
PdfFileEditor editor = new PdfFileEditor();
editor.concatenate( stream1, stream2, out);
}
finally
{
out.close();
}
}
We are using Pdf.Kit version 4.4.0

Kind Regards,
Wim Roeling
ADP, Amsterdam, The Netherlands
<!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:Standaardtabel; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}

<![endif]–>

Hi Wim,


Thanks for your inquiry. Please share your sample documents, so we will investigate the issue at our end and provide you more information accordingly.

We are sorry for the inconvenience caused.

Best Regards,