Skip to content

MallikarjunHt/Csharp-Adobe-Automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Csharp-Adobe-Automation

Automating Adobe InDesign using C# programing

docTOIndd ➡️ import docx file and extract text and place in InDesign and sving file.

word manuplation => https://www.c-sharpcorner.com/forums/how-to-get-current-document-styles-from-word-document https://docs.microsoft.com/en-us/dotnet/api/microsoft.office.interop.word.paragraphformat?view=word-pia

InDesign.Texts texts= (InDesign.Texts)frames.Texts;
InDesign.Text text = (InDesign.Text)texts.FirstItem();
for (int i = 1; i <= application.Fonts.Count; i++)
               {
                   InDesign.Font font = (InDesign.Font)application.Fonts[i];
                   if(font.FullName.Equals("Acumin Variable Concept SemiCondensed Black Italic"))
                   {
                       text.AppliedFont = font;
                       break;
                   }
               } 
if(doc.Hyperlinks.Count > 0)
                {
                    for (int i = doc.Hyperlinks.Count; i >= 0; i--)
                    {
                        InDesign.Hyperlink hyperlink = (InDesign.Hyperlink)doc.Hyperlinks[i];
                        hyperlink.Delete();
                    }
                }

http://blog.gilbertconsulting.com/2007/10/use-grep-to-find-url.html

[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7} finds Email Both Email and URL [\S]+[.][\S]+ grep {finfwhat:"([\S]+[.][\S]+)"} {changeTo:"$1"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:true} Find all Email and URL's and change Style.

application.WordRTFImportPreferences.ResolveCharacterStyleClash = InDesign.idResolveStyleClash.idResolveClashUseExisting;
application.WordRTFImportPreferences.ResolveParagraphStyleClash = InDesign.idResolveStyleClash.idResolveClashUseExisting;
application.WordRTFImportPreferences.ImportUnusedStyles = false;
application.WordRTFImportPreferences.ConvertBulletsAndNumbersToText = false;

About

Automating Adobe InDesign using C# programing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages