From zeta-issues-return-173-apmail-incubator-zeta-issues-archive=incubator.apache.org@incubator.apache.org Fri May 13 10:42:30 2011 Return-Path: X-Original-To: apmail-incubator-zeta-issues-archive@minotaur.apache.org Delivered-To: apmail-incubator-zeta-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 20DF94052 for ; Fri, 13 May 2011 10:42:30 +0000 (UTC) Received: (qmail 3717 invoked by uid 500); 13 May 2011 10:42:30 -0000 Delivered-To: apmail-incubator-zeta-issues-archive@incubator.apache.org Received: (qmail 3695 invoked by uid 500); 13 May 2011 10:42:30 -0000 Mailing-List: contact zeta-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zeta-issues@incubator.apache.org Delivered-To: mailing list zeta-issues@incubator.apache.org Received: (qmail 3683 invoked by uid 99); 13 May 2011 10:42:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 May 2011 10:42:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 May 2011 10:42:27 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 57866881F1 for ; Fri, 13 May 2011 10:41:47 +0000 (UTC) Date: Fri, 13 May 2011 10:41:47 +0000 (UTC) From: =?utf-8?Q?Faza=C3=A9_=28JIRA=29?= To: zeta-issues@incubator.apache.org Message-ID: <985600574.9780.1305283307339.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1248209778.9754.1305282827469.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (ZETACOMP-82) ezcDocumentDocbookToOdtConverter does not handle externally linked pictures MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/ZETACOMP-82?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] Faza=C3=A9 updated ZETACOMP-82: -------------------------- Description:=20 When i tried to convert HTML to ODT, ezcDocumentDocbookToOdtConverter faile= d on . Error message: "Could not find image http://..." The problem is : - $converter->getImageLocator()->locateImage check if file_exist on the fil= esystems. - the image is base64 included in the document. then the external location = is lost. I have made a little patch in order to manage external images. Do you think someone can put this patch in SVN ? The converter is still working as before for local file.=20 was: When i tried to convert HTML to ODT, ezcDocumentDocbookToOdtConverter faile= d on . Error message: "Could not find image http://..." The problem is : - $converter->getImageLocator()->locateImage check if file_exist on the fil= esystems. - the image is base64 included in the document. then the external location = is lost. I have made a little patch in order to manage external images. Do you think someone can put this patch in SVN ? The converter is still working as before for real file.=20 # This patch file was generated by NetBeans IDE # It uses platform neutral UTF-8 encoding and \n newlines. --- Base (BASE) +++ Locally Modified (Based On LOCAL) @@ -119,6 +119,17 @@ ( $imgFile =3D $imageData->getAttribute( 'fileref' ) ) ); =20 + // do we have an external image ? + if ( $imgPath =3D=3D=3D false && parse_url($imgFile,PHP_URL_SCHEME= )=3D=3D"http") + { + $imgPath=3D$imgFile; + $image->setAttributeNS(ezcDocumentOdt::NS_XLINK, 'xlink:href', = $imgPath ); + $image->setAttributeNS(ezcDocumentOdt::NS_XLINK, 'xlink:type', = "simple" ); + $image->setAttributeNS(ezcDocumentOdt::NS_XLINK, 'xlink:show', = "embed" ); + $image->setAttributeNS(ezcDocumentOdt::NS_XLINK, 'xlink:actuate',= "onLoad" ); + return $root; + } + if ( $imgPath =3D=3D=3D false ) { $converter->triggerError( > ezcDocumentDocbookToOdtConverter does not handle externally linked pictur= es > -------------------------------------------------------------------------= -- > > Key: ZETACOMP-82 > URL: https://issues.apache.org/jira/browse/ZETACOMP-82 > Project: Zeta Components > Issue Type: Bug > Components: Document > Environment: Kubuntu 11.04 > Reporter: Faza=C3=A9 > Attachments: zeta_hrefimage.patch > > Original Estimate: 10m > Remaining Estimate: 10m > > When i tried to convert HTML to ODT, ezcDocumentDocbookToOdtConverter fai= led on . > Error message: "Could not find image http://..." > The problem is : > - $converter->getImageLocator()->locateImage check if file_exist on the f= ilesystems. > - the image is base64 included in the document. then the external locatio= n is lost. > I have made a little patch in order to manage external images. > Do you think someone can put this patch in SVN ? > The converter is still working as before for local file.=20 -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira