Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 92406

Re: Is that possible to write a script for export underline text to PDF?

$
0
0

Thank you Chinna, thank you so much, geat for you to help, appreciate!

 

but I still continued to seek my second version

 

var doc = app.documents; 

app.findTextPreferences = null; 

app.findTextPreferences.underline = true; 

 

app.findTextPreferences.underlineColour = red;     <-------------- Can I add this line?

 

for(var i=0;i<doc.length;i++) 

var found = doc[i].findText(); 

var _pages = []; 

for(var j=0;j<found.length;j++) 

        { 

var txfms = found[j].texts[0].parentTextFrames; 

for(var k=0;k<txfms.length;k++) 

                { 

                        _pages.push(txfms[k].parentPage.name); 

                    } 

            } 

for(var j=0;j<_pages.length;j++) 

        { 

if(_pages[j] === _pages[j-1]) 

                { 

                        _pages.splice(j,1); 

                    } 

            } 

if(_pages.length != 0

        { 

                app.pdfExportPreferences.pageRange = _pages.toString(); 

                doc[i].exportFile(ExportFormat.PDF_TYPE, new File(doc[i].fullName.toString().replace(/\.indd$/i,".pdf")), false); 

            } 

        _pages = []; 

    } 

app.findTextPreferences = null;

 

 

 


Viewing all articles
Browse latest Browse all 92406

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>