Jump to content


Photo
- - - - -

PDF printing form direct from PROIV V6


30 replies to this topic

#1 DeclanLyne

DeclanLyne

    Member

  • Members
  • PipPip
  • 27 posts

Posted 02 June 2008 - 12:00 AM

I noticed a thread below about the use of reporting tools with PROIV. I posted a new thread so everybody could see it including people that may have already read the thread below and might not read any additional responses.

It is now possible to produce a PDF direct from PROIV using the standard spooler options and an XSLFO Stylesheet. The PDF is produced using FOP which is included in the PROIV version 6 install. I noticed in the other thread concerns about the cost of third party products and licensing issues. FOP is open source so there are no license issues when deploying your reports. The only additional cost is the time spent developing the stylesheets. You will need to learn XSLFO and there are a lot of products that help you write it including some that are WYSIWYG. There are some XSLFO examples included in version 6. This topic is also covered in the new PROIV V6 training courses.

To show what is involved in creating a PDF with PROIV I have attached a document I did for somebody recently. I hope you find it useful.

Regards
Declan

Attached Files



#2 andykay

andykay

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 204 posts
  • Gender:Male
  • Location:Cyberspace...looking for work

Posted 02 June 2008 - 05:06 AM

To show what is involved in creating a PDF with PROIV I have attached a document I did for somebody recently. I hope you find it useful.


Declan,

Your document you did for somebody recently didn't quite make it...Unless you're saying your document is the instruction manual that is attached (w00t) . If not, though, would you repost your document?


AK

Edited by andykay, 02 June 2008 - 05:11 AM.

THE LIGHT AT THE END OF THE TUNNEL IS THE HEADLAMP OF THE TRAIN THAT'S ABOUT TO HIT YOU!!!

#3 GBabula

GBabula

    Member

  • Members
  • PipPip
  • 38 posts
  • Gender:Male
  • Location:Lyndhurst, NJ USA

Posted 02 June 2008 - 03:22 PM

I think he did mean that the instruction document is the document he produced. It's got his name on the title page.

Edited by GBabula, 02 June 2008 - 03:27 PM.


#4 andykay

andykay

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 204 posts
  • Gender:Male
  • Location:Cyberspace...looking for work

Posted 02 June 2008 - 04:58 PM

My Bad...

I saw his name, but I was thrown because Declan stated:

It is now possible to produce a PDF direct from PROIV using the standard spooler options and an XSLFO Stylesheet.


Now, I've only worked at a handfull of companies that used ProIV, but his attachment looks nothing like ANY data contained w/i ProIV that would be outputted in a report (w00t) .

It could be that Declan populated the tables with the text outputted in the PDF, the image data, etc... It seems alot of effort to go through when you could do the same by posting a regular report with pre-existing data...Which is why I thought he may have posted the wrong output.


AK
THE LIGHT AT THE END OF THE TUNNEL IS THE HEADLAMP OF THE TRAIN THAT'S ABOUT TO HIT YOU!!!

#5 DeclanLyne

DeclanLyne

    Member

  • Members
  • PipPip
  • 27 posts

Posted 03 June 2008 - 05:12 AM

Sorry if I have caused confusion.

The document I posted is the instructions on how to produce a PDF from PROIV. It is not the output that was produced. It was a Word document but I saved it as PDF to make it smaller. I can see how that may have caused confusion. I have attached the output (demo.pdf) that was produced in the example. This is a simple example but I have seen somebody produce some really professional output.

I tried to attached the xml that was produced by the PROIV report and the xsl used to transform it into a PDF but it failed when I tried to attach them to this post. I will try them in another post.

Just to clarify, the only part of this that is written in PROIV is the simple PROIV report (TuPDFList) that is shown in the instructions on page 8. I believe the stylesheet was written using Oxygen which I have given a link to on page 13.

Regards
Declan



My Bad...

I saw his name, but I was thrown because Declan stated:

It is now possible to produce a PDF direct from PROIV using the standard spooler options and an XSLFO Stylesheet.


Now, I've only worked at a handfull of companies that used ProIV, but his attachment looks nothing like ANY data contained w/i ProIV that would be outputted in a report (w00t) .

It could be that Declan populated the tables with the text outputted in the PDF, the image data, etc... It seems alot of effort to go through when you could do the same by posting a regular report with pre-existing data...Which is why I thought he may have posted the wrong output.


AK

Attached Files

  • Attached File  demo.pdf   286.61KB   312 downloads


#6 DeclanLyne

DeclanLyne

    Member

  • Members
  • PipPip
  • 27 posts

Posted 03 June 2008 - 05:21 AM

I tried to upload xml and xsl file but it keeps failing with the message. I ried uploading files called demo.xml and demo.xsl and both failed. I renamed them to be .txt and they still failed. Any ideas?

Upload failed. Please ask the administrator to check the settings and permissions

#7 Wim Soutendijk

Wim Soutendijk

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 211 posts
  • Gender:Male
  • Location:Netherlands

Posted 03 June 2008 - 10:36 AM

Hi Declan, thanks for the outline

Can we change these spooler settings at runtime level?
Does @RPTOPT support options to dynamicly alter the xml transformation file from demo.xsl to another .xsl file?

regards,

Wim Soutendijk

#8 DeclanLyne

DeclanLyne

    Member

  • Members
  • PipPip
  • 27 posts

Posted 03 June 2008 - 02:08 PM

Hi Wim,

Long time no speak hope you are well.

In answer to your question you can change the name of the pdf being output. The code looks as follows. I have just tested it and updated the attached instrucions with some screen shots.

SET_RPTOPT("CRT:OUTFMT=XEIZ", "11", "demo.xsl", "MonthEndReport.pdf")

I have also added a new section that demonstrates the new feature in V6 to output XML attributes. In the other thread on reporting I remember there was a post about the limitations of XML output from PROIV. Not sure if this was the limitation they were talking about but I have added some notes as this is demonstrated in the examaple in the instructions.

Hope this helps.

Regards
Declan

Attached Files



#9 Wim Soutendijk

Wim Soutendijk

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 211 posts
  • Gender:Male
  • Location:Netherlands

Posted 03 June 2008 - 06:05 PM

Hi Declan,

Yes I am very fine, thank you.
Ready to improve the output of our application, now the screens have been converted.
thanks again for the documentation

Regards,

Wim Soutendijk.

#10 Matthews Estrice

Matthews Estrice

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 241 posts
  • Gender:Male
  • Location:Henley-on-klip

Posted 16 June 2008 - 02:48 PM

Hi Declan,

It would be interresting to see how you would wrap SVG into your FOP when dumping the data objects from PROIV to the XSLT.I use itext from www.itext.com of which is core JAVA development.That is free but time consuming in terms of development.

Matthews

#11 Ross Bevin

Ross Bevin

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 226 posts
  • Gender:Male
  • Location:Manzanillo, Colima, Mexico

Posted 23 July 2008 - 10:01 PM

Hi Declan,

How are the Aussies treating you?

Thanks for creating this post; it was very timely for me. I have been requested by my customer to come up with a method to produce invoices in PDF format. The information in your PROIV Version 6 PDF Printing paper has been very helpful but I have a couple of questions for you. I want to print invoices to a PDF file but I don't neccessarily want to launch the PDF Reader and view it; I just want to create the PDF files, one for each invoice, and write them to a folder. Each PDF file name would include the invoice number so I could identify it later in order to e-mail it to the customer.

Can I do this and suppress the PDF Reader from launching?
Can it be done via the spooler options by setting the required parameters in @RPTOPT?

Thanks for your help on this.

Ross

#12 Matthews Estrice

Matthews Estrice

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 241 posts
  • Gender:Male
  • Location:Henley-on-klip

Posted 24 July 2008 - 09:06 AM

Hi Ross,

What servlet container are you using(web application or web server)?
What language will you be using after getting the data from PROIV.
You will need a mail API in oder to email the invoices, of which I use the JAVA mail API for the mail server and recipients.
You will need a programming language to find the location of the file to attach to the email,I use JAVA.
You will need scripts to attach the company logo to the invoices.
I would use XMLHttpRequest to Process request and Generate response to run batch invoices.
I dynamically give each PDF document name using invoice number and the date the invoice was created.
The invoices are allocated on the folder, for emailling and viewing on the web.

NB:- whitespaces on the document you created.
I will recommend you to use itext.jar , email.jar file.
This project you are busy with is time consuming and involved.Let me know if you need my recommendation.
Good Luck.

Matthews Estrice

#13 Ross Bevin

Ross Bevin

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 226 posts
  • Gender:Male
  • Location:Manzanillo, Colima, Mexico

Posted 24 July 2008 - 01:23 PM

Hi Matthews,

Thanks for the reply. My plan though is to use Pro-IV to handle as much as possible. I use SMTPSEND.EXE for e-mailing. To find the PDF files I would normally execute a SYSTEM call to write the contents of a folder to a text file and then parse it for processing but for this project I plan on using Pro-IV's new Folder file type. Basically I want to follow the recommendations in Declan's white paper and have Pro-IV generate XML output in association with a stylesheet to create a PDF file.

Ross

#14 Matthews Estrice

Matthews Estrice

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 241 posts
  • Gender:Male
  • Location:Henley-on-klip

Posted 24 July 2008 - 04:03 PM

Hi Ross,

I cannot think of anyway of creating multiple XML files dynamically to create multiple files and also create a XLST file for each XML file and produce a PDF file name for each invoice using FOP in PROIV to spool.
At some stage we will need to iterate in PROIV, I use Hashtables to iterate.
:rolleyes:

I am willing to learn with you Ross,that is why I am poking my nose :- .

Matthews

#15 Ross Bevin

Ross Bevin

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 226 posts
  • Gender:Male
  • Location:Manzanillo, Colima, Mexico

Posted 24 July 2008 - 05:19 PM

Hi Matthews,

Are you on version 6.1 or 5.5? We upgraded to 6.1 in October 2007 (one of the first) and run on a Citrix/Windows 2003 environment. I am hoping that 6.1 makes it easier to do what I want with PDF creation. I will find out!

Ross



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users