head 1.3; access; symbols RELEASE_5_3_0:1.2 RELEASE_4_10_0:1.2; locks; strict; comment @# @; 1.3 date 2004.10.27.08.37.27; author matusita; state dead; branches; next 1.2; 1.2 date 2004.02.08.17.34.18; author matusita; state Exp; branches; next 1.1; 1.1 date 2004.02.08.16.29.16; author matusita; state Exp; branches; next ; desc @@ 1.3 log @Update to 20040411. Even though it is still a test version, many users, including hrs-san (the MAINTAINER of teTeX-related ports), said it's ok for daily use. Also update to adopt to recent teTeX-related ports strucute. PR: 68218 Patch submitted by: hrs @ text @Origin: http://cvs.ktug.or.kr/viewcvs/dvipdfmx/src/psspecial.c.diff?r1=1.3&r2=1.4&diff_format=u This patch enables to handle dvifile using epsbox.sty. The epsbox.sty embeds EPS files with "postscriptbox" directive, but original dvipdfmx doesn't know what postscriptbox is, showing "Unrecognized special ignored" and exit abnormally. See also: http://www.matsusaka-u.ac.jp/~okumura/texfaq/qa/23745.html (in Japanese) --- contents below -- =================================================================== RCS file: /home/cvsroot/dvipdfmx/src/psspecial.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- dvipdfmx/src/psspecial.c 2002/10/30 02:27:16 1.3 +++ dvipdfmx/src/psspecial.c 2003/11/28 23:57:51 1.4 @@@@ -1,4 +1,4 @@@@ -/* $Header: /home/cvsroot/dvipdfmx/src/psspecial.c,v 1.3 2002/10/30 02:27:16 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/psspecial.c,v 1.4 2003/11/28 23:57:51 hirata Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@@@ -260,6 +260,55 @@@@ result = 1; /* Likewise */ do_raw_ps_special (&start, end, 1, block_pending?pending_x:x_user, block_pending?pending_y:y_user); + } else if (!strncmp (start, "postscriptbox", strlen("postscriptbox"))) { + char filename[256]; + double width, height; + + if (sscanf (start+13, "{%lfpt}{%lfpt}{%256[^}]}", + &width, &height, filename) == 3) { + struct xform_info *p = new_xform_info(); + + p -> width = width*72/72.27; + p -> height = height*72/72.27; + + { + FILE *image_file; + char *kpse_file_name; + char buf[256], *pos; + if ((kpse_file_name = kpse_find_pict (filename)) && + (image_file = MFOPEN (kpse_file_name, FOPEN_R_MODE))) { + while (fgets (buf, 256, image_file)) { + if ((pos = strstr(buf, "%%BoundingBox:" )) != NULL){ + double llx, lly, urx, ury; + + while (*pos++ != ':' ); + if (sscanf (pos, "%lf %lf %lf %lf", + &llx, &lly, &urx, &ury) == 4) { + p -> u_llx = llx; + p -> u_lly = lly; + p -> u_urx = urx; + p -> u_ury = ury; + p -> user_bbox = 1; + break; + } + } + } + MFCLOSE (image_file); + } + } + + if(p -> user_bbox && validate_image_xform_info (p)) { + pdf_obj *embeded; + embeded = embed_image (filename, p, x_user, y_user, NULL); + if (embeded) + pdf_release_obj (embeded); + result = 1; + } + + release_xform_info (p); + } } + return result; } + @ 1.2 log @Replace delta with via dvipdfmx CVSweb. Rewrite comments. Since the delta is functionally identical between previous one and this one, I don't bump PORTREVISION. @ text @@ 1.1 log @Add two patches: - Vendor-supplied critical bugfix on using TrueType fonts with Identity-H CMap. - Handle embedded PS files using "epsbox.sty". Contents changed so bump PORTREVISION. Also take MAINTAINERship. Reviewed by: kuriyama @ text @d1 1 a1 1 Origin: http://www.matsusaka-u.ac.jp/~okumura/texfaq/qa/23745.html d8 2 a9 5 Note that following 8bit strings are Japanese EUC characters. Actually this file is a Web bulletinboard message; there is "name" field, but it only says "noda"-san (no email address or contact information are there), I cannot contact to the person posted this. If there's something wrong, please contact to matusita@@FreeBSD.org, current MAINTAINER of this port. d12 14 a25 23 23745

Re: dvipdfm・・・

名前: 野田
日時: 2003-11-24 00:36:45
IPアドレス: 218.47.0.*

>>20624 だいぶ前の話な上に元質問者の方は既に解決済みのようですが… 古いソースから作成したDVIファイルをPDF化するのに,epsbox.styに対応する 必要に迫られたため,dvipdfmx用のepsbox.sty対応パッチを作成しました. 別解ということで,投稿しておきます. diff -ur dvipdfmx-20031110.orig/src/psspecial.c dvipdfmx-20031110/src/psspecial.c --- dvipdfmx-20031110.orig/src/psspecial.c 2002-10-30 11:27:16.000000000 +0900 +++ dvipdfmx-20031110/src/psspecial.c 2003-11-14 09:56:59.000000000 +0900 @@@@ -260,6 +260,53 @@@@ d27 1 a27 1 do_raw_ps_special (&start, end, 1, d34 1 a34 1 + &width, &height, filename) == 3) { d36 3 a38 3 + + p -> width = width*72/72.27; + p -> height = height*72/72.27; d44 1 a44 1 + if ((kpse_file_name = kpse_find_pict (filename)) && d52 6 a57 6 + &llx, &lly, &urx, &ury) == 4) { + p -> u_llx = llx; + p -> u_lly = lly; + p -> u_urx = urx; + p -> u_ury = ury; + p -> user_bbox = 1; d65 2 a66 2 + + if(p -> user_bbox && validate_image_xform_info (p)) { d77 1 d80 1 a80 15

この書き込みへの返事:

お名前
題名 
メッセージ(タグは <a href="...">...</a> だけ使えます)

@