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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can data be inserted in a PDF?

Thread ID:

Created:

Updated:

Platform:

Replies:

146146 Jul 22,2019 11:56 PM UTC Jul 25,2019 01:25 PM UTC Xamarin.Forms 2
loading
Tags: PDF
Will Autio
Asked On July 22, 2019 11:56 PM UTC

Imagine an Antique Bookstore app. One part of the app takes a pre-designed PDF and fills in some fields in the header and footer - say Name and Address, collected points and another dozen things including a place or two for signatures. These fields can be filled in from the database (except for the signatures). This I can do.

Further, imagine a large blank space covering, say, two thirds of the height of the page, that is allowed to be filled with details. We know the (X,Y) coordinates of the upper left corner of the blank space. How can we fill in, say, a picture of a book along with the title and author on each row available in the blank space? The rows are say, 3 cm. in height.

The short version: given a PDF form with several fields to be filled in from the db, and a large blank space that serves as a placeholder for writing out a list consisting of pictures and text.  How can we insert images and text into a part of a PDF?
Thanks!

Will Autio
Replied On July 24, 2019 04:51 AM UTC

Ok - so it doesn't look that bad.

// from: https://help.syncfusion.com/file-formats/pdf/working-with-text#drawing-text-in-an-existing-document

//Get first page from document
PdfLoadedPage page = loadedDocument.Pages[0] as PdfLoadedPage;

//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;

//Set the standard font.
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);

//Draw the text.
graphics.DrawString("Hello world!", font, brush, new Syncfusion.Drawing.PointF(20, 20));

And then you can see it. From there, the rest is careful reading of the docs and trying things.


Sowmiya Loganathan [Syncfusion]
Replied On July 25, 2019 01:25 PM UTC

Hi Will, 

Greetings from Syncfusion. 


The short version:  Given a PDF form with several fields to be filled in from the db.  
We can fill the form fields in PDF document (get data from data base and set that values to form field text). Please refer the below UG documentation link for more details, 


The short version:  A large blank space that serves as a placeholder for writing out a list consisting of pictures and text.  How can we insert images and text into a part of a PDF? 

We can insert text and image in an existing PDF document. Please refer the below UG documentation link for more details, 




Please let us know if you need any further assistance on this. 

Regards, 
Sowmiya L 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon