Unsupported document

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v5)  /  Re: Unsupported document

DynamicPDF CoreSuite for .NET (v5) Forum

 Jul 07 2010 7:05 AM
Hi,

I'm trying to generate a single PDF from multiple files. When I upload a PDF and an image (gif or jpg) I'm getting an error when it's trying to process the PDF.

System.Exception: System.Exception: Conversion failed ---> System.Exception: Unsupported document at b9.a(l A_0, l A_1)

This is the call -

Dim options As ConversionOptions = New ConversionOptions(True)
Converter.Convert("C:\PDFConv\native.pdf", "C:\PDFConv\merged.pdf", options)


This is running on a Windows 2003 server
MS Office 2003 is installed with the office '07 converters.

Everything works fine when I upload/process word files (doc & docx) and images (gif, jpg etc.)

Any help will be greatly appreciated.
If you need more information please let me know.

Regards Allan
 Jul 07 2010 9:49 AM
Posted by a ceTe Software moderator
Hello Allan,

It is not possible to merge the already existing PDF document using our DynamicPDF Converter product. You can only convert the other file types and append it to the already existing PDF document.

If you want to merge already existing PDF documents then you will have to use our product DynamicPDF Merger for .NET. You will have to save the PDF document which you have got after conversion to disk or output it to byte array and then use it for merging using our DynamicPDF Merger product. Please refer the documentation on Merging PDF documents.

Please feel free to download evaluation version of DynamicPDF Merger product for .NET from our website. You can also refer to the sample examples downloaded with the product download.

Thanks,
ceTe Software Support Team.
 Jul 07 2010 10:55 AM
Hi,

Thanks for your prompt reply. I've got it working now.

I've inherited this project from a colleague who has left the company so I'm stumbling around in the dark a bit, figuring out how to use this and also what's been done and what hasn't.

Here is a truncated snippet of what I now have just in case anyone else has a similar problem. The commented variables are declared earlier just included them for completeness. Also this is just the pdf case other file types are handled differently.

' Added new reference to top of page
' Imports ceTe.DynamicPDF.Merger


'Dim sOutputPath As String="C:\PdfConv\pdf\merged.pdf"
'Dim sNativePDFFilePath As String="C:\PdfConv\pdf\native.pdf"
If File.Exists(sOutputFilePath) = True Then
    Dim sTemp As String = sOutputFilePath.Replace(".pdf", "_temp.pdf")
    File.Move(sOutputFilePath, sTemp)
    Dim MyDocument As MergeDocument = MergeDocument.Merge(sTemp, sNativePDFFilePath)
    MyDocument.Draw(sOutputFilePath)
    File.Delete(sTemp)
Else
    ' This is the first file rename it.
    File.Copy(sNativePDFFilePath, sOutputFilePath, True)
End If
File.Delete(sNativePDFFilePath)

Cheers Allan

All times are US Eastern Standard time. The time now is 10:53 AM.