We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

pdf content in two columns structure in syncfusion

hi i am using syncfusion to view html content ot pdf view.but how can i show pdf from html in two column structure..
therefore if my first column exceeded then it should continue to next column in same pages.

6 Replies

AS Abirami Selvan Syncfusion Team April 20, 2015 03:51 PM UTC

Hi Manikandan,

Thank you for using syncfusion product.

To draw the html content in pdf as two column structure , We have to convert the html to pdf first ,then load the converted pdf stream and create the pdf booklet using createbooklet method.

We have attached the workaround sample for your reference in below link:

http://www.syncfusion.com/downloads/support/forum/118874/Multicolumntext-1071279260.zip

you can refer the following link for more details :
http://mvc.syncfusion.com/demos/reporting/pdf/ModifyDocuments/Booklet

Please try this and let us know if you have any further assistance.


Thanks,

Abirami.



MA manikandan April 21, 2015 11:52 AM UTC

hi thanks for your reply..and i have checked your solution..
   But in my requirement is i have html content in string sequences. and have to pass it and convert into pdf in multiple column (might be two column).
for ex:
   if i have paragraph  including bullets  and numbering,images all htmls  , then convert in pdf as  after completed first column in a first page , then needt to continue in the same page in second column.
then i have to goto next page as same above.

please help me ,

thank you


KC Karthikeyan Chandrasekar Syncfusion Team April 21, 2015 12:19 PM UTC

Hi Manikandan,
Thank you for your update.

The best way to achieve your requirement is by using “PdfHTMLTextElement”. But as we did not implemented Event handlers in “PdfHTMLTextElement” your requirement could not be currently achieved. We have logged a feature request to implement the Event Handlers in “PdfHTMLTextElement”. Once this feature is implemented we can achieve your requirement, we will let you know once this feature is implemented.


Online Sample Link: http://asp.syncfusion.com/demos/web/pdf/multicolumntext.aspx


Please let us know if you need any further assistance.

Regards,

Karthikeyan.C



LA Laz June 27, 2020 07:04 AM UTC

I was trying to figure out how to achieve the same task yesterday and spent several hours before finally understanding that it cannot be done with the current functionality available in Syncfusion's PDF. Before we were using ABCpdf, which is imho much easier to use, maintained, and better documented. But this is not a plug for ABCpdf. Their licensing is not at all suitable for WPF ClickOnce apps because they want you to buy a license for each computer that might end up generating PDF-s, which is unreasonable. So we actually switched over to Syncfusion's product (same code-base as Spire PDF I think).

In any case I hope that one day - if they decide to allocate resources to maintaining this code-base - Syncfusion will decide to make this functionality available.

To get a little technical, all we would need would be to have a "Remainder" property on "PdfLayoutResult" the same way that there is a PdfTextLayoutResult.Remainder property, then this would be easy to implement. Or, if that's not possible, at least there should be a simple way to read-out what was actually successfully drawn by PdfHtmlTextElement.Draw (when passed a layoutRectangle), and then we could manually remove that from the html string that we are drawing to draw the next block.


SL Sowmiya Loganathan Syncfusion Team June 29, 2020 01:29 PM UTC

Hi Laz,  
 
We have analyzed your requirement and currently we are validating on this. We will update the further details on July 01, 2020.  
 
Regards, 
Sowmiya Loganathan 



SL Sowmiya Loganathan Syncfusion Team July 1, 2020 03:24 PM UTC

Hi Laz,  
 
When rendering the PdfHtmlTextElement, we internally create a metafile with the provided HTML string. Then we will draw the meta file to the mentioned bounds on the page. So, it is not possible to get the remaining content of the HTML string using PdfHtmlTextElement. 
 
We could manually remove that from the html string that we are drawing to draw the next block. 
Kindly share your requirement to draw the next block elaborately. Whether the (paginated HTML content) block drawn on the same page or next page. So, it will be useful for us to investigate further on this and assist you with a better solution at the earliest.  
 
Regards,  
Sowmiya Loganathan 


Loader.
Up arrow icon