Search Results

Search found 863 results on 35 pages for 'xls fo'.

Page 1/35 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • [XSL-FO] Characters from other than English languages

    - by Lukasz Kurylo
    My client have departments in Europe Central and East, so there is highly possibility that in the generated pdfs there will be at least in the people names and/or surnames some specific characters for the country language.   With the XSL-FO we can use some out-of-the box fonts, e.g. the default is Times. We can change it for specific block of text or the entire document to other like Helvetica or Arial. All will be good to the moment that we use only an english alphabet. If we want to add e.g. some characters from polish or bulgarian language, in the *.fo file:         <fo:block >                 <fo:inline font-weight="bold">english: </fo:inline>                 <fo:inline font-weight="bold">yellow</fo:inline>       </fo:block>       <fo:block>                 <fo:inline font-weight="bold">polish: </fo:inline>                 <fo:inline font-weight="bold">zólty</fo:inline>       </fo:block>       <fo:block>                 <fo:inline font-weight="bold">russian: </fo:inline>                 <fo:inline font-weight="bold">??????</fo:inline>       </fo:block>       <fo:block>                 <fo:inline font-weight="bold">bulgarian: </fo:inline>                 <fo:inline font-weight="bold">????</fo:inline>       </fo:block>       <fo:block>                 <fo:inline font-weight="bold">english: </fo:inline>                 <fo:inline font-weight="bold">yellow</fo:inline>       </fo:block>       <fo:block>                 <fo:inline font-weight="bold">polish: </fo:inline>                 <fo:inline font-weight="bold"  font-family="Arial">zólty</fo:inline>       </fo:block>       <fo:block>                 <fo:inline font-weight="bold">russian: </fo:inline>                 <fo:inline font-weight="bold" font-family="Arial">??????</fo:inline>       </fo:block>       <fo:block>                 <fo:inline font-weight="bold">bulgarian: </fo:inline>                 <fo:inline font-weight="bold" font-family="Arial">????</fo:inline>       </fo:block>   The result can be diffrent from the expected depending on the selected font, e.g:                 As you can see Timer nor Arial work in this case.   The problem here is not related to XSL-FO, but rather to the renderer we are using. I have lost a lot of time to find a solution for the using by me XSL-FO –> PDF rendered to acquire these characters in my generated files. Fortunatelly all what have to be done it is to embed the font (or part of it) in the file(s) during rendering.   The renderer that I’m using it is an open source FO.NET.   For this one, the code to generate a pdf file looks that:   var fonet =  Fonet.FonetDriver.Make(); fonet.Render("source.fo", "result.pdf");   To emded the font in the pdf, we need to set the appropriate option to the driver:   fonet.Options = new Fonet.Render.Pdf.PdfRendererOptions() {       FontType = Fonet.Render.Pdf.FontType.Embed }; Right now, the pdf we get should look like this:               As you can see, the result for the Arial font looks exactly how it should, because this font has a characters included not only for the english language like the default Times, which we shouls avoid if we not generating a english-only documents.   This is worth to notice that in this situation the generated pdf file is quite large, it has more than 400 kb in size. This is of course because of embedding the entire font in it to make the document portable to systems, where the used font is not present. Instead on embedding the entire font, we can only embed the subset of used characters by changing the options to:   fonet.Options = new Fonet.Render.Pdf.PdfRendererOptions() {       FontType = Fonet.Render.Pdf.FontType.Subset };   Right now, this specific pdf is only 12 kb in size.

    Read the article

  • How do I fix the issue with tables in xsl-fo, please help...

    - by atrueguy
    <?xml version="1.0" encoding="ISO-8859-1"?> <?xml:stylesheet type="text/xsl" href="currency.xslt"?> <currencylist> <title>Currencies By Country</title> <countries> <country>Australia</country> <currency>Australian Dollar</currency> </countries> <countries> <country>Austria</country> <currency>Schilling</currency> </countries> <countries> <country>Belgium</country> <currency>Belgium Franc</currency> </countries> <countries> <country>Canada</country> <currency>Canadian Dollar</currency> </countries> <countries> <country>England</country> <currency>Pound</currency> </countries> <countries> <country>Fiji</country> <currency>Fijian Dollar</currency> </countries> <countries> <country>France</country> <currency>Franc</currency> </countries> <countries> <country>Germany</country> <currency>DMark</currency> </countries> <countries> <country>Hong Kong</country> <currency>Hong Kong Dollar</currency> </countries> <countries> <country>Italy</country> <currency>Lira</currency> </countries> <countries> <country>Japan</country> <currency>Yen</currency> </countries> <countries> <country>Netherlands</country> <currency>Guilder</currency> </countries> <countries> <country>Switzerland</country> <currency>SFranc</currency> </countries> <countries> <country>USA</country> <currency>Dollar</currency> </countries> </currencylist> This is my exact xml code. I have written a xsl-fo for this xml file and I am failing to produce the output in a table. please check and help me in this. ASAP. <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="Letter" page-height="11in" page-width="8.5in"> <fo:region-body region-name="only_region" margin="1in" background-color="#CCCCCC"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="Letter"> <fo:flow flow-name="only_region"> <fo:block text-align="left"><xsl:call-template name="show_title"/></fo:block> <fo:table-and-caption> <fo:table> <fo:table-column column-width="25mm"/> <fo:table-column column-width="25mm"/> <fo:table-column column-width="25mm"/> <fo:table-header> <fo:table-row> <fo:table-cell> <fo:block font-weight="bold">SI No</fo:block> </fo:table-cell> <fo:table-cell> <fo:block font-weight="bold">Country</fo:block> </fo:table-cell> <fo:table-cell> <fo:block font-weight="bold">Currency</fo:block> </fo:table-cell> </fo:table-row> </fo:table-header> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block><xsl:call-template name="select_position"/></fo:block> </fo:table-cell> <fo:table-cell> <fo:block><xsl:call-template name="select_country"/></fo:block> </fo:table-cell> <fo:table-cell> <fo:block><xsl:call-template name="select_currency"/></fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:table-and-caption> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template name="show_title" match="currencylist"> <h2><xsl:value-of select="currencylist/title"/></h2> </xsl:template> <xsl:template name="select_position" match="currencylist"> <xsl:for-each select="currencylist/countries"> <xsl:value-of select="position()"/> </xsl:for-each> </xsl:template> <xsl:template name="select_country" match="currencylist"> <xsl:for-each select="currencylist/countries"> <xsl:value-of select="country"/> </xsl:for-each> </xsl:template> <xsl:template name="select_currency" match="currencylist"> <xsl:for-each select="currencylist/countries"> <xsl:value-of select="currency"/> </xsl:for-each> </xsl:template> </xsl:stylesheet> Kindly help me out in this to produce a output in the table.

    Read the article

  • Why is it that, table is not printing in the xsl-fo here? please help me guys.

    - by atrueguy
    This is my xml file <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="currency.xsl"?> <currencylist> <title>Currencies By Country</title> <countries> <country>Australia</country> <currency>Australian Dollar</currency> </countries> <countries> <country>Austria</country> <currency>Schilling</currency> </countries> <countries> <country>Belgium</country> <currency>Belgium Franc</currency> </countries> <countries> <country>Canada</country> <currency>Canadian Dollar</currency> </countries> <countries> <country>England</country> <currency>Pound</currency> </countries> <countries> <country>Fiji</country> <currency>Fijian Dollar</currency> </countries> <countries> <country>France</country> <currency>Franc</currency> </countries> <countries> <country>Germany</country> <currency>DMark</currency> </countries> <countries> <country>Hong Kong</country> <currency>Hong Kong Dollar</currency> </countries> <countries> <country>Italy</country> <currency>Lira</currency> </countries> <countries> <country>Japan</country> <currency>Yen</currency> </countries> <countries> <country>Netherlands</country> <currency>Guilder</currency> </countries> <countries> <country>Switzerland</country> <currency>SFranc</currency> </countries> <countries> <country>USA</country> <currency>Dollar</currency> </countries> </currencylist> This is my xsl-fo file: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="Letter" page-height="11in" page-width="8.5in"> <fo:region-body region-name="only_region" margin="0.7in" margin-top="1.2in" margin-left="1.1in"/> <fo:region-before region-name="xsl-region-before" extent="1.5in" /> <fo:region-after region-name="xsl-region-after" extent="1.5in" /> <fo:region-start region-name="xsl-region-after" extent="1.5in" /> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="Letter"> <fo:flow flow-name="only_region"> <fo:block text-align="left"><xsl:call-template name="show_title"/></fo:block> <fo:table-and-caption> <fo:table> <fo:table-column column-width="25mm"/> <fo:table-column column-width="25mm"/> <fo:table-column column-width="25mm"/> <fo:table-header> <fo:table-row> <fo:table-cell> <fo:block font-weight="bold">SI No</fo:block> </fo:table-cell> <fo:table-cell> <fo:block font-weight="bold">Country</fo:block> </fo:table-cell> <fo:table-cell> <fo:block font-weight="bold">Currency</fo:block> </fo:table-cell> </fo:table-row> </fo:table-header> <fo:table-body> <xsl:for-each select="currencylist/countries"> <fo:table-row> <fo:table-cell> <fo:block> <xsl:value-of select="position()"/> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block> <xsl:value-of select="country"/> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block> <xsl:value-of select="currency"/> </fo:block> </fo:table-cell> </fo:table-row> </xsl:for-each> </fo:table-body> </fo:table> </fo:table-and-caption> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template name="show_title" match="currencylist"> <xsl:value-of select="currencylist/title"/> </xsl:template> </xsl:stylesheet> Table structure is not printing, but the values are printing, please help guys.

    Read the article

  • Creating PDF documents dynamically using Umbraco and XSL-FO part 2

    - by Vizioz Limited
    Since my last post I have made a few modifications to the PDF generation, the main one being that the files are now dynamically renamed so that they reflect the name of the case study instead of all being called PDF.PDF which was not a very helpful filename, I just wanted to get something live last week, so decided that something was better than nothing :)The issue with the filenames comes down to the way that the PDF's are being generated by using an alternative template in Umbraco, this means that all you need to do is add " /pdf " to the end of a case study URL and it will create a PDF version of the case study. The down side is that your browser will merrily download the file and save it as PDF.PDF because that is the name of the last part of the URL.What you need to do is set the content-disposition header to be equal to the name you would like the file use, Darren Ferguson mentioned this on the Change the name of the PDF forum post.We have used the same technique for downloading dynamically generated excel files, so I thought it would be useful to create a small macro to set both this header and also to set the caching headers to prevent any caching issues, I think in the past we have experienced all possible issues, including various issues where IE behaves differently to other browsers when you are using SSL and so the below code should work in all situations!The template for the PDF alternative template is very simple:<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server"> <umbraco:Macro Alias="PDFHeaders" runat="server"></umbraco:Macro> <umbraco:Macro xsl="FO-CaseStudy.xslt" Alias="PDFXSLFO" runat="server"></umbraco:Macro></asp:Content>The following code snippet is the XSLT macro that simply creates our file name and then passes the file name into the helper function:<xsl:template match="/"> <xsl:variable name="fileName"> <xsl:text>Vizioz_</xsl:text> <xsl:value-of select="$currentPage/@nodeName" /> <xsl:text>_case_study.pdf</xsl:text> </xsl:variable> <xsl:value-of select="Vizioz.Helper:AddDocumentDownloadHeaders('application/pdf', $fileName)"/> </xsl:template>And the following code is the helper function that clears the current response and adds all the appropriate headers:public static void AddDocumentDownloadHeaders(string contentType, string fileName){ HttpResponse response = HttpContext.Current.Response; HttpRequest request = HttpContext.Current.Request; response.Clear(); response.ClearHeaders(); if (request.IsSecureConnection & request.Browser.Browser == "IE") { // Don't use the caching headers if the browser is IE and it's a secure connection // see: http://support.microsoft.com/kb/323308 } else { // force not using the cache response.AppendHeader("Cache-Control", "no-cache"); response.AppendHeader("Cache-Control", "private"); response.AppendHeader("Cache-Control", "no-store"); response.AppendHeader("Cache-Control", "must-revalidate"); response.AppendHeader("Cache-Control", "max-stale=0"); response.AppendHeader("Cache-Control", "post-check=0"); response.AppendHeader("Cache-Control", "pre-check=0"); response.AppendHeader("Pragma", "no-cache"); response.Cache.SetCacheability(HttpCacheability.NoCache); response.Cache.SetNoStore(); response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1)); } response.AppendHeader("Expires", DateTime.Now.AddMinutes(-1).ToLongDateString()); response.AppendHeader("Keep-Alive", "timeout=3, max=993"); response.AddHeader("content-disposition", "attachment; filename=\"" + fileName + "\""); response.ContentType = contentType;}I will write another blog soon with some more details about XSL-FO and how to create the PDF's dynamically.Please do re-tweet if you find this interest :)

    Read the article

  • Validate xsl fo in xslt styleesheet

    - by Biegal
    Hi, i have a little problem with validating xml, xslt in details. I have a xslt stylesheet that, transforms xml data source to xsl:fo document. Something like this: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <xsl:template match="/"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns="http://www.w3.org/1999/xhtml"> <fo:layout-master-set> <fo:simple-page-master margin-top="25mm" margin-bottom="25mm" margin-left="25mm" margin-right="25mm" page-width="210mm" page-height="297mm" master-name="simplePageLayout"> <fo:region-body region-name="xsl-region-body" column-gap="0.25in" /> <fo:region-before region-name="xsl-region-before" display-align="after" extent="0.1mm" padding-top="0pt" padding-left="0.4in" padding-right="0.4in" padding-bottom="0pt" /> <fo:region-after region-name="xsl-region-after" display-align="before" extent="0.4in" padding-top="4pt" padding-left="0.4in" padding-right="0.4in" padding-bottom="0pt" /> </fo:simple-page-master> <fo:page-sequence-master master-name="default-sequence"> <fo:repeatable-page-master-reference master-reference="simplePageLayout" /> </fo:page-sequence-master> </fo:layout-master-set> <fo:page-sequence master-reference="default-sequence"> <fo:flow flow-name="xsl-region-body"> <fo:block font-family="Segoe UI" color="#000000" font-size="9pt" /> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> What I want to do, is to validate written xsl:fo elements, ignoring xsl tags. Is it posible? For now I use dtd validation (I have xsd schema too) for validating Fo, but it give me an error on each xsl tag. Summary. Is it posiible to validate only fo elements against the schema, ignoring xsl tags, and how should I do it? Maybe a code snnippet in C#, or a hint how to modify documents? Thanks in advance!

    Read the article

  • XSL-FO: Static content AND Flow content in Region-Body: Possible?

    - by Peterdk
    I have the following problem: I need to use XSLFO to generate a 2-column multipage document. Problem is: I need to have a vertical line between the 2 columns. Since XSLFO does not seem to specify a option for creating such a divider, I need to manually put it there. I was thinking of using a static rotated blockcontainer with a leader in it. However, it looks like it's not possible to use static-content on the same region as where the flow content comes. <fo:layout-master-set> <fo:simple-page-master page-width="170mm" page-height="222mm" master-name="page" > <fo:region-body region-name="xsl-region-body" margin-top="2mm" margin-bottom="2mm" margin-left="10mm" margin-right="10mm" column-count="2" column-gap="5mm" /> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="page"> <fo:static-content flow-name="xsl-region-body" ><!-- This gives a error --> <fo:block>test</fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <xsl:apply-templates/> </fo:flow> </fo:page-sequence> Results in (XEP): [error] Duplicate identifier: flow-name="xsl-region-body". Property 'flow-name' should be unique within 'fo:page-sequence'. Are there any methods to place static content on the main region when also flow content is placed there? Or: Is there a way to define the divider that divides a 2-column layout?

    Read the article

  • Square Bullet in XSL-FO

    - by Igman
    I am attempting to create a list in XSL-FO using a square bracket. I have been able to get it working using the standard unicode bullet character (&#8226;) but I just can't seem to get it working for square brackets. I have tried using &#9632;, but that does not seem to work. It is important that i can get the square bullets working because I am matching an existing file format.Any help in getting this working would be greatly appreciated. <fo:list-item-label end-indent="label-end()"> <fo:block>&#x2022;</fo:block> </fo:list-item-label>

    Read the article

  • Apache FOP - Table top and bottom borders missing pagebreak inside table

    - by Thomas
    I am using Apache FOP to generate a PDF from a XLS FO document. I have created a test XLS FO document that contains a table with collapsed borders that with several tall rows. One of the rows starts on one page and ends on the next and this works as expected. The problem is that the bottom border of the table on the first page is missing and the top border of the table on the second pages is also missing. Below is the sample XLS FO document. <?xml version="1.0" encoding="utf-8"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <!-- defines the layout master --> <fo:layout-master-set> <fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm"> <fo:region-body margin-top="3cm"/> <fo:region-before extent="3cm"/> <fo:region-after extent="1.5cm"/> </fo:simple-page-master> </fo:layout-master-set> <!-- starts actual layout --> <fo:page-sequence master-reference="first"> <fo:title>Sample Doc</fo:title> <fo:flow flow-name="xsl-region-body" font-size="x-small" font="Times New Roman"> <!-- table start --> <fo:table table-layout="fixed" width="100%" border-collapse="collapse"> <fo:table-column column-width="35mm"/> <fo:table-column column-width="100mm"/> <fo:table-column column-width="20mm"/> <fo:table-body> <fo:table-row> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Column 1</fo:block> </fo:table-cell> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Columns 2</fo:block> </fo:table-cell> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Column 3</fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Row 1</fo:block> </fo:table-cell> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> </fo:table-cell> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Some text</fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Row 2</fo:block> </fo:table-cell> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> </fo:table-cell> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Some text</fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Row 3</fo:block> </fo:table-cell> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> </fo:table-cell> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Some text</fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Row 4</fo:block> </fo:table-cell> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> </fo:table-cell> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Some text</fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Row 5</fo:block> </fo:table-cell> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> <fo:block>Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum</fo:block> </fo:table-cell> <fo:table-cell border-width="0.5mm" border-style="solid"> <fo:block>Some text</fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <!-- table end --> </fo:flow> </fo:page-sequence> </fo:root> This Image shows the bottom border on page 1 missing and the top border on page 2 missing, but all text seams to be there: Please note that I have allready experimented with using an empty header and footer with borders, for example. This works, but I need to use these functions for other things than fixing this issue so what I need to know is if there is an other sollution to the problem?

    Read the article

  • XSF-FO intellisense and national languages with Apache FOP

    - by Lukasz Kurylo
    Some time ago I showed how to get an intellisense and how to configure the FO.NET to acquire national characters inside the generated pdf files. Due to the limitations that I mensioned in my previous post, I started playing with the Apache FOP. In this post I want to show, how to acquire the same result as I showed in the two posts related to FO.NET.   Intellisense   To get the intellisense from the XSL-FO templates set the xsi:schemaLocation the same way I showed it in this post. The only diffrence to FO.NET is that, during generating the document by the code I showed last time we will get an exception:   org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:root": xsi:schemaLocation (See position 6:11)   Fortunatelly there is a very easy way to resolve this without removing the entire attribute along with the intellisense. Add to the FopFactory the ignoreNamespace by:   FopFactory fopFactory = FopFactory.newInstance(); fopFactory.ignoreNamespace(http://www.w3.org/2001/XMLSchema-instance);   Notice that, the url specified in this method this is a namespace for the xmlns:xsi namespace, not xsi.schemaLocation.   Fonts / national characters   This point is a little dfferent to acquire, but not more complicated that it was with FO.NET. To set the fonts in Apache FOP 1.0, we need a configuration file. A sample one can be get from the directory where we unpacked the fop binaries, from conf subdirectory. There is a file called fop.xconf. We must copy this file to our solution. In the simplest way, in the <fonts> tag we can add  <auto-detect/>. Thanks to this, FOP will index all fonts available on the installed operating system. There probably should be no problem, if we have a http handler or a WCF Service on the server that serves the generated pdf documents. In this situation we can use all available fonts on this server.   To use this config file, we must set a path to it:   FopFactory fopFactory = FopFactory.newInstance(); fopFactory.setUserConfig(new File("fop.xconf"));

    Read the article

  • XSL-FO: Force Wrap on Table Entries

    - by Ace
    I'm having an issue where when I publish my modspecs to pdf (XSL-FO). My tables are having issues, where the content of a cell will overflow its column into the next one. How do I force a break on the text so that a new line is created instead? I can't manually insert zero-space characters since the table entries are programmatically entered. I'm looking for a simple solution that I can just simply add to docbook_pdf.xsl (either as a xsl:param or xsl:attribute) EDIT: Here is where I'm at currently: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:import href="urn:docbkx:stylesheet"/> ...(the beginning of my stylesheet for pdf generation, e.g. header and footer content stuff) <xsl:template match="text()"> <xsl:call-template name="intersperse-with-zero-spaces"> <xsl:with-param name="str" select="."/> </xsl:call-template> </xsl:template> <xsl:template name="intersperse-with-zero-spaces"> <xsl:param name="str"/> <xsl:variable name="spacechars"> &#x9;&#xA; &#x2000;&#x2001;&#x2002;&#x2003;&#x2004;&#x2005; &#x2006;&#x2007;&#x2008;&#x2009;&#x200A;&#x200B; </xsl:variable> <xsl:if test="string-length($str) &gt; 0"> <xsl:variable name="c1" select="substring($str, 1, 1)"/> <xsl:variable name="c2" select="substring($str, 2, 1)"/> <xsl:value-of select="$c1"/> <xsl:if test="$c2 != '' and not(contains($spacechars, $c1) or contains($spacechars, $c2))"> <xsl:text>&#x200B;</xsl:text> </xsl:if> <xsl:call-template name="intersperse-with-zero-spaces"> <xsl:with-param name="str" select="substring($str, 2)"/> </xsl:call-template> </xsl:if> </xsl:template> </xsl:stylesheet> With this, the long words are successfully broken up in the table cells! Unfortunately, the side effect is that normal text elsewhere (like in a under sextion X) now breaks up words so that they appear on seperate lines. Is there a way to isolate the above process to just tables? EDIT #2 here is what the fo spits out for a single table... <fo:table-row><fo:table-cell padding-start="2pt" padding-end="2pt" padding-top="2pt" ... </fo:block></fo:table-cell></fo:table-row>

    Read the article

  • Using XSL-FO and HTML?

    - by buggy1985
    Hi, I'm trying to transform some XML-data to HTML with XSLT for my bachelor thesis. My professor wants me to consider XSL-FO too, or at least to write some word about it. But I'm very noob to this. So my questions are: Can I combine FO with HTML? Can I use FO istead of HTML and CSS? If yes, how will my browser render this? Are there any examples/tutorials on how to transform xml into web pages with FO? Thank you very much.

    Read the article

  • Setting XSL-FO XML Schema in Visual Studio

    - by Lukasz Kurylo
    I'm playing lately with an XSL-FO for generating a pdf documents. XSL-FO has a long list of available tags and attributes, which for a new guy who want to create a simple document is a nightmare to find a proper one. Fortunatelly we can set an schema for XSL-FO, so will result in acquire a full intellisense in VS. For a simple *.fo file, we can set the path to the schema directly in file: <?xml version="1.0" encoding="utf-8"?> <fo:root       xmlns:fo="http://www.w3.org/1999/XSL/Format"       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"       xsi:schemaLocation=" http://www.w3.org/1999/XSL/Format http://www.xmlblueprint.com/documents/fop.xsd"> ...   We can of course use the build in VS XML Schemas selector. To use it, we must copy the schema file to the Schemas catalog (defaut path for VS2012 is C:\Program Files (x86)\Microsoft Visual Studio 11.0\Xml\Schemas). Then we can go to Properties of the opened xml/xslt file and set the new added schema to file:                 From now, we should have an enable intellisense as shown below: .

    Read the article

  • COPY TO xxxx.xls TYPE XLS (VFP 8.0 SP1)

    - by Andrea.Ko
    Hi All, I downloading table from SQL 2008 using VFP 8.0 (SP1) using command: COPY TO xxx TYPE XLS Some of the data in the excel is disappearing. Example, Table in SQL: Cus(ID int(4), CusNam VARCHAR(35)) When i issue the following command at VFP Forms: (a) COPY TO xxx TYPE FOX2x [Data display correctly as following] *ID CusNam 1 ABC 2 DEF* (b) COPY TO xxx TYPE XLS [2nd Record disappear] *ID CusNam 1 2 DEF* Appreciate for any helps!

    Read the article

  • Matching a Repeating Sub Series using a Regular Expression with PowerShell

    - by Hinch
    I have a text file that lists the names of a large number of Excel spreadsheets, and the names of the files that are linked to from the spreadsheets. In simplified form it looks like this: "Parent File1.xls" Link: ChildFileA.xls Link: ChildFileB.xls "ParentFile2.xls" "ParentFile3.xls" Blah Link: ChildFileC.xls Link: ChildFileD.xls More Junk Link: ChildFileE.xls "Parent File4.xls" Link: ChildFileF.xls In this example, ParentFile1.xls has embedded links to ChildFileA.xls and ChildFileB.xls, ParentFile2.xls has no embedded links, and ParentFile3.xls has 3 embedded links. I am trying to write a regular expression in PowerShell that will parse the text file producing output in the following form: ParentFile1.xls:ChildFileA.xls,ChildFileB.xls ParentFile3.xls:ChildFileC.xls,ChildFileD.xls,ChildFileE.xls etc The task is complicated by the fact that the text file contains a lot of junk between each of the lines, and a parent may not always have a child. Furthermore, a single file name may pass over multiple lines. However, it's not as bad as it sounds, as the parent and child file names are always clearly demarcated (the parent with quotes and the child with a prefix of Link: ). The PowerShell code I've been using is as follows: $content = [string]::Join([environment]::NewLine, (Get-Content C:\Temp\text.txt)) $regex = [regex]'(?im)\s*\"(.*)\r?\n?\s*(.*)\"[\s\S]*?Link: (.*)\r?\n?' $regex.Matches($content) | %{$_.Groups[1].Value + $_.Groups[2].Value + ":" + $_.Groups[3].Value} Using the example above, it outputs: ParentFile1.xls:ChildFileA.xls ParentFile2.xls""ParentFile3.xls:ChildFileC.xls ParentFile4.xls:ChildFileF.xls There are two issues. Firstly, the inclusion of the "" instead of a newline whenever a Parent without a Child is processed. And the second issue, which is the most important, is that only a single child is ever shown for each parent. I'm guessing I need to somehow recursively capture and display the multiple child links that exist for each parent, but I'm totally stumped as to how to do this with a regular expression. Amy help would be greatly appreciated. The file contains 100's of thousands of lines, and manual processing is not an option :)

    Read the article

  • is there such a thing as xsl:fo reporting or xsl:fo simulation?

    - by topmulch
    Hi, I am trying to determine if MY xsl:fo generated PDF file will exceed one page or not, without actually generating the output. We use Apache-FOP 0.95 on our server, and the XML data is being generated using a PHP DOMDocument class before being passed onto an XSL-FO template. My question: Are there PHP libraries out there that can simulate xsl:fo output and send me reports that I can use in my application? Alternatively, is there a way for the Apache FOP itself (or sibling Java app) that sends reports without actually generating a file? I have been reading the FOP documentation, and aside from some things I can not fully understand, I have not been able to find a way to do that from within FOP. Any advice is much appreciated.

    Read the article

  • Are there Any free XSL-FO editors?

    - by Russell
    I am looking for a free WYSIWYG editor of XSL-FO. Specifically, I would like to be able to design the FO file through a visual editor. I am aware of some that are available for purchase and evaluation, however I was wondering if there are any free editors available? Thanks

    Read the article

  • Convert excel document (xls) to a plist

    - by John
    I have a pretty straightforward excel document in which I need to use the data in an iPhone app. The xls document has 6 columns, 200 plus rows. I would like to create a plist from the xls document and other than manual copy/paste, is there a means to convert one to the other? Anyone written a macro on the excel side or a utility (perl, etc) to make such a conversion? Thanks John iPhoneDevTips

    Read the article

  • How do you convert many files from .xlsx to .xls ?

    - by David Oneill
    What is a way to convert a batch of .xlsx files to .xls format? I would prefer it to be a command-line solution, but anything is better than opening each manually, and manually saving in the new format. ~~Edit~~ So is there a way to get around that error? errored: Leaking python objects bridged to UNO for reason pyuno runtime is not initialized, (the pyuno.bootstrap needs to be called before using any uno classes) python: tpp.c:63: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= __sched_fifo_min_prio && new_prio <= __sched_fifo_max_prio)' failed. Aborted

    Read the article

  • mySQL to XLS using PHP?

    - by kielie
    Hi guys, how can I create a .XLS document from a mySQL table using PHP? I have tried just about everything, with no success. Basically, I need to take form data, and input it into a database, which I have done, and then I need to retrieve that table data and parse it into a microsoft excel file, which needs to be saved automatically onto the web server. <?php // DB TABLE Exporter // // How to use: // // Place this file in a safe place, edit the info just below here // browse to the file, enjoy! // CHANGE THIS STUFF FOR WHAT YOU NEED TO DO $dbhost = "-"; $dbuser = "-"; $dbpass = "-"; $dbname = "-"; $dbtable = "-"; // END CHANGING STUFF $cdate = date("Y-m-d"); // get current date // first thing that we are going to do is make some functions for writing out // and excel file. These functions do some hex writing and to be honest I got // them from some where else but hey it works so I am not going to question it // just reuse // This one makes the beginning of the xls file function xlsBOF() { echo pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0); return; } // This one makes the end of the xls file function xlsEOF() { echo pack("ss", 0x0A, 0x00); return; } // this will write text in the cell you specify function xlsWriteLabel($Row, $Col, $Value ) { $L = strlen($Value); echo pack("ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L); echo $Value; return; } // make the connection an DB query $dbc = mysql_connect( $dbhost , $dbuser , $dbpass ) or die( mysql_error() ); mysql_select_db( $dbname ); $q = "SELECT * FROM ".$dbtable." WHERE date ='$cdate'"; $qr = mysql_query( $q ) or die( mysql_error() ); // start the file xlsBOF(); // these will be used for keeping things in order. $col = 0; $row = 0; // This tells us that we are on the first row $first = true; while( $qrow = mysql_fetch_assoc( $qr ) ) { // Ok we are on the first row // lets make some headers of sorts if( $first ) { foreach( $qrow as $k => $v ) { // take the key and make label // make it uppper case and replace _ with ' ' xlsWriteLabel( $row, $col, strtoupper( ereg_replace( "_" , " " , $k ) ) ); $col++; } // prepare for the first real data row $col = 0; $row++; $first = false; } // go through the data foreach( $qrow as $k => $v ) { // write it out xlsWriteLabel( $row, $col, $v ); $col++; } // reset col and goto next row $col = 0; $row++; } xlsEOF(); exit(); ?> I just can't seem to figure out how to integrate fwrite into all that to write the generated data into a .xls file, how would I go about doing that? I need to get this working quite urgently, so any help would be greatly appreciated. Thanx guys.

    Read the article

  • Saving a .xls file with fwrite

    - by kielie
    hi guys, I have to create a script that takes a mySQL table, and exports it into .XSL format, and then saves that file into a specified folder on the web host. I got it working, but now I can't seem to get it to automatically save the file to the location without prompting the user. It needs to run every day at a specified time, so it can save the previous days leads into a .XSL file on the web host. Here is the code: <?php // DB TABLE Exporter // // How to use: // // Place this file in a safe place, edit the info just below here // browse to the file, enjoy! // CHANGE THIS STUFF FOR WHAT YOU NEED TO DO $dbhost = "-"; $dbuser = "-"; $dbpass = "-"; $dbname = "-"; $dbtable = "-"; // END CHANGING STUFF $cdate = date("Y-m-d"); // get current date // first thing that we are going to do is make some functions for writing out // and excel file. These functions do some hex writing and to be honest I got // them from some where else but hey it works so I am not going to question it // just reuse // This one makes the beginning of the xls file function xlsBOF() { echo pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0); return; } // This one makes the end of the xls file function xlsEOF() { echo pack("ss", 0x0A, 0x00); return; } // this will write text in the cell you specify function xlsWriteLabel($Row, $Col, $Value ) { $L = strlen($Value); echo pack("ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L); echo $Value; return; } // make the connection an DB query $dbc = mysql_connect( $dbhost , $dbuser , $dbpass ) or die( mysql_error() ); mysql_select_db( $dbname ); $q = "SELECT * FROM ".$dbtable." WHERE date ='$cdate'"; $qr = mysql_query( $q ) or die( mysql_error() ); // Ok now we are going to send some headers so that this // thing that we are going make comes out of browser // as an xls file. // header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); //this line is important its makes the file name header("Content-Disposition: attachment;filename=export_".$dbtable.".xls "); header("Content-Transfer-Encoding: binary "); // start the file xlsBOF(); // these will be used for keeping things in order. $col = 0; $row = 0; // This tells us that we are on the first row $first = true; while( $qrow = mysql_fetch_assoc( $qr ) ) { // Ok we are on the first row // lets make some headers of sorts if( $first ) { foreach( $qrow as $k => $v ) { // take the key and make label // make it uppper case and replace _ with ' ' xlsWriteLabel( $row, $col, strtoupper( ereg_replace( "_" , " " , $k ) ) ); $col++; } // prepare for the first real data row $col = 0; $row++; $first = false; } // go through the data foreach( $qrow as $k => $v ) { // write it out xlsWriteLabel( $row, $col, $v ); $col++; } // reset col and goto next row $col = 0; $row++; } xlsEOF(); exit(); ?> I tried using, fwrite to accomplish this, but it didn't seem to go very well, I removed the header information too, but nothing worked. Here is the original code, as I found it, any help would be greatly appreciated. :-) Thanx in advance. :-)

    Read the article

  • How can I combine xsl:attribute and xsl:use-attribute-sets to conditionally use an attribute set?

    - by Peter
    We have an xml node "item" with an attribute "style", which is "Header1". This style can change however. We have an attribute set named Header1 which defines how this should look in a PDF, generated through xsl:fo. This works (the use-attribute-sets is mentioned inline, in the fo:table-cell node): <xsl:template match="item[@type='label']"> <fo:table-row> <fo:table-cell xsl:use-attribute-sets="Header1"> <fo:block> <fo:inline font-size="8pt" > <xsl:value-of select="." /> </fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </xsl:template> But this doesn't (using xsl:attribute, because the attribute @style can also be Header2 for example). It doesn't generate an error, the PDF is created, but the attributes aren't applied. <xsl:template match="item[@type='label']"> <fo:table-row> <fo:table-cell> <xsl:attribute name="xsl:use-attribute-sets"> <xsl:value-of select="@style" /> </xsl:attribute> <fo:block> <fo:inline font-size="8pt" > <xsl:value-of select="." /> </fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </xsl:template> Does anyone know why? And how we could achieve this, preferably without long xsl:if or xsl:when stuff?

    Read the article

  • Import data from .xls File

    - by tek3
    HI, I am developing an application in which i have to get data from .xls file. I am fairly new to iPhone development so any pointers in direction to getting started will be very much helpful. The steps that i am thinking are : 1) First i need to convert .xls to .csv Format. 2)Import the data from .csv file to SQlite Databse or Core Data.(I am not familier with any one of them, so kindly suggest which one to choose. I am looking forward to use Core Data) Am I thinking in the right direction. Will be greatful for any kind of assistance.. Thanx in advance..

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >