PDFsharp & MigraDoc Forum

PDFsharp - A .NET library for processing PDF & MigraDoc - Creating documents on the fly
It is currently Sun Nov 02, 2025 5:35 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules

Also see our new Tailored Support & Services site.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Oct 02, 2012 9:33 am 
Offline

Joined: Tue Oct 02, 2012 9:07 am
Posts: 1
Hi,

we are using PdfSharp from sharpPDF-SL v2.0.50727 for reading pdf-files (It's a silverlight project).
But we have a problem when trying read a pdf wcich consists solely of an nested image (e.g. scanned image or fax).
The following call produces an error:

Code:
foreach (FileInfo loFileInfo in FileDialog.Files)
                {
                    lobmpimage = new BitmapImage();

                    loImageList = new ImageList();
                    loImageList.FileName = loFileInfo.Name;
                    .
                    .
                    .
                    else if (loFileInfo.Extension.ToUpper() == ".PDF")
                    {
                        loImageList.PdfFile = XPdfForm.FromStream(loFileInfo.OpenRead()); //that's where the error occures


The follwing error message is shown:

at Parser.ReadXRefTableAndTrailer(PdfReferenceTable xrefTable)
at Parser.ReadTrailer()
at PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider passwordProvider)
at PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode)
at PdfReader.Open(Stream stream, PdfDocumentOpenMode openmode)
at PdfReader.Open(Stream stream)
at XPdfForm..ctor(Stream stream)
at XPdfForm.FromStream(Stream stream)
at SelectedFileConverter.btn_LoadFiles_Click(Object sender, RoutedEventArgs e)
at ButtonBase.OnClick()
at Button.OnClick()
at RadButton.OnClick()
at ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
at JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)

Thanks for any help in advance.

Greetings
Jans


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 02, 2012 3:18 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3136
Location: Cologne, Germany
jans wrote:
we are using PdfSharp from sharpPDF-SL v2.0.50727 for reading pdf-files
So you are not using PDFsharp.

If the error also occurs with PDFsharp and if you provide us with that PDF file, we can take a look at the problem.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 172 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group