Sign In  Sign Up Live-Chat

Web Image in XML document does not appear to work

Last post 04-18-2008, 4:45 AM by Hans.firefox. 5 replies.
Sort Posts: Previous Next
  •  03-18-2008, 10:33 AM 118193

    Web Image in XML document does not appear to work

    If I include the following in a <Section> element in an XML document, I get an ArgumentException: Invalid image file name when I convert XML to PDF.

    <Image Url="http://newsimg.bbc.co.uk/media/images/41117000/jpg/_41117127_ele_ap_i203.jpg" Type="Jpeg" />

     
  •  03-18-2008, 4:41 PM 118266 in reply to 118193

    Re: Web Image in XML document does not appear to work

    Hi,

    Please use something like this:

    <?xml version="1.0" encoding="utf-8" ?>
      <Pdf xmlns="Aspose.Pdf">
       <Section>
            <Image File="http://newsimg.bbc.co.uk/media/images/41117000/jpg/_41117127_ele_ap_i203.jpg" Type="jpeg">
                    <Title>JPEG image</Title>
            </Image>
       </Section>
      </Pdf>

    Thanks.

     
  •  03-19-2008, 4:56 AM 118360 in reply to 118266

    Re: Web Image in XML document does not appear to work

    Thank you. I was using the Url property to set the location of the image rather than the File property.

    • What is the purpose of the Url property?
    • If the File property is required, why is this not enforced in your schema?

    Please note also the following error. In this XML, if the comment tags are removed, a timeout exception always occurs.

    <?xml version="1.0" encoding="utf-8"?>

    <Pdf xmlns="Aspose.Pdf"

    Author="Joe Bloggs" Creator="Aspose.Pdf" Keywords="Test"

    Title="Doc Title" Subject="Doc Subject">

    <Section PageWidth="595" PageMarginLeft="10" PageMarginRight="10" PageMarginTop="10" PageMarginBottom="10">

    <Header Alignment="Left">

    <Text>

    <Segment>Header</Segment>

    </Text>

    <Image File="http://newsimg.bbc.co.uk/media/images/41117000/jpg/_41117127_ele_ap_i203.jpg" Type="Jpeg">

    <Title>JPEG image</Title>

    </Image>

    </Header>

    <!--

    <Image File="http://newsimg.bbc.co.uk/media/images/41117000/jpg/_41117127_ele_ap_i203.jpg" Type="Jpeg">

    <Title>JPEG image</Title>

    </Image>

    -->

    <Table Alignment="Left" ColumnAdjustment="AutoFitToContent">

    <Border>

    <All LineWidth="1" Color="Blue" />

    </Border>

    <Row BackgroundColor="Blue">

    <Cell>

    <Text Color="White">

    <Segment>Code</Segment>

    </Text>

    </Cell>

    <Cell>

    <Text Color="White">

    <Segment>Description</Segment>

    </Text>

    </Cell>

    <Cell>

    <Text Color="White">

    <Segment>Sale Date</Segment>

    </Text>

    </Cell>

    <Cell>

    <Text Color="White">

    <Segment>Location</Segment>

    </Text>

    </Cell>

    <Cell>

    <Text Color="White">

    <Segment>Lot</Segment>

    </Text>

    </Cell>

    <Cell>

    <Text Color="White">

    <Segment>Reg. Date</Segment>

    </Text>

    </Cell>

    </Row>

    <Row>

    <Cell>

    <Text>

    <Segment>994131Y</Segment>

    </Text>

    </Cell>

    <Cell>

    <Text>

    <Segment>Now is the winter of our discontent made glorious summer by this sun of York. To be or not to be, that is the question. Whether 'tis etc.</Segment>

    </Text>

    </Cell>

    <Cell>

    <Text>

    <Segment>19-03-2008</Segment>

    </Text>

    </Cell>

    <Cell>

    <Text>

    <Segment>Clapham Junction</Segment>

    </Text>

    </Cell>

    <Cell>

    <Text>

    <Segment>LDV153</Segment>

    </Text>

    </Cell>

    <Cell>

    <Text>

    <Segment>23-09-2002</Segment>

    </Text>

    </Cell>

    </Row>

    </Table>

    </Section>

    </Pdf>

     
  •  03-20-2008, 4:31 AM 118567 in reply to 118360

    Re: Web Image in XML document does not appear to work

    Hi,

    When the image is used as a hyperlink then the Url specifies the link to which it points. As for enforcing File attribute I will discuss this with the developers.

    Also I was able to reproduce the error that you specified and will discuss that with the developers as well.

    Thanks.

     
  •  03-20-2008, 6:37 PM 118693 in reply to 118567

    Re: Web Image in XML document does not appear to work

    Hi,

    We are going to modify the schema to enforce the File attribute. I have also logged the timeout error in out issue tracking system as PDFNET-4645. We will try our best to resolve this as soon as possible.

    Thanks.

     
  •  04-18-2008, 4:45 AM 122963 in reply to 118693

    Re: Web Image in XML document does not appear to work

    Attachment: Present (inaccessible)
    Hi,

    The issue PDFNET-4645 has been fixed. Please try the attachment. Thank you very much for your patience.

    Best regards.

    Hans Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
View as RSS news feed in XML