Forum Replies Created
-
AuthorPosts
-
in reply to: page.break ifSpaceBelowLessThan not working May 6, 2010 at 18:32#28009
Which PD4ML version do you use? You may see that in document properties of a generated PDF file.
in reply to: page.break ifSpaceBelowLessThan not working May 6, 2010 at 18:45#28010I downloaded the current pd4ml pro version (‘pd4ml.pro.trial.360’). When I look at the pdf document properties it says it’s version 1.4. I’m not sure if thats my finder version or the pd4ml version.
PS: If I can get this working my boss will buy the real deal.
in reply to: page.break ifSpaceBelowLessThan not working May 6, 2010 at 19:19#28011Hmm… With v360 it should work.
> Well the actual problem is that I’m am using this on a dynamic jsp form.
> I will not know how long or short the form will be. So I wanted to basically
> say to page brake when there is only 100 px left on the current pdf page.That means the form is followed by a content portion, which you would not like to “pagebreak”. I would still recommend to use CSS approach and to enclose such sensitive content parts into
<div style="page-break-inside: avoid">and</div>.If for some reason it is not acceptable, please add enable=”false” attribute to
<pd4ml:transform>tag – it should return your JSP output as HTML – and send the HTML to support pd4ml com or attach to a post in the topic.in reply to: PD4ML attempts to download ‘background-image: none/inherit’ May 7, 2010 at 10:17#28003Was the problem known already?
Anyhow – that’s good news, thank you. Any idea of the estimated release date?
in reply to: PD4ML attempts to download ‘background-image: none/inherit’ May 7, 2010 at 16:01#28004on Monday, May 10
in reply to: General questions / FAQ May 10, 2010 at 03:01#26386I would like to force a file download rather than displaying the pdf file using the jsp tag lib. Is this possible? I know it is accomplished using the following http header:
Content-disposition: attachment; filename=name.ext
where name.ext is the name of the pdf file. I see how to write out the pdf file to disk using pd4ml:savefile, but don’t see how to set the response header.
Is there an easy way to do this that I am missing?
in reply to: how to force pdf download using jsp tag lib? May 10, 2010 at 13:32#28013If you use PD4ML taglib, you can force “Content-disposition: attachment” header output by inline=”false” attribute of
<pd4ml:transform>tag. With name attribute you may define a default name.in reply to: how to force pdf download using jsp tag lib? May 10, 2010 at 21:53#28014Thanks – this works fine except that I can’t control the file name. “name” is not attribute for pd4ml:transform. Do I need to use pd4ml:savefile? I am also having trouble using dynamic content within attributes.
in reply to: how to force pdf download using jsp tag lib? May 11, 2010 at 13:24#28015My mistake. The correct attribute name is fileName
in reply to: Using CustomFileResourceProvider May 11, 2010 at 14:08#27912It is a copy-paste issue in the sample code.
The line
bis = new BufferedInputStream(is);
may be deleted.Your modifications seems to be ok
in reply to: Is it possible to set header/footer scope via the API? May 11, 2010 at 19:50#27837I have a dynamic first page footer, it may sometimes occupy more than half of the first page.
Looks like program computing footer height based on first page footer for all pages.Is there any way that I can force to compute footer height based on individual page footer content and adjust page content accordingly?
in reply to: General questions / FAQ May 12, 2010 at 11:30#26339I have an index.html (as file) which has links to other html pages in a folder. I want to generate a PDF and it should contain all linked html pages.
Just like when using Acrobat > Create PDF > From Web page > Get entire site.
I don’t want to generate all html pages separately and then merge them with itext.
Thanks in advance!
in reply to: General questions / FAQ May 12, 2010 at 16:47#26388Hi,
We are having problems generating our pdf in only one of our environments. This environment is getting the CSS data from an HTTPS url (we’ve solved that) and adding it to the HTML inline and then rendering the pdf. This is all executed from within a secure environment. We have debug enabled and when the render method executes, we only see the message:
version: PD4ML 360 Pro
we do not see:
new parse attempt with: UTF8
done in 1578ms.as we do when it works. I noticed that you have this StatusMessage capability, but there is not any documentation as to how to use it, other than an example:
PD4ML.StatusMessage[] msgs =
(PD4ML.StatusMessage[]) pd4ml.getLastRenderInfo(PD4Constants.PD4ML_PDFA_STATUS);for ( int i = 0; i < msgs.length; i++ ) { System.out.println( (msgs.isError() ? “ERROR: ” : “WARNING: “) + msgs.getMessage());
}which I add to my code, but gives me a compile error can’t find PD4ML.StatusMessage. Please advise. I’m using version 3.60.
Upon further testing, it seems that the render method blows up without an exception (don’t know how that can happen) because we have debug messages displayed immediately after the render method is called and we do not see those in the server log.
So, we really need a way to tell what went wrong from within the render method. Is there a way we can enhance the pd4ml debug info?
Thanks,
Tim
in reply to: How to use PD4ML.StatusMessage May 12, 2010 at 19:47#28019For the time being StatusMessage is only useful to check if generated document matches PDF/A requirements.
First I would recommend to upgrade to currently available v360fx1. If the problem still there, please dump HTML document before it passed to PD4ML and send to support pd4ml com.
in reply to: HTML/CSS rendering issues May 13, 2010 at 06:46#26389PD4ML pd4ml = new PD4ML(); ... PD4PageMark mark = new PD4PageMark(); mark.setAreaHeight(-1); mark.setHtmlTemplate("<table width='100%'><tr><td style='background-image:url(https://localhost:9080/Web1/images/base/print_logo.gif);background-repeat: repeat-x;'> </td></tr></table>"); pd4ml.setPageFooter(mark);If i change setPageFooter to setPageHeader, the print_logo.gif was dispaly in the page(s) header correctly.
If i change html template to
<table width='100%'><tr><td>aaa</td></tr></table>
and setPageFooter, “aaa” was display in the page(s) footer correctly.If i set background image to page footer with table, there’s “Nothing” in the pdf page(s) footer but I can see debug info. display below :
image not yet in cache http://localhost:9080/Web1/images/base/print_logo.gif not yet in cache: http://localhost:9080/Web1/images/base/print_logo.gif image size: 1523
WinXP SP3 / WAS 6.1 / PD4ML 360fx1 -
AuthorPosts
