Jump to content

Recommended Posts

Posted (edited)

Hi,

 

When I masking a text in drawing and create pdf, it look fine, but

When I try to take print out of drawing PDF it come Black background around the text, and text can't be readable,

 

Can anyone help me create lisp for text masking with 255 Color default use for raster Image.

Edited by prapti
Posted
Hi,

 

When I masking a text in drawing and create pdf, it look fine, but

When I try to take print out of drawing PDF it come Black background around the text, and text can't be readable,

 

Can anyone help me create lisp for text masking with 255 Color default use for raster Image.

What do you have so far?

 

I don't use the MText masking much, but perhaps use a wipeout?
PDF hates wipeouts. You end up with a half black square over each piece of text.
Posted
PDF hates wipeouts. You end up with a half black square over each piece of text.

 

Ahh - didn't know that :(

 

Thanks

Posted (edited)
When I masking a text in drawing and create pdf...

 

Just curious :Why is masking text used for before print to pdf?

Edited by mdbdesign
Posted
Just curious :What is masking text used for before print to pdf?
It's good for regular printing, PDFs just hate it.
Posted

What kind of PDFs? What (PDF) Driver are you using?

 

I can (I dont, but i can) use wipeouts and bg masks in my PDFs no problem. I use Ghostscript.

 

***

 

I have this, but im not sure when or why I wrote it (I dont remember). Feel free to fix it to your needs.

 

Beware! Background masks applied this way (and not with the Properties palette for example) will result is goofy results if you are using annotative text styles.

 

(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)
)

Posted
What kind of PDFs? What (PDF) Driver are you using?

 

I can (I dont, but i can) use wipeouts and bg masks in my PDFs no problem. I use Ghostscript.

I've used Acrobat, CutePDF and the default Autocad to PDF.pc3 and never had it work. I gave up on wipeouts looong ago. I generally only need to wipeout a piece of MText here-and-there and I just use the mask built-in to MText. Very interesting. I'll have to give GhostScript a look.

 

Beware! Background masks applied this way (and not with the Properties palette for example) will result is goofy results if you are using annotative text styles.

You can avoid this issue by setting the mask on/off with VL. From there, you can edit the color and width with entmod and all will work fine - I've never found a way to change the color/width with VL.

Posted
What kind of PDFs? What (PDF) Driver are you using?

 

I can (I dont, but i can) use wipeouts and bg masks in my PDFs no problem. I use Ghostscript.

 

***

 

I have this, but im not sure when or why I wrote it (I dont remember). Feel free to fix it to your needs.

 

Beware! Background masks applied this way (and not with the Properties palette for example) will result is goofy results if you are using annotative text styles.

 

(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)
)

 

Se7en Thanks

This lisp's work on Mtext only, not normal text

But any way my problem is solved

Thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...