 |
|
 |
hi,
I would like to mention that one of disadvantages of FOP is that you have to learn XSL-FO and you spend quite a lot of time testing your XSL:FO file until you get the perfect output. However in the mean time that are some XSL:FO editors that can help you overcome these small problems
here you have some links:
http://www.java4less.com/fopdesigner/fodesigner.php
http://www.ecrion.com/
|
|
|
|
 |
|
 |
Good job done... thank you
|
|
|
|
 |
|
 |
Hello Users,
I have tried nFOP and it works nice for PDF generation. However, I wanted to use it to generate RTFs. Anyone knows how to do this. ApacheFOP uses JFOR for RTF conversion. Do I need to import this library too? If so, how do I do it?
I have tried:
driver.setRenderer(8);
Doesn't generate an RTF file. During runtime, the process hangs up.
Help would be greatly appreciated.
Thanks,
Uday
|
|
|
|
 |
|
 |
Hi,
I want to create PDF with security options, such as "Print" is not allowed, "Content Copying" is not allowed.
How I have to add these properties when creating the PDF using NFOP?
Regards,
Vinoth
|
|
|
|
 |
|
 |
Hello, World!
This a very great project to use FOP in C#. Well, I am facing run time error. Appreciate little help.
The below code compiles and works perfect.I have installed j# redistributable 2.0 and also jre.
FileInputStream streamFO = new FileInputStream(foFile);
InputSource src = new InputSource(streamFO);
FileOutputStream streamOut = new FileOutputStream(pdfFile);
//Driver driver = new Driver(src, streamOut);
//driver.setRenderer(Driver.RENDER_PDF);
//driver.run();
streamOut.close();
However, when I uncomment the Driver part, the result is same. The PDF file is not being written. When I open the file it is empty(error: "There was an error opening this document. The file is damaged and could not be repaired.") and never been written.
I suspect I haven't installed some of the libraries.
I have added the reference to vjslib.dll and also Fop.net.dll(renamed it to Apache.net.dll).
When I do 'Go to Definition..' for Driver it is leads me to some class. I believe I have added the dll in the right way. But, the problem is during run-time, the PDF is not being written.
Thanks,
Appreciate all the help,
Uday.
|
|
|
|
 |
|
 |
However, after several trial and error I have realized the problem is occurring due the nFop integration in my project. My project is a Windows NT service. It generates thread each time an event is launched and the thread the generatePDF functionality. Compiles perfect! when i run the service and launch ONE event, I see the pdf appeared at the destination folder. When I tried to open it, it says it been used by other program. OK! so, now I stop the service and open the file. It says it is damaged!
When two events are launched simultaneously, it shoots we a exception error. Does ISO8859_1 mean something?
Please help. Below is the code I have been working. fsw_Created is the function launched when the event occurs. Am I messing up with the threads?
private void fsw_Created(object sender, System.IO.FileSystemEventArgs e)
{
Thread t = new Thread(new ParameterizedThreadStart(Sendfile));
t.Start(info);
}
public void Sendfile(object _info)
{
String[] info = (String[])_info;
GeneratePDF(@"C:\Report.fo", "C:\Report.pdf");
}
private static void GeneratePDF(string foFile, string pdfFile)
{
FileInputStream streamFO = new FileInputStream(foFile);
InputSource src = new InputSource(streamFO);
FileOutputStream streamOut = new FileOutputStream(pdfFile);
Driver driver = new Driver(src, streamOut);
driver.setRenderer(1);
driver.run();
streamOut.close();
}
Thanks,
Uday.
|
|
|
|
 |
|
 |
I am sorry, I have traced the problem myself. After many exception handling and debugging, I have realized that the FO file had encoding="ISO8859_1" instead of encoding="UTF-8"!!!!
="1.0" ="iso-8859-1"
changed to...
="1.0" ="utf-8"
Hope this little tip would help in future.
Uday.
|
|
|
|
 |
|
 |
Could not load file or assembly 'vjslib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
|
|
|
|
 |
|
|
 |
|
 |
I'm at a point where I'm using NFOP to take an XML file, parse it using an XSL file, and save a PDF. However, because the XML is well formed, the html within it looks like this:
<p>Some text here <strong>bolded text</strong>
So in the PDF, this gets converted to:
<p>Some text here <strong>bolded text</strong>
The people who need to look at the PDFs don't know html and won't want to see this extra code.
I've tried using Saxon to parse through this particular bit of code, but errors display. I've learned via Google that Saxon and NFOP require the inclusion of their respective libraries (ApacheFop.Net.dll and IKVM.GNU.Classpath) but these libraries have an overlap in the form of org.xml.sax.
Does anyone use any particular parser to convert encoded xml as specified above into the appropriate characters - just for one or two nodes?
|
|
|
|
 |
|
 |
I'm trying to include the following image reference:
<fo:block>
<fo:external-graphic src="url(catcode_logo.jpg)"
width="99px" height="109px"/>
</fo:block>
I've also tried:
<fo:block>
<fo:external-graphic src="file:catcode_logo.jpg"
width="99px" height="109px"/>
</fo:block>
The image is at the same level as the other files, but it's not being included in the PDF. Are external graphics not supported by NFOP?
|
|
|
|
 |
|
 |
your tag should look like
<fo:external-graphic src="url(C:\\catcode_logo.jpg)" width="99px" height="109px"/>
Include the entire path.
|
|
|
|
 |
|
 |
Does anybody know what type of license Fop has?
I have found one post on the Apache mailing list that gives me some doubts if I can use this library in commercial applications.
The questions are as follows:
Thequestion is if the person who did that port did it correctly without
violating the Apache license.
He produces a source and binary distribution. The binary only contains a
DLL. No license included. The source however contains a copy of the
source code from FOP, Xerces and Avalon Framework.
Now, the following can be said:
- The Apache Software license is not included in his distributions.
- He took a copy of the source before we applied the long license
headers in FOP.
- The notice "This product includes software developed..." is missing
AFAICS.
- The name "nfop" might not be in line with the FOP license???
- It's not obvious where he potentially changed Apache code.
|
|
|
|
 |
|
 |
Hi, is it possible to embed for example EAN-13 ttf font in the code.
Using the userconfig.xml file and ean-13.ttf and ean-13.xml file...
Can someone help me out here.
|
|
|
|
 |
|
 |
Hi,
This code is working fine in my local, but when i placed this code in my QA server it is giving this error.
Please help me in this regard.
================================================
Microsoft (R) Visual Basic Compiler version 8.0.50727.1433
for Microsoft (R) .NET Framework version 2.0.50727.1433
Copyright (c) Microsoft Corporation. All rights reserved.
C:\inetpub\wwwroot\CBIQuestionnaire\PDF\Default.aspx.vb(11) : warning BC40056: Namespace or type specified in the Imports 'org.apache.fop.apps' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Imports org.apache.fop.apps
~~~~~~~~~~~~~~~~~~~
C:\inetpub\wwwroot\CBIQuestionnaire\PDF\Default.aspx.vb(13) : warning BC40056: Namespace or type specified in the Imports 'org.xml.sax' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Imports org.xml.sax
~~~~~~~~~~~
C:\inetpub\wwwroot\Ire\PDF\Default.aspx.vb(17) : error BC30182: Type expected.
Dim obj_DA As New DataAccess
~~~~~~~~~~
C:\inetpub\wwwroot\Ire\PDF\Default.aspx.vb(399) : error BC30002: Type 'java.io.FileInputStream' is not defined.
Dim streamFO As New java.io.FileInputStream(FoFile)
~~~~~~~~~~~~~~~~~~~~~~~
C:\inetpub\wwwroot\Ire\PDF\Default.aspx.vb(400) : error BC30002: Type 'InputSource' is not defined.
Dim src As New InputSource(streamFO)
~~~~~~~~~~~
C:\inetpub\wwwroot\Ire\PDF\Default.aspx.vb(401) : error BC30002: Type 'java.io.FileOutputStream' is not defined.
Dim streamOut As New java.io.FileOutputStream(PDFFile)
~~~~~~~~~~~~~~~~~~~~~~~~
C:\inetpub\wwwroot\Ire\PDF\Default.aspx.vb(402) : error BC30002: Type 'Driver' is not defined.
Dim driver As New Driver(src, streamOut)
|
|
|
|
 |
|
 |
hello,
reference-orientation is not supported in the nfop, is there any way i can do to make it work?
thanks,
grace
|
|
|
|
 |
|
 |
Hi,
How can I make documents with non Latin1 (WinAnsi) (for example Latin2) character sets?
I made a little app to make font and userconfig xml files. What's next?
|
|
|
|
 |
|
 |
Hi,
In Visual Sudio 2005, I am not able to build the nFop assembly i.e 'ApacheFop.Net.dll'
The following build error occurs:-
Error 1 /target must be 'exe' or 'winexe' if /main is specified ApacheFop.Net
please let me know how one can successfully build the ApacheFop.Net assembly.
Regards,
Lokesh
|
|
|
|
 |
|
 |
Thanks for the article, it really helps FO-newbies like me starting... I have a question about hyphenation: how can I use it in NFOP? The binaries I download from sourceforge just include a couple of DLL's, and if I try to generate PDF from a block like:
<fo:block hyphenate="true" language="en">...long text...</fo:block>
I get multiple warnings from the processor like:
...
Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
building formatting object tree
setting up fonts
[1]
Couldn't find hyphenation pattern en
Error building hyphenation tree for language en
...
|
|
|
|
 |
|
 |
Hello,
I added Appache.Net.dll in the project reference and added namespaces of org.xml.sax, org.apache.fop, org.apache.fop.apps, org.apache.fop.tools and java.io. When I build the project, it said that namespace 'java' could not be found. I don't what is wrong. If you know what happened, please let me know. Thank you a lot!
Jin
|
|
|
|
 |
|
 |
You need to install the J# .net framework.
|
|
|
|
 |
|
 |
Thank you for a very useful piece of code! One question; I am using this to generate PDF reports from large fo files (>50MB), however the process takes a very long time (>10 minutes). Do you know any tricks to speed up this process? For example it takes about 2 minutes to set up fonts before even beginning to render the first page...
Any assistance would be greatly appreciated!
Darren
|
|
|
|
 |
|
 |
XslCompiledTransform is not available in .NET 1.1. How to use this in 1.1 framework?
|
|
|
|
 |
|
 |
Try this:
Dim foFile As New FileStream(Server.MapPath("~/Reports/clientData.fo"), FileMode.Create)
Dim UTF8enc As New System.Text.UTF8Encoding
Dim foStreamOut As New StreamWriter(foFile, UTF8enc)
Transform.Load(xReader, xResolver, MyEvidence)
Transform.Transform(xDoc, xslList, foStreamOut, xResolver)
(of course, you'll need to new-up your own xResolver, xslList, and MyEvidence objects too, but I hope this gives you the basic idea)
Sid DeLuca
|
|
|
|
 |
|
 |
Kind of difficult to set the support for true type arabic fonts
if anyone has an idea, that would be great. I saw recommendations for using a configuration file, but don't know how, or if it is the same as with an app.config.
for images, it works, I just specify the full path for the image.
Best Regards
Dinia
-- modified at 5:05 Wednesday 15th February, 2006
|
|
|
|
 |