Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.
Wed Nov 25, 2020 3:10 pm
Dear Spire Team
I am trying to convert an RTF into a given rectangle.
Your example from "How to convert RTF to Image and reset image resolution" works fine
But how can I define the dimensions of the output-image (e.g. 25 x 50 mm)
I tried something with
var section = doc.AddSection();
section.PageSetup.PageSize = new SizeF(500, 3000);
but without success.
-
peterInStIngbert
-
- Posts: 13
- Joined: Wed Nov 25, 2020 2:08 pm
Thu Nov 26, 2020 3:44 am
Hello,
Regarding setting the dimension of the image, your solution is feasible.
I tested your code with the latest
Spire.Doc Pack(hot fix) Version:8.11.9 but found it works well. To help us investigate further, could you provide us with your input RTF file?
You could upload it here or send it to us (
support@e-iceblue.com) via email. Thanks in advance
Sincerely,
Brian
E-iceblue support team
-
Brian.Li
-
- Posts: 1271
- Joined: Mon Oct 19, 2020 3:04 am
Mon Nov 30, 2020 8:22 am
Hello
i have tried around and found my mistake.
Changing the settings of doc.Sections[0] instead of doc.AddSection works well
Thank you
-
peterInStIngbert
-
- Posts: 13
- Joined: Wed Nov 25, 2020 2:08 pm
Mon Nov 30, 2020 8:55 am
Hello,
I am glad to hear that your problem has been solved. If you encounter any problems related to our products in the future, please feel free to contact us.
Sincerely,
Brian
E-iceblue support team
-
Brian.Li
-
- Posts: 1271
- Joined: Mon Oct 19, 2020 3:04 am