Re: Changes in pdf tiff compression configuration has no effect on size of pdf generated

2014-01-28 Thread Szeak (Register Man)

Hi Valentina!

Try these documented settings in a PDF renderer section.


flate
ascii-85
  

Bye, Szeak

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Changes in pdf tiff compression configuration has no effect on size of pdf generated

2014-01-28 Thread Szeak (Register Man)

Hi!

So, I think the FOP working mechanism is:
By rendering the output it uncompress and rendering the images into the 
document.
Because of you need to define the PDF settings i sent before for 
recompresing used images in the pdf.


I don't use these settings ever, i just think it working as i wrote above.

Bye Szeak

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Tiff image - color distortion

2014-01-29 Thread Szeak (Register Man)
I think these words in documentation give an answer why your tiff images 
are uncompressing by fop image loader:


"
TIFF

FOP can embed TIFF images without decompression into PDF, PostScript and 
AFP if they have either CCITT T.4, CCITT T.6, or JPEG compression. 
Otherwise, a TIFF-capable Image I/O codec is necessary for decoding the 
image.


There may be some limitation concerning images in the CMYK color space.
"

So i think, the best way to serve your problem is converting your tiff 
images to appropriate format (what documentation tells) before using it 
in fop.


Hope this help you.

Have a nice day!

Szeak

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: FOP 1.0 Linux Arial not working

2014-02-26 Thread Szeak (Register Man)

Hi,

You need to use the ARIALUNI.TTF from your windows Fonts directory and 
configure it in fop config in "fonts" node.


Like here:

weight="normal"/>


If your font-base is set. You can aslo copy this 3 more when you need 
for normal-bold, italic-normal and italic-bold variations.


Bye Szeak

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Upgrading fop 0.95 to fop 1.1 because of PDF/A-1b

2014-08-21 Thread Szeak (Register Man)

Hi,

I think font embedding into PDF works with FOP 1.1, as described here: 
http://xmlgraphics.apache.org/fop/1.1/fonts.html#embedding

I'm using FOP 1.1 and embedding works well with PDF format.

Bye, Szeak

2014-08-21 08:56 keltezéssel, Pascal Sancho írta:

Hi,

embedding-mode is a new feature recently added in FOP trunk (see [1]).
FOP v1.1 doesn't implement it (see [2]).

[1] http://xmlgraphics.apache.org/fop/trunk/fonts.html#register
[2] http://xmlgraphics.apache.org/fop/1.1/fonts.html#register


2014-08-20 19:13 GMT+02:00 MartinKl :

Hello Simon,
Thank you for your response. I will try to apply the path you give the link
on it.

You also gave me a "kick" to look up if embedding-mode="full" work in FOP
1.1 . Apparently not

https://issues.apache.org/jira/browse/FOP-2128?jql=text%20~%20%22embedding-mode%3D%5C%22full%5C%22%22


and here is also patch. If these two patches will work for me I will be
happy and angry on same time... but more happy :-D

I will try it tomorrow when I get to work. Thank you a lot.

Martin






--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Upgrading-fop-0-95-to-fop-1-1-because-of-PDF-A-1b-tp41090p41093.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org







-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Upgrading fop 0.95 to fop 1.1 because of PDF/A-1b

2014-08-21 Thread Szeak (Register Man)

Sorry, i haven't read the whole history in this context.
Hope this will be solved.

Bye

2014-08-21 09:47 keltezéssel, Pascal Sancho írta:

Hi,

sure, font embedding exists for a long time in FOP.
we 're talking about embedding subset or full font, witch is a quite
recent feature.

2014-08-21 9:16 GMT+02:00 Szeak (Register Man) :

Hi,

I think font embedding into PDF works with FOP 1.1, as described here:
http://xmlgraphics.apache.org/fop/1.1/fonts.html#embedding
I'm using FOP 1.1 and embedding works well with PDF format.

Bye, Szeak

2014-08-21 08:56 keltezéssel, Pascal Sancho írta:


Hi,

embedding-mode is a new feature recently added in FOP trunk (see [1]).
FOP v1.1 doesn't implement it (see [2]).

[1] http://xmlgraphics.apache.org/fop/trunk/fonts.html#register
[2] http://xmlgraphics.apache.org/fop/1.1/fonts.html#register


2014-08-20 19:13 GMT+02:00 MartinKl :

Hello Simon,
Thank you for your response. I will try to apply the path you give the
link
on it.

You also gave me a "kick" to look up if embedding-mode="full" work in FOP
1.1 . Apparently not


https://issues.apache.org/jira/browse/FOP-2128?jql=text%20~%20%22embedding-mode%3D%5C%22full%5C%22%22

<https://issues.apache.org/jira/browse/FOP-2128?jql=text%20~%20%22embedding-mode%3D%5C%22full%5C%22%22>

and here is also patch. If these two patches will work for me I will be
happy and angry on same time... but more happy :-D

I will try it tomorrow when I get to work. Thank you a lot.

Martin






--
View this message in context:
http://apache-fop.1065347.n5.nabble.com/Upgrading-fop-0-95-to-fop-1-1-because-of-PDF-A-1b-tp41090p41093.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org





-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org







-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: page number, but only if more than one page exists

2015-03-23 Thread Szeak (Register Man)

Hi,

Another option to define 2 different page-master, one for the first 
page, and one for rest of pages.

Then define a page-sequence-master for a complex set of pages.

Example:






























Bye, Szeak

2015-03-22 17:30 keltezéssel, Roberto Nunnari írta:

Hi.

I need to change a servlet that generates a FO document and then 
transforms it into a pdf document. Unfortunately I know almost nothing 
about Formatting Objects. :-(


At present the FO adds the page number on every page.

I need to change it so that it adds the page number, but only if there 
are more than one page.


fop version in use is very old.. 0.91beta and build-Id is from 20051223

Any help very appreciated.

Thank you and best regards.
Robi

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: page number, but only if more than one page exists

2015-03-23 Thread Szeak (Register Man)

Hi again,

If you want to add page number also for the first page, when the 
document have more than one pages, you'll need 2 times rendering.
After first you can check the number of pages, than when you know it, 
you can format your document with the needed page numbering option.
FOP can produce page numbers after rendering. ie.: You can render first 
into an Intermediate Format, second to PDF. But you can choose another 
way also ...


Bye.

2015-03-22 17:30 keltezéssel, Roberto Nunnari írta:

Hi.

I need to change a servlet that generates a FO document and then 
transforms it into a pdf document. Unfortunately I know almost nothing 
about Formatting Objects. :-(


At present the FO adds the page number on every page.

I need to change it so that it adds the page number, but only if there 
are more than one page.


fop version in use is very old.. 0.91beta and build-Id is from 20051223

Any help very appreciated.

Thank you and best regards.
Robi

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: page number, but only if more than one page exists

2015-03-23 Thread Szeak (Register Man)

Hi,
I think, Barnardo's idea is the best for you.

bye

2015-03-22 23:21 keltezéssel, Luis Bernardo írta:


Try using a mix of page masters with different page positions (see 
http://www.w3.org/TR/xsl/#page-position).


You will need a page master with page-position="only" without the page 
number, and a page master with page numbers when there is more than 
one page (i.e. when page-position="only" does not apply).


On 3/22/15 10:43 PM, Roberto Nunnari wrote:

On 22. 03. 15 17:30, Roberto Nunnari wrote:

Hi.

I need to change a servlet that generates a FO document and then
transforms it into a pdf document. Unfortunately I know almost nothing
about Formatting Objects. :-(

At present the FO adds the page number on every page.

I need to change it so that it adds the page number, but only if there
are more than one page.

fop version in use is very old.. 0.91beta and build-Id is from 20051223

Any help very appreciated.

Thank you and best regards.
Robi


Hi.

I got a slightly better result than having only the number using
 / 

and adding an empty block at the end of the flow..


It works.. and it's already better than having just the page number 
because seeing also the total number of pages lets you know if you 
have in your hands the whole document or not.. but it's not exactly 
what I was asked to do..


Any hints on how to accomplish the original goal?
Thank you and best regards.
Robi


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Exception while using Ubuntu Mono font

2015-07-01 Thread Szeak (Register Man)

2015-06-30 22:31 keltezéssel, hrj írta:

Hi,

I am using Apache FOP 2.0, and try to use the Ubuntu Mono font.

However, Apache FOP can't embed this font, and I see this exception:

Unable to load font file:
file:/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-R.ttf.
Reason: java.lang.ArrayIndexOutOfBoundsException

The version of the Ubuntu font file is 0.8 (latest).

Is this a known problem? Should I file a bug? And if so, in which
package should the bug be filed?

thanks,


Hi,

I have the same problem.
I use another mono font type yet.

Bye

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: FOP API: AT and PDF outputs in one go

2015-11-27 Thread Szeak (Register Man)

Hi,

Just an idea: why don't you use the intermediate format?
So, first render FO to intermediate format (IF), than render IF to PDF.
This is two steps but nearly the same time, as one step FO to PDF.

Bye, Szeak

2015-11-27 04:06 keltezéssel, Carlos Villegas írta:

Hi,

Using the FOP embedding API, can I get the  area tree and PDF outputs 
in one go?
I need both outputs for the same input, the area tree to do some 
post-processing on the PDF.
Currently I'm calling FOP twice, for the area tree, I set it to mimic 
the PDF.

Isn't the area tree available (internally) while processing PDF anyway?
I'm trying to reduce the processing time.

Cheers,
Carlos


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: WG: Embedding Fonts for PDF/A

2016-01-11 Thread Szeak (Register Man)

Hi,

Oh after i wrote the lines below i see YOUR CONFIG IS MISSING:
the font definitions need to be in the fonts tag. So ie.:

...

...


Before i recognized the missing in config:

As i make fo and config to using fonts, it may help you, try it:
First:
In FOP config define the  directive.
Second:
In FOP renderer config, where you define fonts, in embed-url use 
only the file name without path (wich is defined in font-base)
Define the font name as it is in the ttf, ie.: "DejaVu Sans" not 
"DejaVuSans" !!!
- may try to use the embedding-mode="full" attribute (i know it 
will make larger PDF file size)

Third:
Use the font in fo by its given=real name: font-family="DejaVu Sans"

I hope this will help you.

Bye, Szeak


2016-01-07 10:14 keltezéssel, Tunahan Coban írta:

Hey,

I added Pascals variations to my config file and change in the xsl again : .
But it still doesn't work. I get the following sentences:

// a lot of these Warnings
16:40:27,941 WARN  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:7080-2) The following 
feature isn't implemented by Apache FOP, yet: table-layout="auto" (on fo:table) 
(Keine Kontextinformationen verfügbar)
16:40:29,082 WARN  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:7080-2) 
table-layout="fixed" and column-width unspecified => falling back to 
proportional-column-width(1) (No context info available)
16:40:29,268 WARN  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:7080-2) The 
contents of fo:inline line 1 exceed the available area in the 
inline-progression direction by 3896 millipoints. (No context info available)

16:40:29,145 WARN  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:7080-2) Font 
"DejaVuSans,normal,400" not found. Substituting with "any,normal,400".
16:40:29,145 WARN  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:7080-2) Font 
"DejaVuSans,normal,700" not found. Substituting with "any,normal,700".

16:40:29,675 ERROR [org.apache.fop.fo.FOTreeBuilder] (http-/0.0.0.0:7080-2) 
org.apache.fop.pdf.PDFConformanceException: For PDF/A-1a, all fonts, even the 
base 14 fonts, have to be embedded! Offending font: /Times-Roman
16:40:29,690 ERROR [stderr] (http-/0.0.0.0:7080-2) (Position des Fehlers 
unbekannt)org.apache.fop.pdf.PDFConformanceException: For PDF/A-1a, all fonts, 
even the base 14 fonts, have to be embedded! Offending font: /Times-Roman


Here is my finally config file after adding your variations:


true


PDF/A-1a
1.4

















Where could be this problem?

Thanks.

--

-Ursprüngliche Nachricht-
Von: Pascal Sancho [mailto:psancho@gmail.com]
Gesendet: Mittwoch, 6. Januar 2016 16:20
An: Tunahan Coban; fop-users@xmlgraphics.apache.org
Betreff: Re: Embedding Fonts for PDF/A

(Tunahan sent me the FO file off-list, due to confidential things)

Tunahan,
I can reproduce DejaVu substitution:
Your config lacks font descriptions for variations:


 
 



2016-01-06 15:26 GMT+01:00 Tunahan Coban :

Hi Pascal,

Thank you to invest your time for me. It is better for me that our conversation 
don't been uploaded to the mail list site. Because of the internal 
informations. I hope I understand you correctly with the xsl-fo file.
Now I have converted my XML file with the stylesheet to FO.
I will send you this as a mail-attachment.

When you could say me what kind of mistakes you search, so can I help
you.. Because the file is too long, you will see.. :/

Thanks so much !

--


-Ursprüngliche Nachricht-
Von: Pascal Sancho [mailto:psancho@gmail.com]
Gesendet: Mittwoch, 6. Januar 2016 14:43
An: Tunahan Coban
Betreff: Re: Embedding Fonts for PDF/A

Hi,

Please, rather than XSL stylsheet, it's easier for us to play with resulting 
XSL-FO, witch can be achieved without FOP, using XALAN, for example.
And it is better to attach such file rather than copy/paste in mail
body: all blank spaces and lines are preserved,  with actual used encoding.

2016-01-06 14:06 GMT+01:00 Tunahan Coban :

Hi Pascal,



I sent the first part (because the file is 3000 lines long) from the
*.xsl file, too.

Here again:





http://www.w3.org/1999/XSL/Transform";
xmlns:fo="http://www.w3.org/1999/XSL/Format";>

 

 

 

   

   

 

   

 

 

 

 

 

 

 

 

 


 

 

 

 

 

  

Re: XSL-FO external-graphic not showing uri is not recognized

2016-01-18 Thread Szeak (Register Man)

Hi,

use this format of the value in src attribute:
src="url('data:image/png;base64,iVBORw')"

So, you need to modify your src (not the param) like this:




Bye, Szeak

2016-01-15 13:25 keltezéssel, tester írta:

Issue

Load a image using the fo:external-graphic tag.  I have a parameter with the
base64 value of the image.

 data:image/jpg;base64,/9j/4AAQSkZJRgA..
  
I have tried to load the image using


 
 
Error

I get  an error  uri is not recognized

http://i66.tinypic.com/64p1s1.png


XSLT


 
 http://www.ibm.com/maximo";
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
 xmlns:fo="http://www.w3.org/1999/XSL/Format"; >
   



   
name="Name">data:image/jpg;base64,/9j/sghP/Z
   
 http://www.w3.org/1999/XSL/Format";>

   

 
   
 
   

   

 
   
 Hello World!
   
 

   
 
   

 

   
 

  I am using Fonet.dll



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/XSL-FO-external-graphic-not-showing-uri-is-not-recognized-tp43382.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Image placement at top of the page

2016-03-30 Thread Szeak (Register Man)

  
  
Hi,
  
  You may need to set the width of the block-container to fop knows
  where can wrap or hyphenate the text.
  
  
  try the followings:
  
  	
  		
  	
     
      MAP 6: Scotland.
  
  If don't work try to set the height of the container also.
  
  Bye, Szeak
  
  2016-03-28 14:49 keltezéssel, Ganesh Babu N írta:


  Dear All,


I am trying to place the image at
  the top of the page with in the region-body.


I have used 


The image was placed at top but
  the regular text is getting over lapped above the image. How
  to solve this problem. 


Here is my code:



  
  	
  		
  	
  	
  		MAP
6: 
  		Scotland.
  	
  



Please help me.


Regards,
  


  


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Resolve an URI relative to base missing on Windows

2016-08-08 Thread Szeak (Register Man)

Hi,

I'm using FOP 2.1.

With the same simple fo file which is including an external image (jpg), 
with sam config file, and same fop,
URI resolving to the image is OK on Linux, but generates the below Error 
on Windows:


Image not found. URI: images/logo.jpg. (See position 11:67)

If i use url('...') format in src attribute and take the full path, it 
works and includes the image, but relative path is not working.


The problem is not related to using FOP from the command line or 
embedded mode. You can test from command line easy.


The problem is not related to used output format. (I used PDF and PS)

I have read some problem with URI resolving with the new FOP versions 
(from 2.0), but i think that is a new problem.


Please, somebody test this again or i'm waiting for any new info or 
mistake with my files or configuration.


I attached my FO and Config to this mail.


Thanks for any help.



	true
	/data/Develop/Szeak
	600
	
	/data/Develop/Szeak/MyFonts
	true
	

	
		

		
			
./MyFonts
			
		

		
			1.4
			PDF/A-1a
			
flate
			
			
./MyFonts
			
		

		
			speed
			auto
		

		
			3
			true
			true
			true
			quality
			

./MyFonts
			
		

		
			rgba
			false
			white
			true
			speed
			
./MyFonts
			
		

		
			true
			white
			speed
			
./MyFonts
			
		
	




	P:/Szeak
	600
	
	P:/Szeak/Myfonts
	false
	

	
		
			
P:/Szeak/MyFonts
			
		

		
			1.4
			
flate
			
			
P:/Szeak/MyFonts
			
		

		
			speed
			auto
			
P:/Szeak/MyFonts

			
		

		
			speed
			auto
			
P:/Szeak/MyFonts

			
		

		
			3
			true
			true
			true
			quality
			
P:/Szeak/MyFonts
			
		

		
			rgba
			false
			white
			true
			speed
			
P:/Szeak/MyFonts
			
		

		
			true
			white
			speed
			
P:/Szeak/MyFonts
			
		
	



http://www.w3.org/1999/XSL/Format";>
	
		
			
		
	
	
		
			

			
		
	


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Re: Resolve an URI relative to base missing on Windows

2016-08-12 Thread Szeak (Register Man)

  
  
Hi,
  
  After some tests and try to embed FOP by another way, the result
  are:
  1. If i apply the "Basic usage pattern", than base setting by
  config file not working on windows.
  
  
  FopFactory fopFactory = FopFactory.newInstance(new File("C:/Temp/fop.xconf"));
  
  2. If i embed fop, as in the "Using the Configuration File"
  documentation, and put the baseURI by parameter to
  FopFactoryBuilder, it works also on windows.
  
  DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
Configuration cfg = cfgBuilder.buildFromFile(new File("C:/Temp/mycfg.xml"));
fopFactoryBuilder = new FopFactoryBuilder(baseURI).setConfiguration(cfg);
  
  So my concrete problem solved, but using fop by any other way the
  problem occurs.
  
  Szeak
      
      2016-08-08 15:15 keltezéssel, Szeak (Register Man) írta:

Hi,
  
  
  I'm using FOP 2.1.
  
  
  With the same simple fo file which is including an external image
  (jpg), with sam config file, and same fop,
  
  URI resolving to the image is OK on Linux, but generates the below
  Error on Windows:
  
  
  Image not found. URI: images/logo.jpg. (See position 11:67)
  
  
  If i use url('...') format in src attribute and take the full
  path, it works and includes the image, but relative path is not
  working.
  
  
  The problem is not related to using FOP from the command line or
  embedded mode. You can test from command line easy.
  
  
  The problem is not related to used output format. (I used PDF and
  PS)
  
  
  I have read some problem with URI resolving with the new FOP
  versions (from 2.0), but i think that is a new problem.
  
  
  Please, somebody test this again or i'm waiting for any new info
  or mistake with my files or configuration.
  
  
  I attached my FO and Config to this mail.
  
  
  
  Thanks for any help.
  
  



  


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


Re: Need help calling FOP correctly

2016-08-29 Thread Szeak (Register Man)

  
  
Hi,
  
  We need more info about how do you using FOP. What is in FOP
  config?
  Can you show us your used config, and small piece from your code
  which loads or sets the config?
  
  2016-08-29 22:51 keltezéssel, Clark, Raymond C írta:


  
  
  
  
Hi all,
 
At work we have a Java framework that I
  need to hook in with FOP.  So I need our framework to call the
  appropriate FOP classes.methods to produce a PostScript file. 
  I have it producing a PostScript file but I am having trouble
  with fonts.
 
What do I need to call to get a font,
  Helvetica or Times New Roman, etc, loaded into
  PSDocumentHandler correctly so that when I call
  PSPainter.drawText the text appears in the PostScript file? 
  Right now I am getting the Font not available exception.
 
Thank you,
Ray
  
  
  
  
CONFIDENTIALITY NOTICE: This e-mail and any files transmitted
with it are intended solely for the use of the individual or
entity to whom they are addressed and may contain confidential
and privileged information protected by law. If you received
this e-mail in error, any review, use, dissemination,
distribution, or copying of the e-mail is strictly prohibited.
Please notify the sender immediately by return e-mail and delete
all copies from your system.


  



  


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Need help calling FOP correctly

2016-09-02 Thread Szeak (Register Man)

  
  
Well, i'm happy to solve this yourself
  :) Sometimes i tell the problem to a duck on my table, it will be
  solved by itself. :)
  
  Bye
  
  2016-09-01 22:50 keltezéssel, Clark, Raymond C írta:


  
  
  
  
  
Thank you.
 
I was able to
fix my problem by calling:
 

  psDocumentHandler.setupFontResources();
 
And then naming
the font correctly later as:
 
   
IFState
  ifState = IFState.create();
   
  ifState.setFontFamily("Helvetica");
   
  ifState.setFontStyle(Font.STYLE_NORMAL);
   
  ifState.setFontWeight(Font.WEIGHT_NORMAL);
   
  ifState.setFontSize(10);
   
  ifState.setTextColor(Color.BLACK);
   
  ifPainter.setState(ifState);
 
Ray
 

  
From:
    Szeak (Register Man) [mailto:szea...@gmail.com]

Sent: Tuesday, August 30, 2016 1:41 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Need help calling FOP correctly
  

 

  Hi,

We need more info about how do you using FOP. What is in FOP
config?
Can you show us your used config, and small piece from your
code which loads or sets the config?

2016-08-29 22:51 keltezéssel, Clark, Raymond C írta:


  Hi all,
   
  At work we have a Java framework that I
need to hook in with FOP.  So I need our framework to call
the appropriate FOP classes.methods to produce a PostScript
file.  I have it producing a PostScript file but I am having
trouble with fonts.
   
  What do I need to call to get a font,
Helvetica or Times New Roman, etc, loaded into
PSDocumentHandler correctly so that when I call
PSPainter.drawText the text appears in the PostScript file? 
Right now I am getting the Font not available exception.
   
  Thank you,
  Ray
   
  
  

  
  CONFIDENTIALITY NOTICE: This e-mail and any files
  transmitted with it are intended solely for the use of the
  individual or entity to whom they are addressed and may
  contain confidential and privileged information protected
  by law. If you received this e-mail in error, any review,
  use, dissemination, distribution, or copying of the e-mail
  is strictly prohibited. Please notify the sender
  immediately by return e-mail and delete all copies from
  your system.
  


 
-
To unsubscribe, e-mail:
fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail:
fop-users-h...@xmlgraphics.apache.org

  



  


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Resolve an URI relative to base missing on Windows

2016-09-13 Thread Szeak (Register Man)

  
  
Hi,
  
  Problem is not problem, so it was my fault. The Uri scheme i used
  was not correct, it needs to be started with a slash ('/').
  So the correct path is ie.: 
  /C:/Temp/fop.xconf
  And it works with the basic usage poattern of embedding FOP.
  
  Bye.
  
  2016-08-12 08:57 keltezéssel, Szeak (Register Man) írta:


  
  Hi,

After some tests and try to embed FOP by another way, the result
are:
1. If i apply the "Basic usage pattern", than base setting by
config file not working on windows.


FopFactory fopFactory = FopFactory.newInstance(new File("C:/Temp/fop.xconf"));

2. If i embed fop, as in the "Using the Configuration File"
documentation, and put the baseURI by parameter to
FopFactoryBuilder, it works also on windows.

DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
Configuration cfg = cfgBuilder.buildFromFile(new File("C:/Temp/mycfg.xml"));
fopFactoryBuilder = new FopFactoryBuilder(baseURI).setConfiguration(cfg);

So my concrete problem solved, but using fop by any other way
the problem occurs.

Szeak
    
        2016-08-08 15:15 keltezéssel, Szeak (Register Man) írta:
  
  Hi, 

I'm using FOP 2.1. 

With the same simple fo file which is including an external
image (jpg), with sam config file, and same fop, 
URI resolving to the image is OK on Linux, but generates the
below Error on Windows: 

Image not found. URI: images/logo.jpg. (See position 11:67) 

If i use url('...') format in src attribute and take the full
path, it works and includes the image, but relative path is not
working. 

The problem is not related to using FOP from the command line or
embedded mode. You can test from command line easy. 

The problem is not related to used output format. (I used PDF
and PS) 

I have read some problem with URI resolving with the new FOP
versions (from 2.0), but i think that is a new problem. 

Please, somebody test this again or i'm waiting for any new info
or mistake with my files or configuration. 

I attached my FO and Config to this mail. 


Thanks for any help. 

  
  
  



  



Re: batik-fop source code available?

2016-09-29 Thread Szeak (Register Man)

Hi,

You may download it from apache: https://archive.apache.org/dist/xml/batik/

2016-09-29 14:56 keltezéssel, Helga Wurth (hwurth) írta:

Hello!

Is it possible to still get the source code of one of the libraries that
come with an older version of fop?

I would like to have the sources for:

batik:batik-1.5-fop:0.20-5


I was not able to find it in any of the available repositories.


Thanks, Helga


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: batik-fop source code available?

2016-09-29 Thread Szeak (Register Man)
Here's the SVN link: 
http://svn.apache.org/viewvc/xmlgraphics/batik/tags/batik-1_5/


2016-09-29 14:56 keltezéssel, Helga Wurth (hwurth) írta:

Hello!

Is it possible to still get the source code of one of the libraries that
come with an older version of fop?

I would like to have the sources for:

batik:batik-1.5-fop:0.20-5


I was not able to find it in any of the available repositories.


Thanks, Helga


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Place image at top of page

2016-11-28 Thread Szeak (Register Man)

Hi,

I don't think you need any code modifing in Java.
It seems, you need a header for the page, if i understand good your needs..

So for display header correctly, you need to:
1. define an ie.:  in simple-page-master 
definiton
you can define an exact name for it ie.: region-name="myHeader" extent="1in"/>
2. define an  in page-sequence 
definition

you can use the named definition by: 

That's it.

Bye, Szeak

2016-11-25 17:11 keltezéssel, Michel Krämer írta:

Hi!

I'm looking for a way to place an image at the top of the page, just like you 
can do it in LaTeX:

\begin{figure}[t!]
   ...
\end{figure}

If I understand it correctly, you should be able to do this with the fo:float 
object:


   ...


I understand that FOP does not support the "before" value yet.

Is there a workaround to achieve the same thing? For example by placing the 
image absolutely or something like that?

I had a look at the code and it seems the feature is almost implemented but not fully yet. 
There is a BeforeFloat class that is supposed to place blocks in the before-float area, but 
even if I use  this class never receives any children. 
The float also disappears from the output PDF.

If there is no workaround for my problem I would be very interested to 
implement the solution myself. I'm a Java programmer and if anyone could give 
me some pointers on where to start and what is missing in the current code I'd 
probably be able to fill the gaps.

Let me know what you think. Thank you so much!

Cheers,
Michel


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Place image at top of page

2016-11-28 Thread Szeak (Register Man)

Hi,

If you want placing the image after 20. paragraph, why define it between 
22. and 23?

Or
If you want displaying the image exactly on top of the second page?

So if you want displaying the image exactly on top of the second page:
You need to define a bit more complex page-masters as now. I can help 
you in this.


Don't hesitate to answer.

Bye, Szeak

2016-11-28 12:21 keltezéssel, Michel Krämer írta:

Hi Szeak,

Thanks a lot! This sounds very promising indeed. I can't get it to work, 
however.

If I put  inside my page-sequence 
definition I get the following error:

org.apache.fop.fo.ValidationException: For "fo:page-sequence", only one 
"fo:flow" may be declared. (See position 222:48)

If I create a new page-sequence and put it there FOP will end up in an endless 
loop and won't stop generating pages.

I'm not sure this is the right way, although it really sounds promising. Maybe 
I'm just missing something. I uploaded my small example here:

https://gist.github.com/michel-kraemer/af82f3e115afb877338a72fa34a539cf

If you render it you'll see that there is an image between paragraphs 22 and 
23. You'll also see that paragraph 20 breaks at the end of page 1 and continues 
at page 2. I want to place the image at the top of page two, so right in the 
middle of paragraph 20.

Any ideas?

Thanks for your help!

Michel




On 28 Nov 2016, at 11:48, Szeak (Register Man)  wrote:

Hi,

I don't think you need any code modifing in Java.
It seems, you need a header for the page, if i understand good your needs..

So for display header correctly, you need to:
1. define an ie.:  in simple-page-master 
definiton
you can define an exact name for it ie.: 
2. define an  in page-sequence definition
you can use the named definition by: 

That's it.

Bye, Szeak

2016-11-25 17:11 keltezéssel, Michel Krämer írta:

Hi!

I'm looking for a way to place an image at the top of the page, just like you 
can do it in LaTeX:

\begin{figure}[t!]
   ...
\end{figure}

If I understand it correctly, you should be able to do this with the fo:float 
object:


   ...


I understand that FOP does not support the "before" value yet.

Is there a workaround to achieve the same thing? For example by placing the 
image absolutely or something like that?

I had a look at the code and it seems the feature is almost implemented but not fully yet. 
There is a BeforeFloat class that is supposed to place blocks in the before-float area, but 
even if I use  this class never receives any children. 
The float also disappears from the output PDF.

If there is no workaround for my problem I would be very interested to 
implement the solution myself. I'm a Java programmer and if anyone could give 
me some pointers on where to start and what is missing in the current code I'd 
probably be able to fill the gaps.

Let me know what you think. Thank you so much!

Cheers,
Michel


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Place image at top of page

2016-11-28 Thread Szeak (Register Man)

Hi,

My solution for your need is:


page-height="297mm" page-width="210mm" margin="0.2in">




page-height="297mm" page-width="210mm" margin="0.2in">







master-reference="content-with-header"/>
master-reference="content"/>





font-weight="normal" hyphenate="false" 
keep-with-previous.within-column="always" 
line-stacking-strategy="font-height" space-after.maximum="1.7em" 
space-after.minimum="1.3em" space-after.optimum="1.5em" 
space-before.maximum="0em" space-before.minimum="0em" 
space-before.optimum="0em" text-indent="0pt">
Figure 3.1 Layers of code in a complex software 
architecture


keep-together.within-column="always" text-align="center">


content-width="66%" height="auto" 
src="url(https://placeholdit.imgix.net/~text?txtsize=33&txt=350%C3%97150&w=350&h=150&fm=png)" 
width="auto">



font-weight="normal" hyphenate="false" 
keep-with-previous.within-column="always" 
line-stacking-strategy="font-height" space-after.maximum="1.7em" 
space-after.minimum="1.3em" space-after.optimum="1.5em" 
space-before.maximum="0em" space-before.minimum="0em" 
space-before.optimum="0em" text-indent="0pt">

Figure 1 Lorem ipsum dolor sit amet





  the content of body

Bye

2016-11-28 13:18 keltezéssel, Michel Krämer írta:

If you want displaying the image exactly on top of the second page?

Yes, that's what I want! :-) I want to place an image at the top of a page, no 
matter how many paragraphs I have. I want to place it at the top of the very 
page, where I put the image, just like you do it in latex with

begin{figure}[t!]
…
\end{figure}


I can help you in this.

That's very much appreciated. Thank you so much!

Michel



On 28 Nov 2016, at 13:07, Szeak (Register Man)  wrote:

Hi,

If you want placing the image after 20. paragraph, why define it between 22. 
and 23?
Or
If you want displaying the image exactly on top of the second page?

So if you want displaying the image exactly on top of the second page:
You need to define a bit more complex page-masters as now. I can help you in 
this.

Don't hesitate to answer.

Bye, Szeak

2016-11-28 12:21 keltezéssel, Michel Krämer írta:

Hi Szeak,

Thanks a lot! This sounds very promising indeed. I can't get it to work, 
however.

If I put  inside my page-sequence 
definition I get the following error:

org.apache.fop.fo.ValidationException: For "fo:page-sequence", only one 
"fo:flow" may be declared. (See position 222:48)

If I create a new page-sequence and put it there FOP will end up in an endless 
loop and won't stop generating pages.

I'm not sure this is the right way, although it really sounds promising. Maybe 
I'm just missing something. I uploaded my small example here:

https://gist.github.com/michel-kraemer/af82f3e115afb877338a72fa34a539cf

If you render it you'll see that there is an image between paragraphs 22 and 
23. You'll also see that paragraph 20 breaks at the end of page 1 and continues 
at page 2. I want to place the image at the top of page two, so right in the 
middle of paragraph 20.

Any ideas?

Thanks for your help!

Michel




On 28 Nov 2016, at 11:48, Szeak (Register Man)  wrote:

Hi,

I don't think you need any code modifing in Java.
It seems, you need a header for the page, if i understand good your needs..

So for display header correctly, you need to:
1. define an ie.:  in simple-page-master 
definiton
you can define an exact name for it ie.: 
2. define an  in page-sequence definition
you can use the named definition by: 

That's it.

Bye, Szeak

2016-11-25 17:11 keltezéssel, Michel Krämer írta:

Hi!

I'm looking for a way to place an image at the top of the page, just like you 
can do it in LaTeX:

\begin{figure}[t!]
   ...
\end{figure}

If I understand it correctly, you should be able to do this with the fo:float 
object:


   ...


I understand that FOP does not support the "before" value yet.

Is there a workaround to achieve the same thing? For example by placing the 
image absolutely or something like that?

I had a look at the code and it seems the feature is almost implemented but not fully yet. 
There is a BeforeFloat class that is

Re: Place image at top of page

2016-11-29 Thread Szeak (Register Man)

Hi, Michel!

What i think is,

If you can define the image (what need to put on the top of a new page) 
on the right place between paragraphs, than maybe the result will be good.

So, ie.

1. par
2. par
3. par
Figure x ... 
...

4. par
5. par
Figure x ... 
...


The first and second image containing blocks (which have the 
break-before attributes) are placed on top first on a new page.


This is the forced page break solution, and you don't need any complex 
page-master definition or "header" (fo:static-content) for this.


May this help for you.

Szeak

2016-11-28 13:18 keltezéssel, Michel Krämer írta:

If you want displaying the image exactly on top of the second page?

Yes, that's what I want! :-) I want to place an image at the top of a page, no 
matter how many paragraphs I have. I want to place it at the top of the very 
page, where I put the image, just like you do it in latex with

begin{figure}[t!]
…
\end{figure}


I can help you in this.

That's very much appreciated. Thank you so much!

Michel



On 28 Nov 2016, at 13:07, Szeak (Register Man)  wrote:

Hi,

If you want placing the image after 20. paragraph, why define it between 22. 
and 23?
Or
If you want displaying the image exactly on top of the second page?

So if you want displaying the image exactly on top of the second page:
You need to define a bit more complex page-masters as now. I can help you in 
this.

Don't hesitate to answer.

Bye, Szeak

2016-11-28 12:21 keltezéssel, Michel Krämer írta:

Hi Szeak,

Thanks a lot! This sounds very promising indeed. I can't get it to work, 
however.

If I put  inside my page-sequence 
definition I get the following error:

org.apache.fop.fo.ValidationException: For "fo:page-sequence", only one 
"fo:flow" may be declared. (See position 222:48)

If I create a new page-sequence and put it there FOP will end up in an endless 
loop and won't stop generating pages.

I'm not sure this is the right way, although it really sounds promising. Maybe 
I'm just missing something. I uploaded my small example here:

https://gist.github.com/michel-kraemer/af82f3e115afb877338a72fa34a539cf

If you render it you'll see that there is an image between paragraphs 22 and 
23. You'll also see that paragraph 20 breaks at the end of page 1 and continues 
at page 2. I want to place the image at the top of page two, so right in the 
middle of paragraph 20.

Any ideas?

Thanks for your help!

Michel




On 28 Nov 2016, at 11:48, Szeak (Register Man)  wrote:

Hi,

I don't think you need any code modifing in Java.
It seems, you need a header for the page, if i understand good your needs..

So for display header correctly, you need to:
1. define an ie.:  in simple-page-master 
definiton
you can define an exact name for it ie.: 
2. define an  in page-sequence definition
you can use the named definition by: 

That's it.

Bye, Szeak

2016-11-25 17:11 keltezéssel, Michel Krämer írta:

Hi!

I'm looking for a way to place an image at the top of the page, just like you 
can do it in LaTeX:

\begin{figure}[t!]
   ...
\end{figure}

If I understand it correctly, you should be able to do this with the fo:float 
object:


   ...


I understand that FOP does not support the "before" value yet.

Is there a workaround to achieve the same thing? For example by placing the 
image absolutely or something like that?

I had a look at the code and it seems the feature is almost implemented but not fully yet. 
There is a BeforeFloat class that is supposed to place blocks in the before-float area, but 
even if I use  this class never receives any children. 
The float also disappears from the output PDF.

If there is no workaround for my problem I would be very interested to 
implement the solution myself. I'm a Java programmer and if anyone could give 
me some pointers on where to start and what is missing in the current code I'd 
probably be able to fill the gaps.

Let me know what you think. Thank you so much!

Cheers,
Michel


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: Code39 doesn't scan on Paper but on PDF

2017-02-17 Thread Szeak (Register Man)

Hi,

Did you test it by above:
Try printing the document from the right PDF, and try scanning from 
this. If scanning from paper (which printed from PDF) is ALSO WRONG, 
than problem is related to your printer.


Szeak

2017-02-16 16:13 keltezéssel, sandeepsangole írta:

Hi All,

  I am using Apache FOP and barcode4j to generate barcode.The number of
letters in my barcode is 18 and page width is 5.5cm. When I reduce the width
barcode fits into the page and barcode is still scannable from pdf.But when
its printed on paper its not printing propertly, lines are to dark and
doesnt look clear. Could you please help me if there is any workaround ?
Find below XSL template,









 
 http://barcode4j.krysalis.org/ns";
  orientation="0"
  message="{$message}">
 
 
 
 
 
 
 

 
 none
 
 
 
 


Have tried different combinations of wide factor, interchangable gaps but
doesnt help.Using code39 is mandatory, works fine with Code128.



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Code39-doesn-t-scan-on-Paper-but-on-PDF-tp44891.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Code39 doesn't scan on Paper but on PDF

2017-02-17 Thread Szeak (Register Man)

Hi, again

I think there are some things you may need to check:
- Your scanner capabilities (the minimum for modul-size in code39)
- Your FOP configuration (target-resolution: i think for good quality, 
it needs 600 dpi also for PCL and PS output)
- Your printer actual quality. It must be clean and good condition (May 
need a cleaning by service).


Szeak

2017-02-16 16:13 keltezéssel, sandeepsangole írta:

Hi All,

  I am using Apache FOP and barcode4j to generate barcode.The number of
letters in my barcode is 18 and page width is 5.5cm. When I reduce the width
barcode fits into the page and barcode is still scannable from pdf.But when
its printed on paper its not printing propertly, lines are to dark and
doesnt look clear. Could you please help me if there is any workaround ?
Find below XSL template,









 
 http://barcode4j.krysalis.org/ns";
  orientation="0"
  message="{$message}">
 
 
 
 
 
 
 

 
 none
 
 
 
 


Have tried different combinations of wide factor, interchangable gaps but
doesnt help.Using code39 is mandatory, works fine with Code128.



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Code39-doesn-t-scan-on-Paper-but-on-PDF-tp44891.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Trying to use font Quicksand

2017-02-20 Thread Szeak (Register Man)

Hi,

You need configure the fop for your output renderer to  
mode. See FOP Configuration on the web.


Szeak

2017-02-20 12:20 keltezéssel, Chris Dams írta:

Dear all,

I am trying to use the font Quicksand 
(https://www.fontsquirrel.com/fonts/quicksand) with fop. This is an 
opentype font. I am generating PDF. I installed the font on Windows. 
When I use cygwin and list the files in the Windows/Fonts directory it 
lists "Quicksand_Dash.otf  Quicksand-Bold.otf 
Quicksand-BoldItalic.otf  Quicksand-Italic.otf Quicksand-Light.otf  
Quicksand-LightItalic.otf Quicksand-Regular.otf". When I go to the 
directory with Windows Explorer it shows files "Quicksand" and 
"Quicksand Dash Extra Light". I can choose the font Qiucksand in Word 
and this works. In my fo file I also try to use this font by doing 
font-family="Quicksand". This, however, does not work. Instead Times 
is displayed. When I run fop from the command line by running "fop.bat 
 ", I see the warning "WARNING: Font 
"Quicksand,normal,400" not found. Substituting with "any,normal,400". 
The page https://xmlgraphics.apache.org/fop/2.1/fonts.html suggests 
that this should work out of the box. Am I missing something?


Have a nice day,
Chris




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Dynamically insert SVG graphics in the XML passed to FOP

2017-06-26 Thread Szeak (Register Man)

Hi,



may select nodes only under svgDynamique element, and not svgDynamique 
itself. If don't work try:




or



Best regards, szeak

2017-06-26 12:41 keltezéssel, Matthias Reischenbacher írta:

Hi,

On 24.06.2017 00:50, Pierre Caron wrote:

Thank you Matthias. I was able to generate valid SVG code with this :

 handler.startElement("svgDynamique");
 handler.startElement("http://www.w3.org/2000/svg";, "svg", "svg
width=\"20\" height=\"20\"", EMPTY_ATTS);
 handler.startElement("g style=\"fill:red; stroke:#00\"");

Don't use handler.startElement witout specifying a namespace and the
attributes (such as "style") should be specified as last parameter of
the startElement method call.

 handler.element("rect x=\"0\" y=\"0\" width=\"15\"
height=\"15\"", "");
 handler.element("rect x=\"5\" y=\"5\" width=\"15\"
height=\"15\"", "");

Same here. Use startElement with namespace and fix attribute.

 handler.endElement("g");
 handler.endElement("http://www.w3.org/2000/svg";, "svg", "svg");
 handler.endElement("svgDynamique");

which yielded :


http://www.w3.org/2000/svg";>







Now, the problem is inserting this code in the fo template.  I have tried
the following :

 
 
 
 
 ]
 
 

but I get the following message which suggest that the SVG code isn't
present :

org.apache.fop.fo.ValidationException: "fo:instream-foreign-object" is
missing child elements. Required content model: one (1) non-XSL namespace
child (No context info available)

I have also tried without success either :

  

 should work.

My second question is : if the SVG is generated through Batik, how do you
embed it in the fo file?

You will need to parse the SVG file and insert it into the FO file via
DOM operations or you use the fo:external-graphic element and specify as
source the SVG file.

Best regards,
Matthias


Again, thank you very much!



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Dynamically-insert-SVG-graphics-in-the-XML-passed-to-FOP-tp45237p45239.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Dynamically insert SVG graphics in the XML passed to FOP

2017-06-26 Thread Szeak (Register Man)
Sorry, what i wrote is totally wrong. :) you don't need svgDynamique 
element :)


sorry again

2017-06-26 13:04 keltezéssel, Szeak (Register Man) írta:

Hi,



may select nodes only under svgDynamique element, and not svgDynamique 
itself. If don't work try:




or



Best regards, szeak

2017-06-26 12:41 keltezéssel, Matthias Reischenbacher írta:

Hi,

On 24.06.2017 00:50, Pierre Caron wrote:

Thank you Matthias. I was able to generate valid SVG code with this :

 handler.startElement("svgDynamique");
handler.startElement("http://www.w3.org/2000/svg";, "svg", "svg
width=\"20\" height=\"20\"", EMPTY_ATTS);
 handler.startElement("g style=\"fill:red; 
stroke:#00\"");

Don't use handler.startElement witout specifying a namespace and the
attributes (such as "style") should be specified as last parameter of
the startElement method call.

 handler.element("rect x=\"0\" y=\"0\" width=\"15\"
height=\"15\"", "");
 handler.element("rect x=\"5\" y=\"5\" width=\"15\"
height=\"15\"", "");

Same here. Use startElement with namespace and fix attribute.

 handler.endElement("g");
 handler.endElement("http://www.w3.org/2000/svg";, "svg", 
"svg");

 handler.endElement("svgDynamique");

which yielded :


xmlns="http://www.w3.org/2000/svg";>








Now, the problem is inserting this code in the fo template.  I have 
tried

the following :

 
 
 
 
 ]
 
 

but I get the following message which suggest that the SVG code isn't
present :

org.apache.fop.fo.ValidationException: "fo:instream-foreign-object" is
missing child elements. Required content model: one (1) non-XSL 
namespace

child (No context info available)

I have also tried without success either :

  

 should work.
My second question is : if the SVG is generated through Batik, how 
do you

embed it in the fo file?

You will need to parse the SVG file and insert it into the FO file via
DOM operations or you use the fo:external-graphic element and specify as
source the SVG file.

Best regards,
Matthias


Again, thank you very much!



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Dynamically-insert-SVG-graphics-in-the-XML-passed-to-FOP-tp45237p45239.html

Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org






-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: SVG text not displaying in PDF

2017-06-28 Thread Szeak (Register Man)

Hi,

How do you use this template?
1. Input XML data?
2. Which FOP version do you use?

I tried this with FOP 2.1 from command line and I see a small complex 
but empty table layout in the PDF.

What do you wish to see in PDF?

Szeak


2017-06-27 21:04 keltezéssel, sachinparadkar írta:

Plz help my below code does not render anything in my PDF -


http://www.w3.org/1999/XSL/Transform";
 xmlns:fo="http://www.w3.org/1999/XSL/Format";
 xmlns:svg="http://www.w3.org/2000/svg";>

http://www.w3.org/1999/XSL/Format";
xmlns:html="http://www.w3.org/1999/xhtml";
xmlns:svg="http://www.w3.org/2000/svg"; writing-mode="lr-tb"
hyphenate="false" text-align="start" role="html:html" xml:lang="en">















--















http://www.w3.org/2000/svg";>
http://www.w3.org/2000/svg"; viewBox="0 0 1989 2574"
version="1.1">
































































































































--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/SVG-text-not-displaying-in-PDF-tp43881p45244.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: SVG text not displaying in PDF

2017-06-29 Thread Szeak (Register Man)

Hi Sachin,

I modified one piece of your XSL template to get the result with any XML 
file.

FROM:

TO:


Maybe your XML input does not have a Policy_Summary_Reports named top 
level node. If this node stands lower level, you may need to modify the 
matching ie.:



Best regards, Szeak

2017-06-29 06:23 keltezéssel, sachinparadkar írta:

Hi Szaek,

Am I missing any jar files required to display SVG tags related table in my
PDF ? I updated my fop jar from version 2.0 to 2.1 and still got a empty PDF
without the complex table which rendered for you when you ran my code from
command line !!

Thanks,
Sachin.



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/SVG-text-not-displaying-in-PDF-tp43881p45248.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: SVG text not displaying in PDF

2017-06-30 Thread Szeak (Register Man)

Hi,

How is your running environment? You need graphic environment.
Read Apache Batik instructions in FOP documentation: 
https://xmlgraphics.apache.org/fop/2.1/graphics.html


Szeak

2017-06-29 18:36 keltezéssel, sachinparadkar írta:

Hi Szaek,

I tried changing the template to   and  in both the cases I got a empty PDF . If I
try to write anything in the PDF using  that content gets
displayed in my PDF. So the xsl:template is definately not the issue . I was
able to generate another PDF using  and fo:containers but just
with the svg tags my PDF is getting generated without any content .

Regards,
Sachin.



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/SVG-text-not-displaying-in-PDF-tp43881p45253.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: SVG text not displaying in PDF

2017-07-31 Thread Szeak (Register Man)

Hi,

See the basic usage pattern on FOP site at version you run. ie. for 
v2.1: https://xmlgraphics.apache.org/fop/2.1/embedding.html



2017-07-17 21:20 keltezéssel, sachinparadkar írta:

Hi Szaek,

I run my program currently through the FOP command like this -

fop -xml C:/workspace/WireImaging/src/main/xQuery/WSUMM_Joint_Sample.xml
-xsl
C:/workspace/WireImaging/src/main/xQuery/xml-to-pdf-JointUI_WC_Report.xsl
-pdf C:/workspace/WireImaging/src/main/xQuery/foo.pdf

Is there a way I can run the above from my java program ?since I have to
generate multiple PDF's based on the stylesheet !!

Thanks,
Sachin.



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/SVG-text-not-displaying-in-PDF-tp43881p45329.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Problem with PLC output

2017-08-06 Thread Szeak (Register Man)

Hi,

First of all, you mean PCL, not plc.
Target resolution is more better in 600 as 300.
Check your font settings.
I think FOP have a small bug (or something unlikely functioning) with 
PCL font handling. (based on my experience)
I think the best method is to install all needed fonts to your system 
(if isn't), then in FOP config at renderer section of your PCL config 
("application/x-pcl" NOT "application/vnd.hp-PCL") remove any font 
configuration. For PDF renderer section use auto-detect.


Best regards, Szeak


The pdf output works fine but the plc doesn't.

plc output


pdf ouput


the target-resolution is set to 300 dpi, i think this is more than enough.

any ideas to improve the quality of the plc output?

enviroment
java version 1.6.0_24
fop 2.1
Linux version 2.6.32




--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Problem-with-PLC-output-tp45362.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Problem with PLC output

2017-08-06 Thread Szeak (Register Man)

  
  
ie:
  
  
      ...
   
      
   
  
  
  
    speed
    bitmap
  
  
  By Szeak

Hi,
  
  
  First of all, you mean PCL, not plc.
  
  Target resolution is more better in 600 as 300.
  
  Check your font settings.
  
  I think FOP have a small bug (or something unlikely functioning)
  with PCL font handling. (based on my experience)
  
  I think the best method is to install all needed fonts to your
  system (if isn't), then in FOP config at renderer section of your
  PCL config ("application/x-pcl" NOT "application/vnd.hp-PCL")
  remove any font configuration. For PDF renderer section use
  auto-detect.
  
  
  Best regards, Szeak
  
  
  The pdf output works fine but the plc
doesn't.


plc output




pdf ouput




the target-resolution is set to 300 dpi, i think this is more
than enough.


any ideas to improve the quality of the plc output?


enviroment

java version 1.6.0_24

fop 2.1

Linux version 2.6.32





--

View this message in context:
http://apache-fop.1065347.n5.nabble.com/Problem-with-PLC-output-tp45362.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-

To unsubscribe, e-mail:
fop-users-unsubscr...@xmlgraphics.apache.org

For additional commands, e-mail:
fop-users-h...@xmlgraphics.apache.org


  
  



  


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: struggling with "bulk font configuration"

2017-09-13 Thread Szeak (Register Man)

  
  
Hi,
  
  First of all, you may need to read:
  - "Missing Glyphs" section in
  https://xmlgraphics.apache.org/fop/2.1/fonts.html
  - font-base configuration element in
  https://xmlgraphics.apache.org/fop/2.1/configuration.html
  -
  https://xmlgraphics.apache.org/fop/2.1/fonts.html#font_substitution
  - https://xmlgraphics.apache.org/fop/2.1/fonts.html#selection
  
  I'm not sure, it can FOP configuring for auto font switching by
  characters (glyphs), because of as a Missing Glyphs section also
  wrote:
  "A better way is to use a font that has all the necessary
glyphs. This glyph substitution is only a last resort."
  AND:
  "There are two font selection strategies:
character-by-character or auto. The default is auto.
...
  Character-by-Character is NOT yet supported!"
  
  Best regards, Szeak
  
  2017-09-12 16:44 keltezéssel, Ron Van den Branden írta:

Hi,
  
  
  I'm using FOP 2.1 for a journal whose submissions may occasionally
  contain all kinds of exotic characters, such as Japanese,
  Ethiopian, etc. I've been able to fix missing glyphs by defining
  specific fonts in the FOP configuration file and referring to them
  by means of a list of "font-family" values. Yet, it's hard to know
  exactly what font will cover all glyphs for every language, and
  adding new fonts requires both expanding the FOP configuration
  file and the "font-family" list in the XSL-FO files.
  
  
  Hence, I'm trying to find a more flexible solution, and I'm trying
  out the "bulk font configuration", documented at
  https://xmlgraphics.apache.org/fop/2.2/fonts.html#bulk. I don't
  know if I'm misinterpreting this "bulk font configuration" as a
  means to register a lot of fonts without having to define them
  separately, so they can be used as a pool of fallback fonts for
  glyphs that aren't supported by the standard font?
  
  
  So far, I haven't been able to figure out how those
  "bulk-registered" fonts should be referred to in an XSL-FO file.
  
  
  Suppose I have a "noto" subfolder next to the FOP configuration
  file, with Google's Noto fonts, such as e.g.
  NotoSansCJKjp-Black.otf.
  
  
  In the FOP config file, I have following entry:
  
  
    
  
      
  
    
  
    F:\fop\noto
  
    
  
      
  
    
  
  
  (Btw, the  setting apparently doesn't work with a
  relative path?)
  
  
  Basically, I'm not sure how I can now use the
  NotoSansCJKjp-Black.otf font:
  
      -can I just specify "font-family='NotoSansCJKjp-Black'" in the
  XSL-FO file?
  
      -or should all fonts still be registered separately in the
  config file with a  definition? (In which case, what's
  the point of "bulk registration"?)
  
  
  So far, I've noticed that just bulk-registrering the "noto"
  subfolder, and specifying "font-family='Arial'" (or even variants
  of "font-family='Arial,NotoSansCJKjp-Black'") doesn't make FOP
  fall back to the NotoSansCJKjp-Black.ttf font for Japanese
  characters that aren't available in Arial.
  
  
  Could anyone help me out here?
  
  
  Best,
  
  
  Ron
  
  
  
-
  
  To unsubscribe, e-mail:
  fop-users-unsubscr...@xmlgraphics.apache.org
  
  For additional commands, e-mail:
  fop-users-h...@xmlgraphics.apache.org
  
  



  


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: struggling with "bulk font configuration"

2017-09-13 Thread Szeak (Register Man)

  
  
Hi,
  
  Yes, nice example.
  
  ... and i always prefer referring fonts by it's family name. When
  they are registered as bulk, you may need refer by font-triplet's
  name attribute, but i also prefer to use the real family name in
  font-triplet configuration.
  
  Have a nice day,
  
  Szeak
  
  2017-09-13 14:43 keltezéssel, Ron Van den Branden írta:


  
  Hi Szeak,
  Thanks for the pointers. Let me clarify: I knew how to register
individual fonts in a config file and refer to them in an XSL-FO
file, but it wasn't clear how to refer to bulk-registered fonts.
Some further digging has made me find the answer, so if it can
help others, I'll try to clarify with a concrete example.
  
  Suppose I register an additional font in a configuration file:


  

  

  

  

  When using this configuration file, I can refer to this font in an
  XSL-FO file as follows:

a test character: あ
  

  ...thus making FOP select the Helvetica font for all glyphs it
  supports (the string "a test character: "), and fall back to the
  NotoSansCKjp font for displaying the "あ" character.
  
  So far, so good. Now, suppose that instead of this single font,
  I'd want to register all Noto fonts in that folder in bulk.
  According to the documentation, this can be done with the
   instruction in the configuration file:


  F:\fop\noto

  

  [NOTE: despite correct  and 
  settings,  doesn't seem to work with relative
  paths...]
  
  Perhaps I have overlooked, but from the documentation it wasn't
  clear to me how these fonts should be referred to in an XSL-FO
  file. 
  
  Yet, it appears that the full font name should be used for the
  "font-family" attribute. So, if the XSL-FO snippet above is
  adjusted to:

a test character: あ
  

  ...it works!
  
  Best,
  
  Ron
      
  Op 13/09/2017 om 11:53 schreef Szeak
(Register Man):
  
  

Hi,
  
  First of all, you may need to read:
  - "Missing Glyphs" section in https://xmlgraphics.apache.org/fop/2.1/fonts.html
  - font-base configuration element in https://xmlgraphics.apache.org/fop/2.1/configuration.html
  - https://xmlgraphics.apache.org/fop/2.1/fonts.html#font_substitution
  - https://xmlgraphics.apache.org/fop/2.1/fonts.html#selection
  
  I'm not sure, it can FOP configuring for auto font switching
  by characters (glyphs), because of as a Missing Glyphs section
  also wrote:
  "A better
way is to use a font that has all the necessary glyphs. This
glyph substitution is only a last resort."
  AND:
  "There
are two font selection strategies: character-by-character or
auto. The default is auto.
...
  Character-by-Character
is NOT yet supported!"
  
  Best regards, Szeak
  
  



  


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Error trying to create PDF with accessibility

2017-11-08 Thread Szeak (Register Man)

  
  
Hi Esteban,
  
  It seems like an XML parsing error. Have you checked your FO file
  is well-formed? (Rename extension to XML and Open it in a browser
  ie: firefox or chrome)
  
  By, Szeak
  
  2017-11-08 00:13 keltezéssel, Esteban R írta:


  
  
  
Hello I'm working in a quite complex java (1.8.0_112) project,
  using apache-fop 2.2. Windows 10 OS.


It seems that the  tag is ignored in the
  xconf file so I had to enable it programatically.



After that, I get the following exception when rendering pdf
  with accessibility enabled:


java.lang.NullPointerException
        at
  org.apache.fop.render.pdf.PDFPainter.drawText(PDFPainter.java:422)
        at
org.apache.fop.render.intermediate.IFRenderer$TextUtil.flush(IFRenderer.java:1236)
        at
org.apache.fop.render.intermediate.IFRenderer.renderText(IFRenderer.java:1063)
        at
org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:701)
        at
org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:926)
        at
org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:690)
        at
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:572)
        at
org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
        at
org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:998)
        at
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
        at
org.apache.fop.render.AbstractRenderer.renderRegion(AbstractRenderer.java:344)
        at
org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:308)
        at
org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:737)
        at
org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:263)
        at
org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:244)
        at
org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:587)
        at
  org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:123)
        at
org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:316)
        at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:226)
        at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:145)
        at
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
        at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:130)
        at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
        at
  org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
        at
org.apache.xml.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:263)
        at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1401)
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
        at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
        at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272)
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358)
        at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711)
        at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275)
        at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253)
       ... (my classes)
nov 07, 2017 7:54:38 PM org.apache.fop.fo.FOTreeBuilder
  fatalError
GRAVE: org.xml.sax.SAXParseException; systemId:
  file:///C:/Users/complete_file_name.fo; lineNumber: 160;
  columnNumber: 82; java.lang.NullPointerException


The above-mentioned line 160 is:
      





Maybe I'm missing something? I may try to create a full
  example if needed.


Esteban
  



  


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop

Re: FOP - page 2 not displayed when there is no overflow from page 1

2017-11-30 Thread Szeak (Register Man)

Hi,

An idea for this:
Define 3 kind of page-master for the three pages as:
    1. simple first page
    2. a page with page-before region with size like a page body, and 
with 0 height of the page's body.

    3. simple third page (if different from first)

Use page-master-alternatives to exactly define the 3 kind of 
page-master's order

Use fo:static-content for the second page

Best regards

Szeak

2017-11-29 12:45 ,Andreas Delmelle wrote:

Hi

Kind request/reminder:
Please use fop-users@ for general usage questions. Thanks!

Now that that is out of the way:


On 29 Nov 2017, at 06:59, gauravabburi  wrote:

I am trying to generate a PDF with multiple pages. I have a static page 2
which is to be generated even when there is no overflow from page 1.
However, that is not happening.
In case there is an overflow from page 1, I want it to be displayed in page
3.
Page 1 -> "first"
Page 2 -> "terms"  - static page
Page 3 -> "rest"   -  overflow from Page 1
Code snippet :



Off the top of my head, I would say that the most straightforward way to always force 
that second page would be to set the "force-page-count" attribute on the 
fo:page-sequence. See: https://www.w3.org/TR/xsl/#force-page-count

A value of "even" or "end-on-even" should suffice to make it work, possibly in 
combination with an additional page-master for "blank" last pages if they are not the second.
So, an unavoidable consequence of this approach is that this will generate an 
extra blank page at the end, if the content were to end on an odd page... If 
you can live with that, this should be enough to guarantee that the second page 
will always be included.


Hope this helps!


Greetz


Andreas
-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: FOP - page 2 not displayed when there is no overflow from page 1

2017-11-30 Thread Szeak (Register Man)

Hi,

My previous answer was not good. Second page not generated, when first 
page does not overflow.

So maybe the best solution is the two factor generation.

0. Generate the static content into Intermediate Format (in the 
following: IF) once.

1. Generate the changing content as is into IF.
2. Merge IFs by insert the static content IF to second page position
3. Generate the output from the merged IF.

Bye Szeak


2017-11-30 10:14 ,Szeak (Register Man) wrote:

Hi,

An idea for this:
Define 3 kind of page-master for the three pages as:
    1. simple first page
    2. a page with page-before region with size like a page body, and 
with 0 height of the page's body.

    3. simple third page (if different from first)

Use page-master-alternatives to exactly define the 3 kind of 
page-master's order

Use fo:static-content for the second page

Best regards

Szeak

2017-11-29 12:45 ,Andreas Delmelle wrote:

Hi

Kind request/reminder:
Please use fop-users@ for general usage questions. Thanks!

Now that that is out of the way:


On 29 Nov 2017, at 06:59, gauravabburi  wrote:

I am trying to generate a PDF with multiple pages. I have a static 
page 2

which is to be generated even when there is no overflow from page 1.
However, that is not happening.
In case there is an overflow from page 1, I want it to be displayed 
in page

3.
Page 1 -> "first"
Page 2 -> "terms"  - static page
Page 3 -> "rest"   -  overflow from Page 1
Code snippet :



Off the top of my head, I would say that the most straightforward way 
to always force that second page would be to set the 
"force-page-count" attribute on the fo:page-sequence. See: 
https://www.w3.org/TR/xsl/#force-page-count


A value of "even" or "end-on-even" should suffice to make it work, 
possibly in combination with an additional page-master for "blank" 
last pages if they are not the second.
So, an unavoidable consequence of this approach is that this will 
generate an extra blank page at the end, if the content were to end 
on an odd page... If you can live with that, this should be enough to 
guarantee that the second page will always be included.



Hope this helps!


Greetz


Andreas
-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org






-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Print Renderer

2017-12-15 Thread Szeak (Register Man)

  
  
Hi,
  
  What i use for this is the PipedInputStream and PipedOutputStream.
  
  By Szeak
  
  2017-12-14 09:18 keltezéssel, Normen Ruhrus írta:


  
  
  
  
Hello everyone,
 
for some older printers we use the FOP
  direct printing via the PageableRenderer. Usually we use
  PostScript printing and there we do not stream directly to the
  printer but make the transformation via an
  ByteArrayOutputStream to a byte array.
This is possible because the created
  printouts are quite small so there is no issue with large data
  and additionally it gets us better traceability for problems
  cause we can better differntiate between FOP issues and
  Windows Printer issues.
 
The question is if there is a way to direct
  print to a ByteArrayOutputstream also, or if there is some
  similar way of doing this. Below i have put in our Print
  Postscript Function that wroks the way we want to handle
  direct printing, too.
 
We use FOP2.0 on Tomcat 8.0 on Windows
  Server 2012 R2 with Java 8. 
 
Thanks a lot for any help; it is greatly
  appreciated!
 
Normen
 
 
   
  public void
printPS(String xml,
String xslt,
String printer)
   
 throws
Exception
   
{
   
   try
   
   {
   
 C_Tools.log("Entering
printPS().",LogLevel.DEBUG);
   
 

  //
configure fopFactory as desired
  
    FopFactory fopFactory =
getInstance().getFopFactory();
  
    C_Tools.log("FOP
Factory set.",LogLevel.DEBUG);
  
    
  
ByteArrayOutputStream out =
  new
ByteArrayOutputStream();
  
    C_Tools.log("Buffer
set.",LogLevel.DEBUG);
  
    
  
FOUserAgent userAgent =
  fopFactory.newFOUserAgent();
  
    userAgent.getEventBroadcaster().addEventListener(new
FOPEventListener(versionFOP));
  
    C_Tools.log("User
Agent and EventListener set.",LogLevel.DEBUG);
  
    
  
//
Construct FOP with desired output format
  
    Fop fop =
  fopFactory.newFop(MimeConstants.MIME_POSTSCRIPT,
  userAgent,
  out);   
  
  
C_Tools.log("FOP
Object created.",LogLevel.DEBUG);
  
    
  
TransformerFactory factory =
TransformerFactory.newInstance();
  
    Transformer transformer =
  factory.newTransformer(new
StreamSource(new
StringReader(xslt)));
  
    C_Tools.log("XSLT
(" +
  xslt.length()
+ "
bytes) set up.",LogLevel.DEBUG);
  
    
  
try
  
    {
  
     transformer.setErrorListener(getErrorListener());
  
     C_Tools.log("Transformer
Error Listener set.",LogLevel.DEBUG);
  
    }
  
    catch
(Exception ex)
  
    {
  
     C_Tools.log("C_Render_FOP_2_0.printPS().setErrorListener():" +
  ex.getMessage(),LogLevel.ERROR);
 
  
     StackTraceElement[] stack =
  ex.getStackTrace();
  
    for (int y=0
; y
< stack.length;
  y++)
  
    {
  
    C_Tools.log("C_Render_FOP_2_0.printPS().setErrorListener()." +
  renderer.toString()
+ "["+(y+1)+"/"+stack.length+"]:" +
  stack[y].toString(),
LogLevel.ERROR);
  
    }
  
    }
  
    
  
//
Setup input stream
  
    Source src =
  new
StreamSource(new
StringReader(xml));
  
    C_Tools.log("XML
(" +
  xml.length()
   

Re: Print Renderer

2017-12-15 Thread Szeak (Register Man)

  
  
Hi,
  
  Here is small detail from my source code:
  
      final InputStream inStream = new
PipedInputStream();
    OutputStream outStream = new
PipedOutputStream((PipedInputStream) inStream);

    logger.debug("Nyomtatási feladat megnyitása ...");
    AttributeSet paset = new HashAttributeSet();
    paset.add(new
PrinterName(properties.getProperty(PrintProperties.PRINTER_NAME),
null));
    paset.add(new
JobOriginatingUserName(properties.getProperty(PrintProperties.LPR_USER_NAME),
new Locale("hu", "HU")));
    final PrintService[] services =
PrintServiceLookup.lookupPrintServices(null, paset);

    if (services.length == 0) {
    throw new Exception("Nyomtató nem található: " +
properties.getProperty(PrintProperties.PRINTER_NAME));
    }

    final Thread printJobThread = new Thread(new
Runnable() {
    @Override
    public void run() {
    try {
    PrintService printService = services[0];

    //create a print job
    DocPrintJob job =
printService.createPrintJob();
    //create print job attributes
    PrintRequestAttributeSet pjaset = new
HashPrintRequestAttributeSet(new PrintRequestAttribute[]{
    new JobName(String.format("IPS2-OCR
- %s (%s)", ((JPAContainer)
tableUgyfelek.getContainerDataSource()).getItem(((JPAContainer)
tableUgyfelek.getContainerDataSource()).getIdByIndex(0)).getEntity().getMunkak().getNev(),
properties.getProperty(PrintProperties.LPR_USER_NAME)), new
Locale("hu", "HU"))
    });
    //define the format of print document
    DocFlavor flavor =
DocFlavor.INPUT_STREAM.AUTOSENSE;
//properties.getProperty(PrintProperties.PRINT_MIME).equals(MimeConstants.MIME_POSTSCRIPT)
? DocFlavor.INPUT_STREAM.POSTSCRIPT :
DocFlavor.INPUT_STREAM.PCL;
    //print the data
    Doc doc = new SimpleDoc(inStream,
flavor, null);

    logger.debug("Start print job ...");
    job.print(doc, pjaset);
    logger.debug("End of print job");
    } catch (PrintException ex) {
    logger.fatal(ex, ex);
    }
    }
    });
    printJobThread.start();

    logger.debug("Create Renderer");
    renderer = new Renderer(jobId, properties,
servlet.getEmf(), outStream);
  
  Important: the inőut stream writer and aoutputstream reader need
  to be in separate thread.
  
  By, Szeak
  
  2017-12-14 09:18 keltezéssel, Normen Ruhrus írta:


  
  
  
  
Hello everyone,
 
for some older printers we use the FOP
  direct printing via the PageableRenderer. Usually we use
  PostScript printing and there we do not stream directly to the
  printer but make the transformation via an
  ByteArrayOutputStream to a byte array.
This is possible because the created
  printouts are quite small so there is no issue with large data
  and additionally it gets us better traceability for problems
  cause we can better differntiate between FOP issues and
  Windows Printer issues.
 
The question is if there is a way to direct
  print to a ByteArrayOutputstream also, or if there is some
  similar way of doing this. Below i have put in our Print
  Postscript Function that wroks the way we want to handle
  direct printing, too.
 
We use FOP2.0 on Tomcat 8.0 on Windows
  Server 2012 R2 with Java 8. 
 
Thanks a lot for any help; it is greatly
  appreciated!
 
Normen
 
 
   
  public void
printPS(String xml,
String xslt,
String printer)
   
 throws
Exception
   
{
   
   try
   
   {
   
 C_Tools.log("Entering
printPS().",LogLevel.DEBUG);
   
 

  //
configure fopFactory as desired
  
    FopFactory fopFactory 

Re: FOP 1.1 to 2.2 Migration - SEVERE Error with External Graphics

2018-03-14 Thread Szeak (Register Man)

  
  
Hi,
  
  FOP from version 2 using standard URI format for pathes.
  So you need to set the pathes in this format also in your FOP
  config and in FO.
  Ie.: /C/Temp/tomcat.gif or ///C/Temp/tomcat.gif
  
  Best regards, Szeak
  
  2018-03-14 03:12 keltezéssel, Graeme Wellington írta:


  
  
  
  
  
Hi
 
I have just migrated to FOP 2.2 - I am
  using apache-tomcat-8.5.29 / Java 1.8
 
I am using a FOP servlet to render PDF form
  XML data source.
 
I have a basic example that works on FOP
  1.1 but not FOP 2.2
 
http://localhost:8080/fop/fopZ?fo=C:/temp/readme.fo
 
The readme.fo comes with the FOP
  distribution.
 
Without change the servlet works ok and I
  get a PDF.
 
When I try and add 1 line to include an
  image I get SEVERE error as below.
 
I have tried various permutations if the
  following lines separately but no luck :
 

OR
      
    OR
      
    …
 
I have loaded the tomcat.gif at the various
  locations to match.
 
However I do not think it is getting that
  far.
 
I have a customised configuration file and
  have set the base as follows:
 
./ 
 
 
Can anyone help?
 
 
Mar 14, 2018 12:06:34 PM
  org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet
  [FopZ] in context with path [/fop] threw exception
  [javax.xml.transform.TransformerException:
  java.lang.NullPointerException] with root cause
java.lang.NullPointerException
    at
  java.io.FilterInputStream.markSupported(FilterInputStream.java:243)
    at
org.apache.xmlgraphics.image.loader.util.ImageUtil.decorateMarkSupported(ImageUtil.java:213)
    at
org.apache.xmlgraphics.image.loader.util.ImageUtil.autoDecorateInputStream(ImageUtil.java:228)
    at
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.createImageSource(AbstractImageSessionContext.java:373)
    at
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.access$100(AbstractImageSessionContext.java:53)
    at
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext$UnrestrictedFallbackResolver.createSource(AbstractImageSessionContext.java:364)
    at
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.newSource(AbstractImageSessionContext.java:94)
    at
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.needSource(AbstractImageSessionContext.java:191)
    at
org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:123)
    at
org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:123)
    at
  org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:81)
    at
  org.apache.fop.fo.FObj.processNode(FObj.java:126)
    at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:291)
    at
  org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
    at
com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:208)
    at
com.sun.org.apache.xml.internal.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:281)
    at
com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:247)
    at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
    at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183)
    at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:351)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
    at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScann