[vwnc] Creating PDF document from within VisualWorks How to

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Creating PDF document from within VisualWorks How to

Mark Pirogovsky-3
Hello All, I have two questions:

A.  I need to be able to create PDF documents from the VisualWorks
application.
Those documents are simple text documents such as reports, invoices, etc.

Does anybody have any suggestion what is the best way of doing it ?


B. I came across the SPDF library by Bruce Badger  in the public
repository which supposed to do just that. However there is no
documentation of any sort besides few tests which supposed to show what
is the library capable of doing.

Does anybody have any documentation or  information on how to use the SPDF ?

Any information is greatly appreciated

Truly,

Mark Pirogovsky
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Creating PDF document from within VisualWorks How to

Travis Griggs-3

On Aug 18, 2009, at 9:18 PM, Mark Pirogovsky wrote:

> Hello All, I have two questions:
>
> A.  I need to be able to create PDF documents from the VisualWorks
> application.
> Those documents are simple text documents such as reports, invoices,  
> etc.
>
> Does anybody have any suggestion what is the best way of doing it ?
>
>
> B. I came across the SPDF library by Bruce Badger  in the public
> repository which supposed to do just that. However there is no
> documentation of any sort besides few tests which supposed to show  
> what
> is the library capable of doing.
>
> Does anybody have any documentation or  information on how to use  
> the SPDF ?
>
> Any information is greatly appreciated

I know of at least two people who have used Cairo to generate PDFs for  
projects. Once upon a time, when I gave Cairo presentations at  
conference, I wrote the presentation in Cairo shown on the Screen from  
my own VW viewer, and then I could tell the slides to render as PDF.

So it's certainly capable of doing it. Not sure what your constraints  
are and how they fit what you're doing.

--
Travis Griggs
Objologist
"An idea, like a ghost, must be spoken to a little before it will  
explain itself." - Charles Dickens

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Creating PDF document from within VisualWorks How to

davidbuck
In reply to this post by Mark Pirogovsky-3
Download Apache FOP (http://xmlgraphics.apache.org/fop/).  This is a
program that can run from the command-line and can convert an XML format
called XSL-FO into PDF.  I just spent the last several months converting
all of our reports into FOP format and I'm very impressed by it.  We've
not run across any major restrictions with it.  We just get our
Smalltalk application to write out the XML file with the data already
embedded in  and run fop.  Suppose we call the file myReport.fo

    fop  myReport.fo  myReport.pdf

There's your PDF file.  You can
    - embed images and scale them to the proper size
    - draw tables with borders (with full control over internal borders)
    - have text that wraps lines
    - format text using center, left, right or justified
    - change fonts, font sizes, etc.
    - bold italic, underline, etc.
    - change text background colors and foreground colors

All of this is controlled by a fairly easy to write XML file.  Cool.

David Buck
Simberon Inc.,
www.simberon.com

Mark Pirogovsky wrote:

> Hello All, I have two questions:
>
> A.  I need to be able to create PDF documents from the VisualWorks
> application.
> Those documents are simple text documents such as reports, invoices, etc.
>
> Does anybody have any suggestion what is the best way of doing it ?
>
>
> B. I came across the SPDF library by Bruce Badger  in the public
> repository which supposed to do just that. However there is no
> documentation of any sort besides few tests which supposed to show what
> is the library capable of doing.
>
> Does anybody have any documentation or  information on how to use the SPDF ?
>
> Any information is greatly appreciated
>
> Truly,
>
> Mark Pirogovsky
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>  

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Creating PDF document from within VisualWorks How to

Holger Kleinsorgen-4
Mark Pirogovsky wrote:
 >
 > Hello All, I have two questions:
 >
 > A.  I need to be able to create PDF documents from the VisualWorks
 > application.
 > Those documents are simple text documents such as reports, invoices, etc.

Another option, especially if you're interested in template-based
document creation:
- create document templates in the Open Document Format (ODF)
- "fill in the blanks" by modifying the underlying XML
- use JODConverter to convert the document to PDF (either use the web
service, or JNI)

JODConverter homepage:
http://www.artofsolving.com/opensource/jodconverter

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Creating PDF document from within VisualWorks How to

Antony Blakey-2
In reply to this post by davidbuck
All the same lines, I can strongly recommend http://www.princexml.com.  
It's a CSS + XML/XHTML based formatter. I've recently built and  
deployed a system using prince for a client and I was very happy with  
it. Not free, but as VW users know, sometimes the best stuff isn't.

On 19/08/2009, at 7:26 PM, David Buck wrote:

> Download Apache FOP (http://xmlgraphics.apache.org/fop/).  This is a
> program that can run from the command-line and can convert an XML  
> format
> called XSL-FO into PDF.  I just spent the last several months  
> converting
> all of our reports into FOP format and I'm very impressed by it.  
> We've
> not run across any major restrictions with it.  We just get our
> Smalltalk application to write out the XML file with the data already
> embedded in  and run fop.  Suppose we call the file myReport.fo
>
>    fop  myReport.fo  myReport.pdf
>
> There's your PDF file.  You can
>    - embed images and scale them to the proper size
>    - draw tables with borders (with full control over internal  
> borders)
>    - have text that wraps lines
>    - format text using center, left, right or justified
>    - change fonts, font sizes, etc.
>    - bold italic, underline, etc.
>    - change text background colors and foreground colors
>
> All of this is controlled by a fairly easy to write XML file.  Cool.
>
> David Buck
> Simberon Inc.,
> www.simberon.com

Antony Blakey
--------------------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

Lack of will power has caused more failure than lack of intelligence  
or ability.
  -- Flower A. Newhouse

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Creating PDF document from within VisualWorks How to

Boris Popov, DeepCove Labs (SNN)
In reply to this post by Mark Pirogovsky-3
Re: [vwnc] Creating PDF document from within VisualWorks How to

Also google for "PDFReactor". We've been using it for years now and are very happy with it.

-Boris (via BlackBerry)

----- Original Message -----
From: [hidden email] <[hidden email]>
To: [hidden email] <[hidden email]>
Cc: Visualworks Mailing List <[hidden email]>
Sent: Wed Aug 19 08:47:01 2009
Subject: Re: [vwnc] Creating PDF document from within VisualWorks How to

All the same lines, I can strongly recommend http://www.princexml.com
It's a CSS + XML/XHTML based formatter. I've recently built and 
deployed a system using prince for a client and I was very happy with 
it. Not free, but as VW users know, sometimes the best stuff isn't.

On 19/08/2009, at 7:26 PM, David Buck wrote:

> Download Apache FOP (http://xmlgraphics.apache.org/fop/).  This is a
> program that can run from the command-line and can convert an XML 
> format
> called XSL-FO into PDF.  I just spent the last several months 
> converting
> all of our reports into FOP format and I'm very impressed by it.  
> We've
> not run across any major restrictions with it.  We just get our
> Smalltalk application to write out the XML file with the data already
> embedded in  and run fop.  Suppose we call the file myReport.fo
>
>    fop  myReport.fo  myReport.pdf
>
> There's your PDF file.  You can
>    - embed images and scale them to the proper size
>    - draw tables with borders (with full control over internal 
> borders)
>    - have text that wraps lines
>    - format text using center, left, right or justified
>    - change fonts, font sizes, etc.
>    - bold italic, underline, etc.
>    - change text background colors and foreground colors
>
> All of this is controlled by a fairly easy to write XML file.  Cool.
>
> David Buck
> Simberon Inc.,
> www.simberon.com

Antony Blakey
--------------------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

Lack of will power has caused more failure than lack of intelligence 
or ability.
  -- Flower A. Newhouse

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Creating PDF document from within VisualWorks How to

Gregory Bourassa-3
In reply to this post by davidbuck
Hi David,

You are right about XSL-FO (XSL Formatting Objects) and the FOP processor!   I have been using it for several years now, through various versions of the tool chain.   We are using the approach at Key, now,  for our Release Notes documents and other technical papers.

Just to add to your list of useful attributes of this approach:

    - XSL-FO does not enforce a particular final published format on your documents.   The FOP processor can turn them into PDF,  HTML,  and other formats.  RTF is one of those, though I have not used that one myself.

    - XSL-FO will be familiar in many ways to people who know CSS, because many of the style attribute values have been kept the same

    - Major document XML vocabularies like DocBook already come with XSL transforms to generate XSL-FO files from your original document in those vocabularies.

    - You automatically achieve the separation of logical content and presentation, without losing control -- I have often tweaked XSL transforms supplied with a vocabulary or even written my own from scratch, to achieve my own preferred formatting without forcing that formatting into my document's logical content.

    -  Things like bidirectionally-linked tables of contents are easy to achieve (cf: automatic, once you have the XSL transform in hand) without the author being concerned about them during the writing process.

etc., etc.

Gregory Bourassa


David Buck wrote:
Download Apache FOP (http://xmlgraphics.apache.org/fop/).  This is a 
program that can run from the command-line and can convert an XML format 
called XSL-FO into PDF.  I just spent the last several months converting 
all of our reports into FOP format and I'm very impressed by it.  We've 
not run across any major restrictions with it.  We just get our 
Smalltalk application to write out the XML file with the data already 
embedded in  and run fop.  Suppose we call the file myReport.fo

    fop  myReport.fo  myReport.pdf

There's your PDF file.  You can
    - embed images and scale them to the proper size
    - draw tables with borders (with full control over internal borders)
    - have text that wraps lines
    - format text using center, left, right or justified
    - change fonts, font sizes, etc.
    - bold italic, underline, etc.
    - change text background colors and foreground colors

All of this is controlled by a fairly easy to write XML file.  Cool.

David Buck
Simberon Inc.,
www.simberon.com

Mark Pirogovsky wrote:
  
Hello All, I have two questions:

A.  I need to be able to create PDF documents from the VisualWorks 
application.
Those documents are simple text documents such as reports, invoices, etc.

Does anybody have any suggestion what is the best way of doing it ?


B. I came across the SPDF library by Bruce Badger  in the public 
repository which supposed to do just that. However there is no 
documentation of any sort besides few tests which supposed to show what 
is the library capable of doing.

Does anybody have any documentation or  information on how to use the SPDF ?

Any information is greatly appreciated

Truly,

Mark Pirogovsky
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

  
    

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

  

Key Technology, Inc. Disclaimer Notice - The information and attachment(s) contained in this communication are intended for the addressee only, and may be confidential and/or legally privileged. If you have received this communication in error, please contact the sender immediately, and delete this communication from any computer or network system. Any interception, review, printing, copying, re-transmission, dissemination, or other use of, or taking of any action upon this information by persons or entities other than the intended recipient is strictly prohibited by law and may subject them to criminal or civil liability. Key Technology,  Inc. is not liable for the improper and/or incomplete transmission of the information contained in this communication or for any delay in its receipt.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Creating PDF document from within VisualWorks How to

davidbuck
In reply to this post by davidbuck
Here's a "Hello World" document in XSL-FO:

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

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

  <fo:layout-master-set>

              <fo:simple-page-master 
               master-name="simple"
                  page-height="29.7cm"
                  page-width="21cm"
                  margin-left="2.5cm"
                  margin-right="2.5cm">
      <fo:region-body margin-top="3cm"/>
    </fo:simple-page-master>

  </fo:layout-master-set>

  <fo:page-sequence 
          master-reference="simple">

            <fo:flow 
           flow-name="xsl-region-body">

      <fo:block>Hello, World</fo:block>

    </fo:flow>
  </fo:page-sequence>
</fo:root>
You're seeing mostly the boilerplate page layout stuff.  The line with Hello, World would be where your actual content goes.

David Buck
Simberon Inc.
www.simberon.com


David Buck wrote:
Download Apache FOP (http://xmlgraphics.apache.org/fop/).  This is a 
program that can run from the command-line and can convert an XML format 
called XSL-FO into PDF.  I just spent the last several months converting 
all of our reports into FOP format and I'm very impressed by it.  We've 
not run across any major restrictions with it.  We just get our 
Smalltalk application to write out the XML file with the data already 
embedded in  and run fop.  Suppose we call the file myReport.fo

    fop  myReport.fo  myReport.pdf

There's your PDF file.  You can
    - embed images and scale them to the proper size
    - draw tables with borders (with full control over internal borders)
    - have text that wraps lines
    - format text using center, left, right or justified
    - change fonts, font sizes, etc.
    - bold italic, underline, etc.
    - change text background colors and foreground colors

All of this is controlled by a fairly easy to write XML file.  Cool.

David Buck
Simberon Inc.,
www.simberon.com

Mark Pirogovsky wrote:
  
Hello All, I have two questions:

A.  I need to be able to create PDF documents from the VisualWorks 
application.
Those documents are simple text documents such as reports, invoices, etc.

Does anybody have any suggestion what is the best way of doing it ?


B. I came across the SPDF library by Bruce Badger  in the public 
repository which supposed to do just that. However there is no 
documentation of any sort besides few tests which supposed to show what 
is the library capable of doing.

Does anybody have any documentation or  information on how to use the SPDF ?

Any information is greatly appreciated

Truly,

Mark Pirogovsky
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

  
    

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

  


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc