Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Script to Flatten Layers
  FAQ FAQ  Forum Search   Register Register  Login Login


Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Script to Flatten Layers

 Post Reply Post Reply
Author
warrden View Drop Down
New Member
New Member


Joined: 09 Feb 2017
Points: 3
Post Options Post Options   Quote warrden Quote  Post ReplyReply Direct Link To This Post Topic: Script to Flatten Layers
    Posted: 09 Feb 2017 at 9:08pm
Does anyone know how to flatten layers thru javascript? Or apply the function to a button?

Thanks,
Jason
Back to Top
Sponsored Links


Back to Top
warrden View Drop Down
New Member
New Member


Joined: 09 Feb 2017
Points: 3
Post Options Post Options   Quote warrden Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 2017 at 3:14pm
Found it!  Before running the below code you need to create a new preflight profile in adobe.

Tools>Print Production>Preflight>Options>Create New Preflight Profile
(You may have to select the drop down at the top of the Tools Pane to show the Print Production Tab)
Name it Flatten Layers
Under Custom Profiles, expand new profile (Flatten Layers)
Select Fixups
In the all available fixups list, select "Discard hidden layer content and flatten visible layers"
Select blue left facing arrow at bottom of list to move it to your profile
select OK

Add following code to button

var oProfile = Preflight.getProfileByName("Flatten Layers");  
if (oProfile != undefined)  
    this.preflight(oProfile);


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.09
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.047 seconds.