Free Support Forum - aspose.com

Invalid size of text box in ShowBoxed method?

This is in the event log when generating a .pdf through .xsl…

3) Exception Information
*********************************************
Exception Type: System.ArgumentException
Message: Invalid size of text box in ShowBoxed method.
ParamName: NULL
TargetSite: az a(e2, System.String, Single, Single, Single, Single, System.String, Boolean, Single, Int32)
HelpLink: NULL
Source: Aspose.Pdf

Can I view the ShowBoxed method?

Dear charmer,

Thanks for your consideration.

Can you please send me an example code which can reproduce this error? The ShowBoxed is a internal method. The exception means there is a bug. Do you use the latest hot fix?

I think we have the latest hot fix. How would I check to see?

Here is my .XSL code

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version=“1.0” xmlns:a=“http://Charmer-Sunbelt.com/ProductsDataSet.xsd” xmlns:xsl=“http://www.w3.org/1999/XSL/Transform”>
<xsl:output omit-xml-declaration=“yes” indent=“yes” />
<xsl:param name=“ProductsImageDir”/>
<xsl:param name=“LogoImageDir”/>
<xsl:param name=“ReportTitlesImageDir”/>
<xsl:param name=“StateCode”/>
<xsl:param name=“HouseID”/>
<xsl:param name=“CurrentOrNew”/>
<xsl:param name=“NBSSizeCode”/>
<xsl:param name=“CategoryCode”/>
<xsl:param name=“CurrentDate”/>
<xsl:param name=“PercentDollars”/>
<xsl:param name=“ShowDiscount”/>

<xsl:key name=“Category” match=“a:Category” use=“a:CategoryCode”/>
<xsl:key name=“RegionGroup” match=“a:RegionGroup” use=“a:RegionGroupCode”/>
<xsl:key name=“Varietal” match=“a:Varietal” use=“a:VarietalCode”/>

<xsl:template match="text()|a:">



<xsl:call-template name=“Header” />
<xsl:call-template name=“Footer” />
xsl:choose
<xsl:when test=“count(/a:ProductsDataSet/a:RegionGroup)>0”>
<xsl:apply-templates select="/a:ProductsDataSet/a:RegionGroup[(count(. | key(‘RegionGroup’, RegionGroupCode)[1])=1)]">
<xsl:sort select=“a:RegionGroupName” data-type=“text” order=“ascending”/>
</xsl:apply-templates>
</xsl:when>
xsl:otherwise<xsl:call-template name=“NoRecords”/></xsl:otherwise>
</xsl:choose>


</xsl:template>
<xsl:template name=“NoRecords”>






No products found.





</xsl:template>
<xsl:template match="/a:ProductsDataSet/a:RegionGroup">

<xsl:attribute name=“IsFirstParagraph”>
xsl:choose
<xsl:when test=“position() = 1”><xsl:copy-of select=“false()”/></xsl:when>
xsl:otherwise<xsl:copy-of select=“true()”/></xsl:otherwise>
</xsl:choose>
</xsl:attribute>




<xsl:value-of select=“normalize-space(a:RegionGroupName)”/>




<xsl:variable name=“RegionGroupCode” select=“a:RegionGroupCode” />
<xsl:apply-templates select="/a:ProductsDataSet/a:Category[(count(. | key(‘Category’, CategoryCode)[1])=1) and (a:CategoryCode=(/a:ProductsDataSet/a:ePRIDE_Pricing[(a:RegionGroupCode=$RegionGroupCode)]/a:CategoryCode))]">
<xsl:sort select=“a:CategoryName” data-type=“text” order=“ascending”/>
<xsl:with-param name=“RegionGroupCode” select=“a:RegionGroupCode”/>
</xsl:apply-templates>

</xsl:template>
<xsl:template match="/a:ProductsDataSet/a:Category">
<xsl:param name=“RegionGroupCode”/>





<xsl:value-of select=“normalize-space(a:CategoryName)”/>




<xsl:variable name=“CategoryCode” select=“a:CategoryCode” />
<xsl:apply-templates select="/a:ProductsDataSet/a:Varietal[(count(. | key(‘Varietal’, VarietalCode)[1])=1) and (a:VarietalCode=(/a:ProductsDataSet/a:ePRIDE_Pricing[(a:RegionGroupCode=$RegionGroupCode) and (a:CategoryCode=$CategoryCode)]/a:VarietalCode))]">
<xsl:sort select=“a:VarietalName” data-type=“text” order=“ascending”/>
<xsl:with-param name=“RegionGroupCode” select="$RegionGroupCode"/>
<xsl:with-param name=“CategoryCode” select=“a:CategoryCode”/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="/a:ProductsDataSet/a:Varietal">
<xsl:param name=“RegionGroupCode”/>
<xsl:param name=“CategoryCode”/>





<xsl:value-of select=“normalize-space(a:VarietalName)”/>




<xsl:variable name=“VarietalCode” select=“a:VarietalCode”/>
<xsl:apply-templates select="/a:ProductsDataSet/a:ePRIDE_Pricing[(a:RegionGroupCode=$RegionGroupCode) and (a:CategoryCode=$CategoryCode) and (a:VarietalCode=$VarietalCode)]">
<xsl:sort select=“a:ListPrice” data-type=“number” order=“ascending”/>
<xsl:sort select=“a:LocalProductName” data-type=“text” order=“ascending”/>
<xsl:with-param name=“RegionGroupCode” select="$RegionGroupCode"/>
<xsl:with-param name=“CategoryCode” select="$CategoryCode"/>
<xsl:with-param name=“VarietalCode” select=“a:VarietalCode”/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="/a:ProductsDataSet/a:ePRIDE_Pricing">
<xsl:param name=“RegionGroupCode”/>
<xsl:param name=“CategoryCode”/>
<xsl:param name=“VarietalCode”/>







<xsl:value-of select=“normalize-space(a:LocalProductID)”/>






<xsl:value-of select=“concat(’$’,format-number(a:ListPrice, ‘#.00’))”/>
<xsl:apply-templates select=“a:PostOff”/>






<xsl:value-of select=“a:VintageDesc”/>






<xsl:value-of select=“a:BottlesPerCase”/>






<xsl:value-of select=“normalize-space(a:LocalProductName)”/>





<xsl:if test=“string(a:Discount1QtyCaseBottle)”>



<xsl:value-of select=“a:Discount1QtyCaseBottle”/>






<xsl:value-of select=“a:Discount1Discount”/>



</xsl:if>


<xsl:if test=“string(a:Discount2QtyCaseBottle)”>



<xsl:value-of select=“a:Discount2QtyCaseBottle”/>






<xsl:value-of select=“a:Discount2Discount”/>



</xsl:if>




</xsl:template>
<xsl:template match=“a:PostOff”>
<xsl:if test=“number(.) and (9. > 0)”> §</xsl:if>
</xsl:template>
<xsl:template match=“a:EffectiveDate”>

<xsl:if test=“string(text())”>
<xsl:variable name=“EffectiveDate” select=“substring(text(),1,10)”/>
<xsl:call-template name=“convertMonth” />
<xsl:value-of select=“concat(’ ‘,substring-after(substring-after($EffectiveDate, ‘-’),’-’),’, ',substring-before($EffectiveDate, ‘-’))”/> Prices
</xsl:if>
</xsl:template>

<xsl:template name=“convertMonth”>
<xsl:variable name=“month-as-number” select=“number(substring-before(substring-after(text(), ‘-’), ‘-’))”/>
xsl:choose
<xsl:when test="$month-as-number=1">January</xsl:when>
<xsl:when test="$month-as-number=2">February</xsl:when>
<xsl:when test="$month-as-number=3">March</xsl:when>
<xsl:when test="$month-as-number=4">April</xsl:when>
<xsl:when test="$month-as-number=5">May</xsl:when>
<xsl:when test="$month-as-number=6">June</xsl:when>
<xsl:when test="$month-as-number=7">July</xsl:when>
<xsl:when test="$month-as-number=8">August</xsl:when>
<xsl:when test="$month-as-number=9">September</xsl:when>
<xsl:when test="$month-as-number=10">October</xsl:when>
<xsl:when test="$month-as-number=11">November</xsl:when>
<xsl:when test="$month-as-number=12">December</xsl:when>
xsl:otherwise<xsl:value-of select=“concat(’[invalid month: ', ‘$month-as-number’)”/></xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template name=“Header”>
<xsl:variable name=“HouseLogo” select=“concat($LogoImageDir,/a:ProductsDataSet/a:States[(normalize-space(a:StateCode)=normalize-space($StateCode))]/a:StateLogoFileName)”/>
<xsl:variable name=“DefaultHouseLogo” select=“concat($LogoImageDir,‘ReportLogo_TCSG.jpg’)”/>







<xsl:if test=“string($LogoImageDir)”>

<xsl:attribute name=“File”>
<xsl:copy-of select="$HouseLogo" />
</xsl:attribute>
<xsl:attribute name=“DefaultFile”>
<xsl:copy-of select="$DefaultHouseLogo" />
</xsl:attribute>

</xsl:if>








<xsl:if test=“string($ReportTitlesImageDir)”>

<xsl:attribute name=“File”>
xsl:choose
<xsl:when test="$NBSSizeCode=‘1’ and $CategoryCode=18">
<xsl:variable name=“ReportTitle” select=“concat($ReportTitlesImageDir,‘FrontLineBottlePrices_S750.jpg’)”/>
<xsl:copy-of select="$ReportTitle" />
</xsl:when>
<xsl:when test="$NBSSizeCode=‘6’">
<xsl:variable name=“ReportTitle” select=“concat($ReportTitlesImageDir,‘FrontLineBottlePrices_375.jpg’)”/>
<xsl:copy-of select="$ReportTitle" />
</xsl:when>
<xsl:when test="$NBSSizeCode=‘5’">
<xsl:variable name=“ReportTitle” select=“concat($ReportTitlesImageDir,‘FrontLineBottlePrices_M1500.jpg’)”/>
<xsl:copy-of select="$ReportTitle" />
</xsl:when>
<xsl:when test="$NBSSizeCode=‘1’ and $CategoryCode=14">
<xsl:variable name=“ReportTitle” select=“concat($ReportTitlesImageDir,‘FrontLineBottlePrices_F750.jpg’)”/>
<xsl:copy-of select="$ReportTitle" />
</xsl:when>

xsl:otherwise
<xsl:variable name=“ReportTitle” select=“concat($ReportTitlesImageDir,‘FrontLineBottlePrices_750.jpg’)”/>
<xsl:copy-of select="$ReportTitle" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>

</xsl:if>







</xsl:template>
<xsl:template name=“Footer”>





$D




§ = includes a Post-Off




Page $p of $P







xsl:choose
<xsl:when test="$CurrentOrNew=‘C’">Current Pricing</xsl:when>
xsl:otherwiseNew Pricing</xsl:otherwise>
</xsl:choose>






</xsl:template>
</xsl:stylesheet>




Part of the .XML file

































$D




§ = includes a Post-Off




Page $p of $P






Current Pricing









Australia / New Zealand








Red








Blend









753566




$46.92 §




1999




12




STONEHAVEN SHIRAZ/CABERNET 99












730945




$57.92 §




2000




12




ROSEMOUNT CABERNET MERLOT**02











Thanks.

Dear charmer,

Thanks for your consideration.

I am sorry. I still can’t reproduce this error. Would you please send a complete example which can reproduce the error to pdf@aspose.com?