acObjectTypeStickyNote does not create correctly

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
killers
Posts: 6
Joined: Mon Nov 03 2003
Location: Plano, TX

acObjectTypeStickyNote does not create correctly

Post by killers »

When I dynamically create a sticky note in a PDF viewer it is not coming out right and ends up in the upper left and corner of the page. Here is the code I used to create it. I have set the license key. Also cannot edit it. Also if you try to set the width and height in the OnNewObject it doesn't reflect it. If you click on it it will show the rectangle of the size i set and you have to size it manually for it to refresh. IacObject.Refresh does not work or PDF.RedrawObject doesn't work.

PDF.CreateObject(acObjectTypeStickyNote, 'TestNote');
PDF.ObjectAttribute['TestNote', 'Left'] := 2 * 1440;
PDF.ObjectAttribute['TestNote', 'Top'] := 2 * 1440;
PDF.ObjectAttribute['TestNote', 'Right'] := 4 * 1440;
PDF.ObjectAttribute['TestNote', 'Bottom'] := 3 * 1440;
PDF.ObjectAttribute['TestNote', 'Author'] := 'Me';
PDF.ObjectAttribute['TestNote', 'Text'] := 'This is a test and only a test';
PDF.ObjectAttribute['TestNote', 'Locked'] := 0;

Help please,

Kenneth Lewis
Intuit, Inc.
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello Kenneth,

I have already replied to your email but I will post the replied in case an other user also has this question.


The issue you are encountering with Sticky Notes and highlights is that both Sticky Notes and highlights have 2 bounding rectangles, one when they are opening and one when they are closed. You need to set both properties similarly to the Visual Basic code below:



'Create an Open state sticky note
'========================================
.CreateObject acObjectTypeStickyNote, "StickyNote"
.ObjectAttribute("StickyNote", "Note Top") = 1000
.ObjectAttribute("StickyNote", "Note Left") = 1000
.ObjectAttribute("StickyNote", "Note Right") = 5000
.ObjectAttribute("StickyNote", "Note Bottom") = 5000
.ObjectAttribute("StickyNote", "Text") = "Hello Text"
'=======================================
.ObjectAttribute("StickyNote", "Open") = True

'Create closed state sticky note
'========================================
.ObjectAttribute("StickyNote", "Icon Top") = 950
.ObjectAttribute("StickyNote", "Icon Left") = 1000
.ObjectAttribute("StickyNote", "Icon Right") = 1300
.ObjectAttribute("StickyNote", "Icon Bottom") = 1250
'========================================
.ObjectAttribute("StickyNote", "Open") = False


Thanks
Post Reply