Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Convert page content to PDF View modes: 
User avatar
Member
Member
forthewinyo - 3/10/2009 4:59:45 AM
   
Convert page content to PDF
Hi,

I'm looking to create a webpart that enables the user to export the page content into a PDF template.

I'm thinking of using the third party iTextSharp library to handle the pdf creation, but I don't really know where to start in terms of the webpart creation. I've looked at the standard webpart documentation, and can create my own webpart, but can't find anything on how to pull specific content out of pages.

Can someone point me in the right direction?

User avatar
Member
Member
forthewinyo - 3/10/2009 6:52:12 AM
   
RE:Convert page content to PDF
More specifically:

Suppose I have an editable text region within a template called "editabletext1".

I want to retrieve the content of this editable region programmatically from within a webpart in the same template. How do I access the content of "editabletext1"?

I'm sure this must be simple!

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 3/10/2009 7:36:36 AM
   
RE:Convert page content to PDF
Hi,

Please find example codes below:

Editable region content:

CMS.CMSHelper.CMSContext.CurrentPageInfo.EditableItems["editabletext1"].ToString();

Document content:

CMS.CMSHelper.CMSContext.CurrentDocument.DocumentContent.ToString();


I hope it will help you to achieve your goals.

Thank you.

Best Regards,
Miroslav Remias

User avatar
Member
Member
forthewinyo - 3/10/2009 8:52:31 AM
   
RE:Convert page content to PDF
That's massively useful, thank you!

Out of interest, is this information documented anywhere?

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 3/11/2009 3:46:03 AM
   
RE:Convert page content to PDF
Hi,

Unfortunately, you can’t find any example section in our Developer's guide which would cover this specific request. However, you can find all of the necessary information in our API reference:

http://devnet.kentico.com/downloads/kenticocms_api.zip

Thank you.

Best Regards,
Miroslav Remias

User avatar
Member
Member
MikeM-MillerDavisAgency - 7/1/2010 1:19:15 PM
   
RE:Convert page content to PDF
Were you able to get this created?