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.
Unfortunately, activation email could not send to your email. Please try again.

Create a PDF with image, text, and a border

Thread ID:

Created:

Updated:

Platform:

Replies:

52192 Nov 23,2006 05:13 AM Nov 28,2006 11:35 AM Windows Forms 3
loading
Tags: PDF
Mat
Asked On November 23, 2006 05:13 AM

Hi,

I am trying to create a PDF from a Word document. ~The code creates a PDF document, creates a paragraph and loads the image into it. The next paragraph is created and reads the text from a streamreader into it. However, I cannot work out how to add a border to the page. I read the topic on page 4 of the forum about creating a rectangle with text into it, however the solution provided there only works with a PDFDocument. To get the Section functionality needed for paragraphs, I have made my document using the PDFLogicDocument. Is there any way of creating a border with this?

Any help gratefully appreciated, I have attached my code.



Mat.Test.WinApp.zip

Administrator [Syncfusion]
Replied On November 23, 2006 06:24 PM

Hi Mat,

Thank you for your interest in essential PDF. It is possible to add a border to page with the help of Canvas. We can add a canvas and give size that we want. Once the canvas is added, its border will be displayed on the page.

// Add a canvas.
ICanvas canvas = paragraph.AppendCanvas(new SizeF(565,810));

Here is the sample for your reference.
PageBorder.zip


Could you please take a look at this and let me know if you have any other queries.

Regards,
Prakash

Administrator [Syncfusion]
Replied On November 24, 2006 04:39 AM

Hi Prakash,

that works perfectly thanks! Just needs a bit of sorting to get the borders the right size, etc but that wont take long.
Thanks for your help

Mat

Administrator [Syncfusion]
Replied On November 28, 2006 11:35 AM

Hi Mat,

Glad to know that it works fine.Thanks for your update!

Regards,
Prakash

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;