Adobe Illustrator 9에서 연결된 이미지의 경로를 어떻게 찾습니까? [닫은

StackOverflow https://stackoverflow.com/questions/524020

  •  22-08-2019
  •  | 
  •  

문제

링크 된 이미지가있는 일러스트 레이터 파일이 있습니다. 실제로 이미지를 포함하고 싶습니다. 먼저 그들이 어떤 파일인지 알아야합니다. 어떻게 알 수 있습니까? Illustrator 9를 사용하고 있습니다.

도움이 되었습니까?

해결책

내가 사용한 첫 번째 일러스트 레이터 버전은 10이지만 버전 9에는 링크가 있습니까? 창 메뉴를 시도하고 "링크"를 찾으십시오. 원하는 이미지를 검색 할 수있는 몇 가지 옵션이 있습니다.

다른 팁

최신 버전의 Illustrator를 사용하면이 스크립트를 사용하여 깨진 이미지로 링크를 대체 할 수 있습니다.

http://techblog.willshouse.com/2011/01/16/update-illustrator-linked-files-script/

방금 Illustrator CS4 에서이 문제가있었습니다. 내 물건의 많은 부분이 최근에 보관되었습니다.

아트 보드에서 "누락 된"이미지를 클릭하십시오.

왼쪽 상단에는 파일 이름이 표시됩니다.

후속 드롭 다운 메뉴에서 "원본 편집"을 클릭하십시오. Illustrator는 파일을 찾으려고 시도하고 경고 창 "Windows가 파일을 찾을 수 없음"등을 플래시하여 전체 파일 위치를 제공합니다.

이것은 링크 창에서 원본 편집이 회색으로 표시되므로 유용합니다. 광대 한 파일 라이브러리가있는 나와 같은 사람들에게 매우 유용합니다.

포스터가 설정되어 있다는 것을 알게되어 기쁩니다. 그러나 이것은 질문에 대한 답이 아닙니다. CS3에서는 링크 팔레트에서 이미지를 두 번 클릭하면 TI가 링크 된 요소에 대한 링크 정보를 가져 오는데, 이는 파일의 경로를 표시합니다 (창보다 더 길지 않은 경우).

아마도 이전 버전에서는이 작업을 수행 할 수 있습니다.

불행히도, 누락 된 링크 요소를 다루고 있다면 (파일을 열 때 수정하기 위해 무시한)이 필드는 비어 있습니다. Illustrator는 파일 포장 및 링크에 대한 Indesign과 비교하여 짜증납니다. Indesign과 같은 파일을 포장하고 외부 리소스에 대한 상대적 참조를 저장할 수 있다면 좋을 것입니다.

그림자 파일의 링크 된 이미지를 추적하기 위해 다음 Perl 스크립트를 사용합니다. 이는 일러스트 레이터 파일 내부를 엿볼 수 있도록 링크 된 이미지의 전체 경로를 알려주기 때문에 특히 링크가 깨진 링크에 도움이됩니다. 그것은 분명히 여기에서 필요한 사람보다 더 많은 일을하지만 아마도 유용 할 것입니다. 도움은 그것을 사용하는 방법을 설명해야합니다. 내 컴퓨터에서 나는 그것을 ailinkedfiles.pl이라고 불렀고 나는 그것을 내 길에있는 ~/bin에 넣었다.

#!/usr/bin/perl 

# program to find the linked files inside an Adobe Illustrator file
require 5.004;
use File::Basename;   # to extract a filename from a full path
use File::Find;       # to build a list of files
use File::Spec;       # Platform independent way to build paths
use vars qw/ %opt /;  # for command line options - see init()
use strict;


init(); # process command line options

# Autoflush stdout
$|=1;

if ($opt{p}){
 die "Did you really mean to call your script ".$opt{p}."!\n" if($opt{p} =~ /\.ai$/i); 
 print "Generating script file $opt{p}\n" if $opt{v};
 open SCRIPT, "> $opt{p}"; 
}

die "No input specified; use ".basename($0)." -h for help\n" if(@ARGV==0);
my $arg; foreach $arg (@ARGV){
 if(-d $arg){
  # nb it is necesary to convert the directory specification
  # to an absolute path to ensure that the open in &findLinkedFiles
  # works properly during multi directory traversal
  my $InDir=File::Spec->rel2abs($arg); 
  find(\&handleFind,$InDir); 
 } elsif (-f $arg) {
 my $InDir=File::Spec->rel2abs(dirname($ARGV[0])); 
   &findLinkedFiles(File::Spec->rel2abs($ARGV[0]),$InDir) ;
#   &findLinkedFiles(File::Spec->rel2abs($arg)) ;
 }
}

sub init()
# copied from: http://www.cs.mcgill.ca/~abatko/computers/programming/perl/howto/getopts
{
 use Getopt::Std;      # to handle command line options
 my $opt_string = 'hvlzdsftnp:ux:';
 getopts( "$opt_string", \%opt ) or usage();
 usage() if $opt{h};
}

# Print out usage information
sub usage()
{
 print STDERR << "EOF"; 
Usage: $0 [OPTIONS] <AIFILE/DIR>

Parse an Adobe Illustrator file or (recursively) parse a directory of ai files
and print a list of the linked files to STDOUT.  These could be piped to xargs eg:
$0 aifile.ai | xargs -I {} ln -vs

 -h print this help
 -v verbose ouput
 -s print file names with short path
 -d print current directory on each line
 -n no-print (suppresses printing of linked file names)
 -x <regex> exclude files whose full path matches regex 

 -l symlink in current directory if file linked from Illustrator file exists somewhere else
 -f force symlink to overwrite existing target file
 -t test run
 -p <file> write commands to a script file

 -u status of src and target
  - doesn't exist
  F plain file
  L symbolic link
  E exists (unknown file type)

 Note that src is the link contained in the Illustrator file and
 target is a file of the same name in the same directory as the Illustrator file

 If the status is -- you will have problems in Illustrator
 If the status is -F Illustrator will substitute the local file for the unavailable linked file
 If the status is F- you can run this script with the -s option to make a symlink 
 If the status is FF then Illustrator will be happy 

EOF
 exit();  
}

sub mysymlink{
 my ($src,$targetdir)=@_;
 my $target=File::Spec->catdir($targetdir,basename($src)); 

 if(File::Spec->rel2abs($src) eq File::Spec->rel2abs($target)){
  print "src and target identical for src=$src\n" if $opt{v};  
  return;  
 }

 if(-e $src){
  my $opts=$opt{f}?"-fsv":"-sv";  
  my $cmd="ln $opts \"$src\" \"$target\"";   
  myexec("$cmd");
 } else {
  print "No link made: $src doesn't exist\n" if $opt{v};
 }
}
sub myexec {
 my ($cmd) = @_; 
 if ($opt{t}){
  print STDERR "test: $cmd\n";
 }  elsif ($opt{p}){
  print SCRIPT $cmd,"\n";
 }  else {
  # should get to see output with system
  print STDERR "run: $cmd\n" if $opt{v}; 
  return system $cmd;  
 }
}

sub mystatus{
 my ($src,$targetdir)=@_;
 my $target=File::Spec->catdir($targetdir,basename($src)); 

 my ($ss,$ts)=("-","-"); 

 $ss = "E" if(-e $src);
 $ss = "F" if(-f $src); 
 $ss = "L" if(-l $src);
 $ts = "E" if(-e $target);
 $ts = "F" if(-f $target); 
 $ts = "L" if(-l $target);
 return ($ss.$ts);
}

# This extracts the file info from the header
sub handleFind{
 # get the file name
 my $FullFoundFile = $File::Find::name;
 #print $FullFoundFile,"\n";

 return if ($opt{x} and $FullFoundFile =~ /$opt{x}/i); 

 # parse if it ends in ai
 findLinkedFiles($FullFoundFile, $File::Find::dir) if ($FullFoundFile =~ /\.ai$/i);
}


# This does the actual parsing of the Illustrator Files
sub findLinkedFiles{
 my ($InFile,$InDir)=@_; 

 # protect with escaped quotes for shell if non-empty
 my $ProtectedInDir=$InDir?"\"$InDir\"":$InDir; 

 die "Can't open $InFile \: $!\n"  unless open(AIFILE, "<$InFile");
 binmode(AIFILE);

 # %%DocumentFiles is the starting point 
 $/="%%"; 
 my @lines = readline<AIFILE>; 

 if(@lines==0){
  print STDERR "can't read header of $InFile\n" if $opt{v} ; # the header length
  return;   
 }

 print "################\n"; 

 if ($opt{s}){
  print "# FILE = ",basename($InFile),"\n";  
 } else {
  print "# FILE = ",$InFile,"\n"; 
 }
 for my $i ( 0 .. $#lines ){  
#  if ( $lines[$i]=~/^DocumentFiles\:(.*?)\W+%%/){
# not sure why we need two % signs here
  if ( $lines[$i]=~/^DocumentFiles\:(.*?)\W+%/){
   print mystatus($1,$InDir)," " if $opt{u} and not $opt{n};
   print "\"$1\" ",$opt{d}?$ProtectedInDir:"","\n" unless $opt{n};
   $i++;
   mysymlink($1,$InDir) if $opt{l};
   while($lines[$i]=~/^[+](.*?)\W\%.*$/){
#    print "\"$1\" $InDir\n"; $i++;   
    print mystatus($1,$InDir)," " if $opt{u} and not $opt{n};
    print "\"$1\" ",$opt{d}?$ProtectedInDir:"","\n"unless $opt{n};
    $i++;
    mysymlink($1,$InDir) if $opt{l};     
   }

  }
 } 
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top