Converting the attached HTML to PDF does work fine, but the result does not look too good.
In the converted PDF, the first 3 columns get wrapped, which we would like to prevent somehow:
image.jpg (227.7 KB)
We made several attempts with pure HTML or CSS code, to control wrapping, which did work in a browser, but not for GroupDocs conversion.
WF History HTML to PDF.zip (68.9 KB)
This is a “worst case” example, where the last column has a long text without spaces, so default word-wrapping does not work.
The generated HTML is under our control and we can make any modification required.
What we can’t do, is change the text inside the table like adding spaces to it.
But we can add any HTML or CSS rule that would be respected by GroupDocs for wrapping text.
We were using GroupDocs.Conversion 25.1 with that code:
using (var conv = new Converter(documentPath))
{
var options = new PdfConvertOptions()
{
PageWidth = 750, // A4 width for portrait mode
PageHeight = 1061, // A4 height for portrait mode
MarginLeft = 15,
MarginRight = 15,
MarginBottom = 15,
MarginTop = 15
};
options.PageOrientation = ConvOpts.PageOrientation.Landscape;
conv.Convert("Conversion.pdf", options);
}
Can you please take a look at that problem?
Hello @Clemens_Pestuka ,
Thank you for reaching out. We have registered your issue under the tracking number CONVERSIONNET-7539 in our system. We will get back to you with details after investigating it.
1 Like
@Clemens_Pestuka ,
We attempted to reproduce the issue on our side but were unable to do so. Given that the latest version of Conversion for .NET 25.2 was released today, we used it to test your provided code with the two HTML files (WFHistory.HTML and WFHistory 4.HTML). In both cases, the conversion results were nearly identical to the original (we have attached the resulting PDFs for reference). Could you please check this issue with Conversion for .NET 25.2 on your system and confirm which operating system you are using?
Output.zip (114.4 KB)
1 Like
@evgen.efimov
Thank you for testing.
I can confirm that the behavior with Conversion for .NET 25.2 is much better.
Apologies for not mentioning, that we are using GroupDocs.Conversion from the GroupDocs.Total Package for .NET 25.1.
I though it would not make a difference, but it seems it does…
Could you please test again with that version?
@Clemens_Pestuka ,
Thank you for your clarification. We ran the same code using GroupDocs.Total for .NET 25.1 and obtained identical results to the previously attached files. To investigate this further and provide you with a solution, we may need a small demo example that reproduces the issue on your side, as we currently cannot replicate it on our end.
@evgen.efimov
I’m surprised that you are getting different results.
Here is the sample project I used for testing:
GroupDocsTotal.zip (5.6 KB)
Hello @Clemens_Pestuka ,
Thanks for providing the example! We will return with our findings after conducting additional research.
1 Like