Forum Replies Created
-
AuthorPosts
-
in reply to: Urgent -Bad pdf layout – it span only 1/4 of normal width December 21, 2011 at 18:45#28748
It looks like htmlWidth conversion parameter value (frame width of virtual web browser) is set too big.
Also there is some garbage characters: it is caused by an invalid or missing charset directive in the source document.
The document HTML source and resulting PDF would help to analyze the issue. Please publish or send to support pd4ml com
in reply to: Merge failing December 20, 2011 at 21:48#28742Currently (v380) PDF parser of PD4ML has a number of limitations: it cannot parse linearized PDFs and edited PDFs (which have multiple xref tables).
It would be helpful if you publish the original PDF document you tried to merge to. We’ll check if the problem is known and if there is a workaround.
in reply to: Long word / link doesn’t break up into second line December 19, 2011 at 17:42#28738CSS style “word-wrap: break-word” should help.
if your document is read-only, you may apply it via PD4ML API:pd4ml.addStyle("BODY, DIV, TD { word-wrap: break-word }", true);in reply to: BMP in BASE64 encoding December 19, 2011 at 14:47#28731Yes, the images you provided are still not compatible with PD4ML.
I did the simple test again: opened your HTML in MS IE and saved the BMP as signature2.bmp and included it to example.html
Obviously MS IE again repaired format errors of your BMP. See attached.
I also compared signature.bmp and signature2.bmp. As I see 2 values “40” and “13” are swapped:
in reply to: BMP in BASE64 encoding December 14, 2011 at 17:13#28728I’ve just sent the version to your email box.
in reply to: UTF-8 Characters December 14, 2011 at 13:56#28739In order to display non-Latin characters you have to utilize TTF Embedding feature of PD4ML Pro: pd4ml-html-css-pdf-tips-tricks-f7/ttf-embedding-t42.html
A quick solution for you could be to download a basic font set from
https://pd4ml.com/i/easyfonts/fonts.jar
put the JAR to WEB-INF/lib and add to your JSP (nested to ).in reply to: Problem with ampersand December 6, 2011 at 20:58#28720Just tested with the development build 3.80 – the issue has been already solved. However the version still did not pass all QA tests. It should not take longer than one week.
in reply to: Auto XSL transform before render December 6, 2011 at 16:22#28723For web scenarios PD4ML JSP taglib offers a tag to pre-process such type of paths, however it makes nothing special: it looks for a given pattern (for example, “”/userdata/includes”) and substitutes it with a desired string (“”userdata/includes”) . It works with the source HTML document as with a single string, ignoring the document structure – you could always implement your own similar solution.
But I would recommend you to create a simple custom resource loader:
post43.html
and to interpret the “non-standard” paths the way you like.in reply to: Auto XSL transform before render December 6, 2011 at 16:02#28721> “/userdata/includes/arialScreenReg.css”
Is in the path /userdata is a web application name or just a legacy path, which currently makes no special sense?in reply to: getting NullPointerException when "Content-Type" is set December 6, 2011 at 13:42#28733Thank you for the report!
We’ve just fixed the issue in the development build. The fix will be available with the next beta release.
in reply to: BMP in BASE64 encoding December 2, 2011 at 20:00#28726Well, with your sample image we identified and fixed a bug in our code, related to 1-bit bitmap images.
However when I tried your original HTML sample with base64-encoded images, the BMP still failed to appear in the resulting PDF. Which is quite strange.
I have dumped base64-decoded image (“bad image”) and the second image you provided (“good image”). There is a difference in the file headers (the rests of the images are identical). See the attachment.
It is difficult to say if the “bad image” has been corrupted during base64 encoding or it is a species of BMP format, known only to Microsoft.
The impacted bytes are quite important:
Good image:
File type is :BM
Size of file is :4990
Size of bitmapinfoheader is :40
Width is :342
Height is :112
Planes is :1
BitCount is :1
Compression is :0
SizeImage is :4928
X-Pixels per meter is :0
Y-Pixels per meter is :0
Colors used are :2
Colors important are :2Bad image:
File type is :BM
Size of file is :4990
Size of bitmapinfoheader is :40
Width is :342
Height is :112
Planes is :1
BitCount is :1
Compression is :0
SizeImage is :0
X-Pixels per meter is :2834
Y-Pixels per meter is :2834
Colors used are :2
Colors important are :0It looks like MS IE repairs the “bad image” on-a-fly and displays it correctly. If you save the image from MS IE you’ll get an image byte-to-byte identical to the “good image”.
We would implement a workaround for such corrupted images, but it is not obvious how to obtain the missing “size of the raw bitmap data” value.
in reply to: BMP in BASE64 encoding November 30, 2011 at 21:58#28724Does the BMP have transparency mask?
Could you please publish the image in its original form (as BMP file)?
Thank you!in reply to: initialPageNumber November 28, 2011 at 13:55#28397In theory the following command-line parameter should produce PDFs pop the print dialog automatically up:
-param pd4ml.print.dialog.popup true
Please give a try.I am not sure if I understood your second question correctly, as “PDF tag” can mean different things.
So you would like to autoprint some sections of generated PDF documents? I do not know what you are going to use on the sever side as a print application, but if it should be “standard” Acroread, I would to take a look to the attached document. Acroread command-line parameters allow to jump to a particular section of a PDF document (marked as a named destination).
By the link you may find Acroread command line options for silent printing:
html-pdf-faq-f1/automatically-open-print-dialog-t158.htmlProbably by combining the named destination jump and the silent print command you’ll achieve the needed functionality.
in reply to: Progress Monitor/Feedback mechanism during PDF generation November 16, 2011 at 14:44#28684Sorry, we still not updated the documentation.
The code below implements a simple dump of progress messages. Just combine the approach with your progress meter component state update.
The current implementation probably still needs some balance refining between HTML parding, layouting and PDF output phases. However on our test scenarios the progress indication looks more-less smooth.
pd4ml.monitorProgress(new ProgressMeter()); ... public class ProgressMeter implements PD4ProgressListener { public void progressUpdate(int messageID, int progress, String note, long msec) { String tick = String.format( "%7d", msec ); String progressString = String.format( "%3d", progress ); String step = ""; switch ( messageID ) { case CONVERSION_BEGIN: step = "conversion begin"; break; case HTML_PARSED: step = "html parsed"; break; case DOC_TREE_BUILT: step = "document tree structure built"; break; case HTML_LAYOUT_IN_PROGRESS: step = "layouting..."; break; case HTML_LAYOUT_DONE: step = "layout done"; break; case TOC_GENERATED: step = "TOC generated"; break; case DOC_OUTPUT_IN_PROGRESS: step = "generating PDF..."; break; case NEW_SRC_DOC_BEGIN: step = "proceed to new source document"; break; case CONVERSION_END: step = "done."; break; } System.out.println( tick + " " + progressString + " " + step + " " + note ); } }in reply to: Trouble with server encoding (ISO-8859-15) November 16, 2011 at 12:53#28717That is a clear sign, that the source HTML has a
<meta>directive with ISO-8859-1. Try to change it to ISO-8859-15 and make sure you also utilize TTF embedding feature of PD4ML. -
AuthorPosts
