You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-issues@incubator.apache.org by "Fazaé (JIRA)" <ji...@apache.org> on 2011/05/13 10:33:47 UTC

[jira] [Created] (ZETACOMP-82) ezcDocumentDocbookToOdtConverter does not handle externally linked pictures

ezcDocumentDocbookToOdtConverter does not handle externally linked pictures
---------------------------------------------------------------------------

                 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é


When i tried to convert HTML to ODT, ezcDocumentDocbookToOdtConverter failed on <img src="http://...">.

Error message:  "Could not find image http://..."

The problem is :
- $converter->getImageLocator()->locateImage check if file_exist on the filesystems.
- 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. 


# 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 = $imageData->getAttribute( 'fileref' ) )
         );
 
+        // do we have an external image ?
+        if ( $imgPath === false && parse_url($imgFile,PHP_URL_SCHEME)=="http")
+        {
+        $imgPath=$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 === false )
         {
             $converter->triggerError(


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZETACOMP-82) ezcDocumentDocbookToOdtConverter does not handle externally linked pictures

Posted by "Jérôme Renard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZETACOMP-82?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13062682#comment-13062682 ] 

Jérôme Renard commented on ZETACOMP-82:
---------------------------------------

Hi, 

could you please provide tests along with your patch ?

Thanks in advance.

> ezcDocumentDocbookToOdtConverter does not handle externally linked pictures
> ---------------------------------------------------------------------------
>
>                 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é
>         Attachments: zeta_hrefimage.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> When i tried to convert HTML to ODT, ezcDocumentDocbookToOdtConverter failed on <img src="http://...">.
> Error message:  "Could not find image http://..."
> The problem is :
> - $converter->getImageLocator()->locateImage check if file_exist on the filesystems and failed.
> - 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. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (ZETACOMP-82) ezcDocumentDocbookToOdtConverter does not handle externally linked pictures

Posted by "Fazaé (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZETACOMP-82?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fazaé updated ZETACOMP-82:
--------------------------

    Description: 
When i tried to convert HTML to ODT, ezcDocumentDocbookToOdtConverter failed on <img src="http://...">.

Error message:  "Could not find image http://..."

The problem is :
- $converter->getImageLocator()->locateImage check if file_exist on the filesystems and failed.
- 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. 




  was:
When i tried to convert HTML to ODT, ezcDocumentDocbookToOdtConverter failed on <img src="http://...">.

Error message:  "Could not find image http://..."

The problem is :
- $converter->getImageLocator()->locateImage check if file_exist on the filesystems.
- 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. 





> ezcDocumentDocbookToOdtConverter does not handle externally linked pictures
> ---------------------------------------------------------------------------
>
>                 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é
>         Attachments: zeta_hrefimage.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> When i tried to convert HTML to ODT, ezcDocumentDocbookToOdtConverter failed on <img src="http://...">.
> Error message:  "Could not find image http://..."
> The problem is :
> - $converter->getImageLocator()->locateImage check if file_exist on the filesystems and failed.
> - 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. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (ZETACOMP-82) ezcDocumentDocbookToOdtConverter does not handle externally linked pictures

Posted by "Fazaé (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZETACOMP-82?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fazaé updated ZETACOMP-82:
--------------------------

    Attachment: zeta_hrefimage.patch

> ezcDocumentDocbookToOdtConverter does not handle externally linked pictures
> ---------------------------------------------------------------------------
>
>                 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é
>         Attachments: zeta_hrefimage.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> When i tried to convert HTML to ODT, ezcDocumentDocbookToOdtConverter failed on <img src="http://...">.
> Error message:  "Could not find image http://..."
> The problem is :
> - $converter->getImageLocator()->locateImage check if file_exist on the filesystems.
> - 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. 
> # 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 = $imageData->getAttribute( 'fileref' ) )
>          );
>  
> +        // do we have an external image ?
> +        if ( $imgPath === false && parse_url($imgFile,PHP_URL_SCHEME)=="http")
> +        {
> +        $imgPath=$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 === false )
>          {
>              $converter->triggerError(

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (ZETACOMP-82) ezcDocumentDocbookToOdtConverter does not handle externally linked pictures

Posted by "Fazaé (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZETACOMP-82?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fazaé updated ZETACOMP-82:
--------------------------

    Description: 
When i tried to convert HTML to ODT, ezcDocumentDocbookToOdtConverter failed on <img src="http://...">.

Error message:  "Could not find image http://..."

The problem is :
- $converter->getImageLocator()->locateImage check if file_exist on the filesystems.
- 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. 




  was:
When i tried to convert HTML to ODT, ezcDocumentDocbookToOdtConverter failed on <img src="http://...">.

Error message:  "Could not find image http://..."

The problem is :
- $converter->getImageLocator()->locateImage check if file_exist on the filesystems.
- 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. 


# 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 = $imageData->getAttribute( 'fileref' ) )
         );
 
+        // do we have an external image ?
+        if ( $imgPath === false && parse_url($imgFile,PHP_URL_SCHEME)=="http")
+        {
+        $imgPath=$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 === false )
         {
             $converter->triggerError(



> ezcDocumentDocbookToOdtConverter does not handle externally linked pictures
> ---------------------------------------------------------------------------
>
>                 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é
>         Attachments: zeta_hrefimage.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> When i tried to convert HTML to ODT, ezcDocumentDocbookToOdtConverter failed on <img src="http://...">.
> Error message:  "Could not find image http://..."
> The problem is :
> - $converter->getImageLocator()->locateImage check if file_exist on the filesystems.
> - 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. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira