PageCount
is the number of pages to convert starting from PageNumber
. Furthermore, take a look at this API reference.
Correct but my point is it doesnât work. I specify page 1 and gives me more. Works fine for Word but not for Excel.
Please utilize following code (load option for Excel/Spreadsheet):
Func<LoadOptions> getLoadOptions = () => new SpreadsheetLoadOptions
{
OnePagePerSheet = true
};
Converter converter = new Converter(@"D:/ALEWIS_0000000021.0001.XLS", getLoadOptions);
Set OnePagePerSheet
to true and youâll get one image in output.
@NPozdniakov
I agree with you that it does not work the way itâs intended.
If you just want to create a preview and because of that, the âOnePagePerSheet = trueâ is giving you a too small result, you may want to add âConvertRangeâ to your SpreadsheetLoadOptions.
e.g. loadOptions.ConvertRange = âA1:AF50â;
it will of course cut off data outside this range, but for a preview / thumbnail itâs good enough.
It maybe good enough for now. Ultimately @Clemens_Pestuka is right, it doesnât work as intended and I would like to see this fixed.
Thank you both for suggestions.
You are welcome. Weâll let you know if we implement further improvements for this scenario.
The issues you have found earlier (filed as CONVERSIONNET-6035) have been fixed in this update. This message was posted using Bugs notification tool by nikola.yankov
It appears that the issue youâre encountering is tied to the Conversion .Net 20.1 update, where the capability to convert a single page of a multi-page document into PNG has been affected. The suggested approach is to utilize SavePageStream
as a potential workaround for this problem.
However, if youâre searching for a more user-friendly, non-programmatic solution, Iâd recommend trying an online tool like Converter365, a PNG converter that provides hassle-free conversions without the need to write any code. This might be particularly beneficial if you have only a few files and are looking for a straightforward method.
On the other hand, if your goal is to incorporate conversion functionalities within a more extensive system or application, then itâs essential to keep abreast of the provided code and suggestions. The problem might sometimes be specific to certain files, such as the creation of an unanticipated additional page during the conversion. It might necessitate either a more detailed investigation or an update from the software developers to resolve.