PdfGrid inserting into LoadedDocument with pagination

Hi all,

I am trying to write a function that can insert a table with the PdfGrid class into an already existing pdf. I am loading the existing pdf that I have stored (as a base64 string) into a memory stream to put this into a loadedDocument object. What I am trying to get to work is to be able to paginate the pdfGrid across multiple pages and as far as I understood this correctly I can do this by passing a layoutFormat into the draw function. The problem is the draw function that I use (pdfGrid.Draw()) only accepts a pdfGraphics object and a position not a layoutFormat. 


So my question is: is it even possible to insert a pdfGrid into a loadedDocument object that also supports pagination or do I always have to start from scratch with a normal PdfDocument?

See my function in the attachments.


Thank you in advance !


Greetings
Zietse


Attachment: ForumPost_65bccd2b.rar

2 Replies

IJ Irfana Jaffer Sadhik Syncfusion Team May 31, 2023 01:08 PM UTC

We don't have Layout support on existing PDF documents. We suggest drawing the PdfLoadedDocument as a template to the new PdfDocument or importing the PDF pages into the new PDF document and drawing grid to the new PDF document. Please try this on your end and let us know the result.


Please follow the below links for more information,

https://help.syncfusion.com/file-formats/pdf/working-with-pdf-templates#creating-templates-from-existing-pdf-document

https://help.syncfusion.com/file-formats/pdf/merge-documents#importing-pages-from-multiple-documents




ZB Zietse Boonen | Castars June 5, 2023 09:48 AM UTC

Hi Irfana

Thank you for your reply I am sorry for my late answer ! I will try to apply this today and tomorrow. Will keep you updated !


greetings

Zietse


Loader.
Up arrow icon