W3C home > Mailing lists > Public > www-xsl-fo@w3.org > October 2011

Re: Links to an external PDF file from XSL FO

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Fri, 21 Oct 2011 10:25:59 -0400
Message-Id: <7.0.1.0.2.20111021102038.024d7970@wheresmymailserver.com>
To: www-xsl-fo@w3.org
At 2011-10-20 23:18 -0700, Kenbla wrote:
>Hello, I'm creating a PDF file using XSL FO, this PDF file contains links to
>other PDF files. I have used a basic-link and external-destination command
>from XSL FO but I can't get it to work!
>It works fine as long as the linked PDF file is in the same folder as the
>XSL FO created PDF file! This is not the case though, the PDF files I try to
>link to (open) exists on a different server. Let's call it:
>DBX\PRODUCTION\MyPDFfile.pdf.
>How do I link to that specific server and file?

By pointing to it precisely.  I suspect you do not have a correct URI 
that points to your file.

The following creates a PDF that points to a file on a different 
server and creating a PDF opens just fine in a browser window (attached):

<?xml version="1.0" encoding="US-ASCII"?><!--kenbla.fo-->
<root xmlns="http://www.w3.org/1999/XSL/Format"
       font-family="Times" font-size="20pt">

   <layout-master-set>
     <simple-page-master master-name="frame"
                         page-height="297mm" page-width="210mm"
                         margin-top="15mm" margin-bottom="15mm"
                         margin-left="15mm" margin-right="15mm">
       <region-body region-name="frame-body"/>
     </simple-page-master>
   </layout-master-set>

   <page-sequence master-reference="frame">
     <flow flow-name="frame-body">
       <block>
         Click <basic-link 
external-destination='url("http://docs.oasis-open.org/ubl/os-UBL-2.0/UBL-2.0.pdf")' 
text-decoration="underline">here</basic-link>
       </block>
     </flow>
   </page-sequence>
</root>

>I have tried a number of ways but the file doesn't open!

Addressing a file in your local system will open the file in the PDF 
reader.  Pointing to the file using http:// will open the file in the 
PDF reader in a browser window.

>Any help is greatly appreciated.

I hope the above helps.

. . . . . . . . . Ken 

--
Contact us for world-wide XML consulting and instructor-led training
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/f/
G. Ken Holman                   mailto:gkholman@CraneSoftwrights.com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal



Received on Friday, 21 October 2011 14:27:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 21 October 2011 14:27:12 GMT