什么样的PDF?你在使用什么(PDF)驱动程序?
我可以(我不知道,但我可以)在我的PDF中使用擦除器和bg掩码,没问题。我使用Ghostscript。
***
我有这个,但我不知道什么时候写的,为什么写的(我不记得了)。请根据您的需要随意修改。
当心如果使用注释性文字样式,则以这种方式应用的背景遮罩(例如,不使用“特性”选项板)将产生愚蠢的结果。
- (defun c:tbm (/ ssMtext MtextList doffset ent x)
- (and (setq ssMtext (ssget '((-4 . "<OR") (0 . "MTEXT") (-4 . "OR>"))))
- (setq ssMtext (vl-remove-if 'listp (mapcar 'cadr (ssnamex ssMtext))))
- )
- (foreach x ssMtext
- (setq ent (entget x))
- ;; If no background fill exist
- (if (< (cdr (assoc 90 ent)) 3)
- (progn
- (or doffset
- (setq doffset
- (cond
- ((getdist "\nSpecify border offset factor [1.5]: "))
- (1.5)
- )
- )
- )
- ;; mask not present set it.
- (setq ent (append ent (list '(90 . 3) '(63 . 255) (cons 45 doffset) '(441 . 0))))
- )
- ;; mask present, kill
- (setq ent (subst (cons 90 2) (assoc 90 ent) ent))
- )
- (entmod ent)
- ;; write the ent
- (command "draworder" "p" "" "front")
- )
- ;; (and ssMtext (command "draworder" ssMtext "" "front"))
- ;; (Princ "\nThe Masking is complete.")
- (princ)
- )
|