Re: Producing PDF from subset of IF file pages

2011-09-16 Thread jeanyo

Just FYI, I created an issue for the NullPointerException:
https://issues.apache.org/bugzilla/show_bug.cgi?id=51836

-- 
View this message in context: 
http://old.nabble.com/Producing-PDF-from-subset-of-IF-file-%3Cpage%3Es-tp32463958p32479591.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



Re: Producing PDF from subset of IF file pages

2011-09-15 Thread jeanyo


Jeremias Maerki-2 wrote:
 
 Hmm, a NullPointerException is not a very nice way to handle this. Would
 you mind creating a Bugzilla issue for this maybe?
 https://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop
 

Sure, I will create a Bugzilla issue.  


Jeremias Maerki-2 wrote:
 
 Anyway, if all you need are hard copies, you can probably just filter
 all nav:* elements
 (http://xmlgraphics.apache.org/fop/intermediate/document-navigation)
 and it should work.
 

Filtering the nav:* elements did the trick.  Many thanks!!
-- 
View this message in context: 
http://old.nabble.com/Producing-PDF-from-subset-of-IF-file-%3Cpage%3Es-tp32463958p32474441.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



Producing PDF from subset of IF file pages

2011-09-14 Thread jeanyo

Hi,

I'm new to FOP.  I could not find any discussion related to my question.

My goal is to produce a PDF that contains only a subset of pages from a FOP
intermediate (IF) file.  I thought I could manipulate the IF file, deleting
some of the page-sequence and page elements, but this does not work.  I
suspect that it fails because the IF file contains X-Y coordinates.  

Is there an obvious way to create a PDF using only a subset of pages from
an IF file?  Is there a simple option to print only certain pages?

My colleague suggested that there is a way to read the IF file into a set of
FOP objects.  He suggested that I may be able to selectively append these
objects to generate the PDF.  Does anyone know the mechanism (i.e., classes)
to accomplish this?  

Oh, and in my case, starting off with less content (i.e., in the XSL-FO) is
not an option.  I have a very specific need to eliminate just certain pages
and I have no way of determining which pages to remove/exclude until the IF
file is generated.

Thanks!!
-Melanie

Operating System: Windows XP
FOP Version: 1.0
JDK: 1.5

-- 
View this message in context: 
http://old.nabble.com/Producing-PDF-from-subset-of-IF-file-%3Cpage%3Es-tp32463958p32463958.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



Re: Producing PDF from subset of IF file pages

2011-09-14 Thread jeanyo

Thanks for your help!

I have attached two files:
- premod.if.xml: This is the untouched IF file.
- postmod.if.xml: This is premod.if.xml, but with many of the page
elements and some page-sequence elements removed.  You will notice extra
white space where elements were deleted.  


The specific error I get when trying to generate the PDF is:
Caused by: java.lang.NullPointerException 
at
org.apache.fop.render.pdf.PDFDocumentNavigationHandler.updateTargetLocation(PDFDocumentNavigationHandler.java:188)
at
org.apache.fop.render.pdf.PDFDocumentNavigationHandler.getAction(PDFDocumentNavigationHandler.java:160)
at
org.apache.fop.render.pdf.PDFDocumentNavigationHandler.renderLink(PDFDocumentNavigationHandler.java:108)
at
org.apache.fop.render.intermediate.extensions.DocumentNavigationHandler.endElement(DocumentNavigationHandler.java:186)
[rest of stack omitted] 

I believe the NullPointerException occurs on this line in
PDFDocumentNavigationHandler.java:
action.getTargetLocation().x / 1000.0,

Does target location imply a link target location?  If so, you were
correct in predicting this as an issue.  I'm not sure this version of the
publication must support linking, but I will verify.  The real purpose is to
provide a hard copy of the PDF.

Thanks again.
-- 
View this message in context: 
http://old.nabble.com/Producing-PDF-from-subset-of-IF-file-%3Cpage%3Es-tp32463958p32464585.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



Re: Producing PDF from subset of IF file pages

2011-09-14 Thread jeanyo

Actually, here are the file attachments...


jeanyo wrote:
 
 I have attached two files:
 -  http://old.nabble.com/file/p32464608/premod.if.xml premod.if.xml  :
 This is the untouched IF file.
 -  http://old.nabble.com/file/p32464608/postmod.if.xml postmod.if.xml  :
 This is premod.if.xml, but with many of the page elements and some
 page-sequence elements removed.  You will notice extra white space where
 elements were deleted.  
 

-- 
View this message in context: 
http://old.nabble.com/Producing-PDF-from-subset-of-IF-file-%3Cpage%3Es-tp32463958p32464608.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



RE: Producing PDF from subset of IF file pages

2011-09-14 Thread jeanyo

Sorry, I believe these links should work:

http://old.nabble.com/file/p32464608/premod.if.xml 
http://old.nabble.com/file/p32464608/postmod.if.xml 


Eric Douglas wrote:
 
 Actually, did you upload them somewhere to link?
 I believe this distribution list does not allow attachments.
 

-- 
View this message in context: 
http://old.nabble.com/Producing-PDF-from-subset-of-IF-file-%3Cpage%3Es-tp32463958p32464720.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