Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Flatten Annotations |
Post Reply |
Author | |
CrazyTIm
Team Player Joined: 21 Aug 11 Location: Australia Status: Offline Points: 29 |
Post Options
Thanks(0)
Posted: 01 Nov 12 at 3:46AM |
Hi,
QuickPDF API has a function FlattenFormField... what about annotations (lines, text, etc) or will these be flattened as well when I use FlattenFormField? My problem is that I need to flatten annotations because they cannot be seen using the native PDF viewer on the iPad. Regards, Jason.
|
|
CrazyTIm
Team Player Joined: 21 Aug 11 Location: Australia Status: Offline Points: 29 |
Post Options
Thanks(0)
|
Note: the RenderDocumentToFile function does not render annotations either!
As part of our workflow we add markup to PDFs (annotations). We then need to see our marked-up PDFs on the iPad. Any ideas fellas? Edited by CrazyTIm - 01 Nov 12 at 4:31AM |
|
CrazyTIm
Team Player Joined: 21 Aug 11 Location: Australia Status: Offline Points: 29 |
Post Options
Thanks(0)
|
I have found a solution, but you must have Adobe Acrobat Professional installed. I am using VB.NET to reference the the Adobe Acrobat 10.0 Type Library to interface with Acrobat.
Here's my code: Private G_PDF_App As Acrobat.CAcroApp ''' <summary> Flatten anotations and objects in the PDF. Warning: unreversible changes! This makes annotations viewable nativly on the iPad. </summary> Public Sub PDF_Flatten(ByVal Path As String) Try If G_PDF_App Is Nothing Then G_PDF_App = CType(CreateObject("AcroExch.App"), Acrobat.CAcroApp) End If Dim AVDoc As Acrobat.CAcroAVDoc Dim PDDoc As Acrobat.CAcroPDDoc Dim jso As Object PDDoc = CType(CreateObject("AcroExch.PDDoc"), Acrobat.CAcroPDDoc) If PDDoc.Open(Path) Then ' Create AV doc from PDDoc object AVDoc = PDDoc.OpenAVDoc("TempPDF") ' Hide Acrobat application so everything is done in silent mode G_PDF_App.Hide() ' Create Javascript bridge object jso = PDDoc.GetJSObject Dim tg = jso.flattenPages() If Not PDDoc.Save(1, Path) Then Log.WriteLine("could not flatten file") End If AVDoc.Close(0) PDDoc.Close() End If jso = Nothing PDDoc = Nothing G_PDF_App.Exit() G_PDF_App = Nothing Catch ex As Exception Log.WriteLine("Error: PDF_Flatten") End Try End Sub Hope it helps!
|
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
We will look into adding QP.FlattenAnnotation into a future version of Quick PDF Library.
Andrew.
|
|
CrazyTIm
Team Player Joined: 21 Aug 11 Location: Australia Status: Offline Points: 29 |
Post Options
Thanks(0)
|
Thanks Andrew.
|
|
CrazyTIm
Team Player Joined: 21 Aug 11 Location: Australia Status: Offline Points: 29 |
Post Options
Thanks(0)
|
Hi Andrew, does the feature QP.FlattenAnnotation exist yet?
|
|
jpbro
Senior Member Joined: 29 Mar 11 Status: Offline Points: 77 |
Post Options
Thanks(1)
|
Yes, it was introduced in QPDF 9.14 according to the document (the function is called FlattenAnnot though, not FlattenAnnotation). See:
http://www.debenu.com/docs/pdf_library_reference/FlattenAnnot.php |
|
CrazyTIm
Team Player Joined: 21 Aug 11 Location: Australia Status: Offline Points: 29 |
Post Options
Thanks(0)
|
OK, I'll check it out.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store