RTF print tables

Stimulsoft Reports.WPF discussion
MikaMikuMik
Posts: 14
Joined: Tue Apr 01, 2014 5:48 am

RTF print tables

Post by MikaMikuMik »

Hello, I meet up with some problems when printing tables in my reports: when I try to convert my table from flowdocument some rows at bottom of table is missing.

Rtf convert method:

Code: Select all

public static string ToRtf(this FlowDocument document)
        {
            var stream = new MemoryStream();
            document.GetDocumentRange().Save(stream, DataFormats.Rtf);

            var str = Encoding.Default.GetString(stream.GetBuffer());
            var encoded_str = XmlConvert.EncodeName(StiRichText.PackRtf(str));
            
            return encoded_str;
        }
I found this article about Riched20.dll on your knowlegebase:
http://support.stimulsoft.com/index.php ... -component

I try to connect new version of dll to my project but it fails with error: "wrong assembly manifest".
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: RTF print tables

Post by HighAley »

Hello.

You don't need to connect Riched20.dll. It's enough to put it in the bin folder.
There is a new one in the Windows 8.1, please, try it.

Thank you.
MikaMikuMik
Posts: 14
Joined: Tue Apr 01, 2014 5:48 am

Re: RTF print tables

Post by MikaMikuMik »

Yes, I put it in bin folder with other *.dll and *.exe files, and I got the same manifest error. Do I need some other file? (I try versions 6.0 and 8.0 from office 2010, 2013, they are bad too...)

I lookup riched20.dll in Win 8.1 in System32 and SysWOW64, there the same 3.1 version like in Win7.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: RTF print tables

Post by HighAley »

Hello.

Did you remove the Riched20.dll from Referenced Assemblies?

Thank you.
MikaMikuMik
Posts: 14
Joined: Tue Apr 01, 2014 5:48 am

Re: RTF print tables

Post by MikaMikuMik »

I even can't add it to Project References.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: RTF print tables

Post by HighAley »

Hello.
MikaMikuMik wrote:I even can't add it to Project References.
You should NOT add it to Project Reference.

Thank you.
MikaMikuMik
Posts: 14
Joined: Tue Apr 01, 2014 5:48 am

Re: RTF print tables

Post by MikaMikuMik »

Okay, I'll show what I do:
Here's my dll: http://prntscr.com/3698t3
I put my dll here, where others dll: http://prntscr.com/3698y8
And then I get a manifest error:

Code: Select all

System.BadImageFormatException: Невозможно загрузить файл или сборку "RICHED20" или один из зависимых от них компонентов. Ожидалось, что модуль содержит манифест сборки.
Имя файла: "RICHED20"
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: RTF print tables

Post by HighAley »

Hello.

Where do you get this error?
Please, look through all your solution for this string "RICHED20".
This exception is thrown when an unmanaged dynamic link library is passed to the Load method for loading.

Thank you.
MikaMikuMik
Posts: 14
Joined: Tue Apr 01, 2014 5:48 am

Re: RTF print tables

Post by MikaMikuMik »

There is no "RICHED20" string in solution, only main cycle of class init which is doing work of loading *.dll from bin folder.

The error message comes from here: http://prntscr.com/36afcq

The ineresting thing is that when I make new clean project with:

Code: Select all

  <package id="Stimulsoft.Base" version="2014.1.1808.0" targetFramework="net45" />
  <package id="Stimulsoft.Controls" version="2014.1.1808.0" targetFramework="net45" />
  <package id="Stimulsoft.Controls.Win" version="2014.1.1808.0" targetFramework="net45" />
  <package id="Stimulsoft.Editor" version="2014.1.1808.0" targetFramework="net45" />
  <package id="Stimulsoft.Report" version="2014.1.1808.0" targetFramework="net45" />
  <package id="Stimulsoft.Report.Check" version="2014.1.1808.0" targetFramework="net45" />
  <package id="Stimulsoft.Report.Design" version="2014.1.1808.0" targetFramework="net45" />
  <package id="Stimulsoft.Report.Helper" version="2014.1.1808.0" targetFramework="net45" />
  <package id="Stimulsoft.Report.Win" version="2014.1.1808.0" targetFramework="net45" />
And put *.dll version 8.0 in bin folder, there is no error message and Process Exploere show that dll do loading riched20.dll from bin folder.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: RTF print tables

Post by HighAley »

Hello.

Could you specify do you get any error now?
In your previous message you wrote that error is thrown when you put riched20.dll in the bin folder.

Thank you.
Post Reply