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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Adding a Table to an existing PDF document

Thread ID:

Created:

Updated:

Platform:

Replies:

74142 May 31,2008 12:07 PM UTC Jun 9,2008 04:21 AM UTC WinForms 3
loading
Tags: PDF
Scott Leclerc
Asked On May 31, 2008 12:07 PM UTC

I am trying to add a PDFLightTable object to an existing PDF document. I also need to obtain the size of the table after it's drawn, so I cannot use the draw method using the Graphics object as the first argument.

The problem I have it that I need to open the existing object into a PDFLoadedDocument object. The Pages collection returns a PDFLoadedPage object, and this object cannot be passed into the table's draw method, and it cannot be converted into a PDFPage object either. I've tried passing the existing page as a PdfPageBase object, but that also fails with the error:

"Unable to cast object of type 'Syncfusion.Pdf.PdfLoadedPage' to type 'Syncfusion.Pdf.PdfPage'."

Has anyone been able to accomplish this with version 6.3.0.6?



AddingTableToPDF_74df9088.zip

Sri Subhashini M [Syncfusion]
Replied On June 2, 2008 07:20 AM UTC

Hi,

Thank you for your interest in Essential PDF.

It is not possible to convert the PdfLoadedPage as PdfPage. You can draw the PdfLightTable to an existing document by convert it as a PdfDocument. We can access pdfPages from the PdfDocument.

Kindly use the below code to convert the PdfLoadedDocument to pdfDocuemnt.

' Convert PdfLoadedDocument to PdfDocument"
Dim doc As PdfDocument = New PdfDocument()
doc.ImportPageRange(pdfDoc, 0, pdfDoc.Pages.Count-1)

Please look into the sample which is available from the below specified link and let me know if this helps.

http://websamples.syncfusion.com/samples/Pdf.Windows/F74142/main.htm

Regards,
Suba



Scott Leclerc
Replied On June 2, 2008 07:02 PM UTC

Thanks, that worked great.


Sri Subhashini M [Syncfusion]
Replied On June 9, 2008 04:21 AM UTC

Hi,

Glad to know that it helps you.

Please let me know if you have any other queries.

Best,
Suba


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.

Warning Icon 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.Close Icon

;