PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.com/

GIF - Image could not be read.
http://forum.pdfsharp.com/viewtopic.php?f=2&t=815
Page 1 of 1

Author:  sbilo [ Tue Jul 28, 2009 1:49 pm ]
Post subject:  GIF - Image could not be read.

I am encountering quite a few occurrences where a GIF image does not get read into the resulting pdf. They are not very large.

The pdf displays a gray box with a the following text in red: Image could not be read.


As far as I can tell there is no difference between the gif files that get displayed correctly and those that do not.


completeFilename = "W:\\Images\\21800-0042.GIF";
document.LastSection.AddPageBreak();
document.LastSection.AddImage(completeFilename);

I've attached one of the offending gif images.


Any ideas would be appreciated. Thank you.
Attachment:
21800-0042.gif
21800-0042.gif [ 11.91 KiB | Viewed 5794 times ]

Author:  Thomas Hoevel [ Tue Jul 28, 2009 2:19 pm ]
Post subject:  Re: GIF - Image could not be read.

Thanks for the sample file. I'll check it.

Author:  sbilo [ Tue Jul 28, 2009 2:26 pm ]
Post subject:  Re: GIF - Image could not be read.

Thanks, in that particular series of 46 images, only 11 were displayed correctly in the pdf while the other 35 got the message: Image could not be read.


I can send more samples of good and bad if needed ... they are all very similar, same type content, same dimensions from 10K to 75K and they get displayed fine in an ASP.net web page.

Author:  Thomas Hoevel [ Tue Jul 28, 2009 2:33 pm ]
Post subject:  Re: GIF - Image could not be read.

I saved that file to disk - and it work fine with both builds (GDI+ and WPF).
I have no idea what could go wrong.

Author:  sbilo [ Tue Jul 28, 2009 2:45 pm ]
Post subject:  Re: GIF - Image could not be read.

I am using MigraDoc.

I have references to MigraDoc.DocumentObjectMode_WPF, MigraDoc.Rendering-WPF and PDFSharp-WPF.

Should I be using something different?


using System;
using MigraDoc.DocumentObjectModel;
using MigraDoc.DocumentObjectModel.Tables;
using MigraDoc.DocumentObjectModel.Shapes;
using System.Collections;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/