Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).


New Forum | Previous | Next | (P-PDF) Developers


Topic: Unable to Delete?!?
Conf: (P-PDF) Developers, Msg: 59567
From: dougmart
Date: 5/29/2002 05:39 PM

After adding freetext annotation to a PDF document using the JSObjext, I cannot delete the file. If I open it with Acrobat and then close it, it wiil then delete.

This is the section of code (VB6) that is causing the problem. Is there something I am forgetting to close?
The file seems to still be active after the program has ended. Therefore, I cannot delete it until I reopen with Acrobat and close it down.

Set jso = AcroExchPDDoc.GetJSObject
If Not jso Is Nothing Then
' Get size for page 0 and setup arrays
Set page = AcroExchPDDoc.AcquirePage(0)
Set pageRect = page.GetSize
point(0) = 0
point(1) = pageRect.y
Rect(0) = 350
Rect(1) = 0
Rect(2) = 600
Rect(3) = 50

' Create a new FreeText annot
Set annot = jso.AddAnnot
Set props = annot.getProps
props.Type = "FreeText"
annot.setProps props

' Fill in Property fields
Set props = annot.getProps
props.page = 0
props.TextFont = "OCR-A"
props.Rect = Rect
props.author = "Douglas A. Martin"
props.Alignment = 0
props.Width = 0
props.strokeColor = jso.Color.black
props.Contents = LockBox
annot.setProps props
End If

bOK = AcroExchPDDoc.Save(1, OutPutFile)
If bOK = False Then
NoticeStatus = 1
End If
AcroExchPDDoc.Close
AcroExchAVDoc.Close 1


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.