PDFsharp & MigraDoc Forum
https://forum.pdfsharp.net/

Jpeg image is cut only in Windows7 with DrawImage
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3176
Page 1 of 1

Author:  marco.bruni.sys [ Wed Aug 19, 2015 3:15 pm ]
Post subject:  Jpeg image is cut only in Windows7 with DrawImage

I use for years PDFsharp, and I found out a few days ago that only in Windows 7 when the images are pasted through DrawImage not taken along the length of the image but only a part.

I tried to use PDFsharp 1.50 beta only tells me that this code Impossible convert from System.Drawing.SolidBrush to XBrush but that does work with PDFsharp 1.32

Code:
  System.Drawing.SolidBrush brushEti = new System.Drawing.SolidBrush(etimri.txt1.ForeColor);
  XBrush brushEti1 = (XBrush)brushEti;

Author:  Thomas Hoevel [ Thu Aug 20, 2015 7:53 am ]
Post subject:  Re: Jpeg image is cut only in Windows7 with DrawImage

marco.bruni.sys wrote:
I use for years PDFsharp, and I found out a few days ago that only in Windows 7 when the images are pasted through DrawImage not taken along the length of the image but only a part.
I'm afraid I do not understand what the problem really is. An SSCCE would help. Or maybe a PDF file created under Windows 7 and one from a different OS for comparison.
Sounds like a Windows problem.
See also:
viewtopic.php?f=2&t=832


marco.bruni.sys wrote:
I tried to use PDFsharp 1.50 beta only tells me that this code Impossible convert from System.Drawing.SolidBrush to XBrush but that does work with PDFsharp 1.32
You need a GDI+ build of PDFsharp for this conversion. This applies to PDFsharp 1.32 and to PDFsharp 1.50 beta, no change in PDFsharp here.

Author:  marco.bruni.sys [ Thu Aug 20, 2015 8:34 am ]
Post subject:  Re: Jpeg image is cut only in Windows7 with DrawImage

Thomas Hoevel wrote:
marco.bruni.sys wrote:
I use for years PDFsharp, and I found out a few days ago that only in Windows 7 when the images are pasted through DrawImage not taken along the length of the image but only a part.
I'm afraid I do not understand what the problem really is. An SSCCE would help. Or maybe a PDF file created under Windows 7 and one from a different OS for comparison.
Sounds like a Windows problem.
See also:
viewtopic.php?f=2&t=832

I'm sorry I thought I was clear :-)

I use a software that PDFsharp (until version 1.32) and when I insert a jpeg image to a PDF by DrawImage in Windows XP is inserted correctly in Windows 7 while only a part, is cut.

Googoled I read that maybe the beta version of PDFsharp 1.50 beta solves this problem, right?

marco.bruni.sys wrote:
I tried to use PDFsharp 1.50 beta only tells me that this code Impossible convert from System.Drawing.SolidBrush to XBrush but that does work with PDFsharp 1.32
You need a GDI+ build of PDFsharp for this conversion. This applies to PDFsharp 1.32 and to PDFsharp 1.50 beta, no change in PDFsharp here.


I'm sorry I did not understand what you mean by You need a GDI+ build of PDFsharp for this conversion
?

Thank you

Author:  Thomas Hoevel [ Thu Aug 20, 2015 8:54 am ]
Post subject:  Re: Jpeg image is cut only in Windows7 with DrawImage

marco.bruni.sys wrote:
I'm sorry I thought I was clear :-)
You did not mention Windows XP, you just wrote it doesn't work with Windows 7 ("only in Windows 7").
The current version is Windows 10 and support for XP ended more than 15 months ago. Reading "only in Windows 7" I assumed it was working with Windows 8 and 8.1.
If it is the old known bug then it will not occur "only in Windows 7" but also in Windows 8 and 8.1, maybe even in Windows 10 (not yet tested).
It should work with PDFsharp 1.50 beta.


marco.bruni.sys wrote:
I'm sorry I did not understand what you mean by You need a GDI+ build of PDFsharp for this conversion?
There are PDFsharp versions for Silverlight, for GDI, for WPF, and a platform-independent core build. You need the build for GDI.
See also:
https://www.nuget.org/packages?q=pdfsharp

Author:  marco.bruni.sys [ Thu Aug 20, 2015 9:44 am ]
Post subject:  Re: Jpeg image is cut only in Windows7 with DrawImage

Thomas Hoevel wrote:
marco.bruni.sys wrote:
I'm sorry I thought I was clear :-)
You did not mention Windows XP, you just wrote it doesn't work with Windows 7 ("only in Windows 7").
The current version is Windows 10 and support for XP ended more than 15 months ago. Reading "only in Windows 7" I assumed it was working with Windows 8 and 8.1.
If it is the old known bug then it will not occur "only in Windows 7" but also in Windows 8 and 8.1, maybe even in Windows 10 (not yet tested).
It should work with PDFsharp 1.50 beta.


marco.bruni.sys wrote:
I'm sorry I did not understand what you mean by You need a GDI+ build of PDFsharp for this conversion?
There are PDFsharp versions for Silverlight, for GDI, for WPF, and a platform-independent core build. You need the build for GDI.
See also:
https://www.nuget.org/packages?q=pdfsharp


I solved thanks to the library https://www.nuget.org/packages/PDFsharp ... .3638-beta

Thank you

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