Adding multiline rich text

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
radshat
Posts: 2
Joined: Tue Dec 12, 2017 5:48 pm

Adding multiline rich text

Post by radshat » Wed Dec 13, 2017 12:31 am

I need to be able to create multiline rich text annotation. The Acrobat JavaScript API reference allows the following. What is the equivalent in GdPicture? I don't mind doing this as a custom action on the server side.

Code: Select all

var annot = this.addAnnot({
page: 0,
type: "Text",
point: [72,500],
popupRect: [72, 500,6*72,500-2*72],
popupOpen: true,
noteIcon: "Help"
});

var spans = new Array();
spans[0] = new Object();
spans[0].text = "Attention:\r";
spans[0].textColor = color.blue;
spans[0].textSize = 18;

spans[1] = new Object();
spans[1].text = "Adobe Acrobat 6.0\r";
spans[1].textColor = color.red;
spans[1].textSize = 20;
spans[1].alignment = "center";

spans[2] = new Object();
spans[2].text = "will soon be here!";
spans[2].textColor = color.green;
spans[2].fontStyle = "italic";
spans[2].underline = true;
spans[2].alignment = "right";

// Now give the rich field a rich value
annot.richContents = spans;


Gabriela
Posts: 436
Joined: Wed Nov 22, 2017 9:52 am

Re: Adding multiline rich text

Post by Gabriela » Thu Jan 17, 2019 4:08 pm

Hello,

The equivalent in GdPicture is this one if you want to add a text annotation without user interaction:
https://www.gdpicture.com/guides/gdpicture/web ... Annot.html

Jojoshua
Posts: 12
Joined: Fri Feb 01, 2019 4:15 pm

Re: Adding multiline rich text

Post by Jojoshua » Sat Feb 09, 2019 1:38 am

Does this actually perform multiline text? Will it handle \n like Acrobat does?

Gabriela
Posts: 436
Joined: Wed Nov 22, 2017 9:52 am

Re: Adding multiline rich text

Post by Gabriela » Sun Feb 10, 2019 3:14 pm

Hi,

Using this method you are able to create a multiline GdPicture XMP text annotation:
https://www.gdpicture.com/guides/gdpicture/web ... Annot.html
Using these methods you are able to create a multiline free text PDF annotations:
https://www.gdpicture.com/guides/gdpicture/web ... ation.html

Jojoshua
Posts: 12
Joined: Fri Feb 01, 2019 4:15 pm

Re: Adding multiline rich text

Post by Jojoshua » Mon Jun 01, 2020 8:23 pm

Gabriela wrote:
Sun Feb 10, 2019 3:14 pm
Hi,

Using this method you are able to create a multiline GdPicture XMP text annotation:
https://www.gdpicture.com/guides/gdpicture/web ... Annot.html
Using these methods you are able to create a multiline free text PDF annotations:
https://www.gdpicture.com/guides/gdpicture/web ... ation.html
The gdpicture method is not accepting rich text similar to how acrobat does in the original example. New lines can be created and individual words can have bold, color, alignment, etc.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest