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!
Modify PDF files model tree |
Post Reply |
Author | |
Justme
Beginner Joined: 17 Mar 14 Status: Offline Points: 5 |
Post Options
Thanks(0)
Posted: 17 Mar 14 at 5:24PM |
I am creating pdf files that have layer data so they can be turned off and on as needed. Some of the layers also have attribute data that can be displayed with the model tree in Acrobat Reader. The problem is when there are multiple layers it takes many clicks with the Adobe PDF Object Data Tool to select an individual object. The first click selects all objects on the page, the next double click selects all objects in a layer and finally the last double click will select the individual item and display the data in the information window. It is my understanding that is by design in Acrobat. You can preselect a layer in the UI first and then double click an object to get it to select but that takes just as long.
We however receive PDF files from various public sources that the model tree has been ungrouped or flattened. This allows for single click selection of any object on the page. I just need to figure out how to do it can anyone point be in the right direction? Our files are being created in ArcGIS and I use the Quick PDF Library to add links, automate page navigation between files, etc. |
|
Justme
Beginner Joined: 17 Mar 14 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Sorry, sample of model trees
Widget 123 456 789 Thing abc xyz Change to Widget: 123 Widget: 456 Widget: 789 Thing: abc Thing: xyz |
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Justme,
Can you please upload a small sample file so we can see what is going on and post the section of code you are using to process the layers if any. Andrew.
|
|
Justme
Beginner Joined: 17 Mar 14 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Thanks for the reply. There are two PDF files at http://files.secureserver.net/0fhfMmWbZbZ5lp. The sample.pdf file is a very basic sample file. If you look at the layers they are listed in a hierarchy which I would like to flatten and remove a few from the layers list that should always be on (Other, Lables, etc.). The model tree is the same which I would also like to flatten.
The second PDF file is from a vendor. Just select "No" for the plug in warning when opening. Please note the flattened layers and model tree. This is what I would like to do with the files I am getting from ArcMap. Yes I could buy the program used to create the second PDF but at $7000 it is a little too expensive. There are also a few image files showing before and after of what I have in mind for the layers and model tree. Cannot get images to upload to the forum.
|
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Justme,
Debenu PDF Library doesn't currently have and functions to work with Adobe created Model Trees. I suspect there is an output option in ArcGIS that can flatten these Model Trees during the creation of the PDF file. I suspect there is not similar option available on ArcMap. Layers are pretty well supported in Debenu Quick PDF Library but I am having trouble working out how the Model Trees are even created / specified in the PDF specifications. Andrew. |
|
Justme
Beginner Joined: 17 Mar 14 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Andrew,
I was able to get the "Layers" fixed by digging/hacking through the raw binary file. Apparently “/OCProperties<</D<</Order" controls the Layer tree. Changed the following line, as noted below, and updated the affected xref and startxref pointers. This will be done the "correct" way later just trying to figure it all out at the moment.
/OCProperties<</D<</Order[ 19 0 R [ 20 0 R 21 0 R [ 22 0 R ] 23 0 R [ 24 0 R 25 0 R 26 0 R ] 27 0 R [ 28 0 R ] ]]>>/OCGs[ 19 0 R 20 0 R 21 0 R 22 0 R 23 0 R 24 0 R 25 0 R 26 0 R 27 0 R 28 0 R]>>
To
/OCProperties<</D<</Order[ (Layers) 24 0 R 25 0 R 26 0 R ]>>/OCGs[ 19 0 R 20 0 R 21 0 R 22 0 R 23 0 R 24 0 R 25 0 R 26 0 R 27 0 R 28 0 R]>>
Still working on the Model Tree but was making progress before calling it quits last night. I think the model tree is controlled by the [Parent] [Kid] relationship of the objects. I was able to hide the ones I did not want to show but also introduced an error into the file. I think I just incorrectly recalculated one of the pointers. Need to try setting the [Parent] of the I want displayed to the [Root] ??? and removing them from the their old [Parent] as [Kids].
Thanks for all your help so far.
|
|
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