HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML Forums › Technical questions / Troubleshooting › Page number not full when converting HTML to PDF
- This topic has 7 replies, 6 voices, and was last updated Nov 10, 2022
11:29:02 by aelmaknati.
-
AuthorPosts
-
July 7, 2021 at 07:46#34417
Hello,
I am using v4.0.9fx5 to convert HTML documents to PDF.
Documents have footer with page number using “$[page]”. Unfortunately page number upper than 9 are not full. Only the first digit is print -eg “1” instead of “10”, “11” or “101”.
I tried to use “$[page]/$[total]” but I still have a strange print. Anyway I would like to use “$[page]” on my final print.
Any help is welcome.
Thanks.
Note 1: I am upgrading from v4.0.8 and it worked well using this version.
Note 2: The attachment is a example of my trouble. I try without css and with. First line is “$[page]” and second is “$[page]/$[total]”Attachments:
You must be logged in to view attached files.September 16, 2021 at 11:54#34495Having the same issue with pd4ml 4.0.9fx5. Any update on it?
December 1, 2021 at 12:28#34572Having the same issue with pd4ml 4.1.0. Any update on it please ?
December 1, 2021 at 12:35#34573Hi! The issue has been fixed on 2021-10-28 in v4.0.10. Also the most recent v4.1.0 snapshot has to include the bugfix.
Please give it a try.December 6, 2021 at 08:56#34575Hi,
I’m converting from html to pdf using Java (Using pd4ml 4.0.10 in maven):
For eg:
public static void convert(String inputFile, File output) throws InvokeException, IOException { PD4ML pd4ml = new PD4ML(); PageSize pageSize = new PageSize(600, 842); pd4ml.setPageSize(pageSize); PageMargins pageMargins = new PageMargins(70, 36, 56, 36); pd4ml.setPageMargins(pageMargins); File file = new File(inputFile); FileInputStream is = new FileInputStream(file); pd4ml.readHTML(is, null, StandardCharsets.UTF_8.name()); FileOutputStream outputStream = new FileOutputStream(output); pd4ml.writePDF(outputStream, "pdf"); }
Html for the footer:
<pd4ml:page.footer scope="1"> <section class="export-page-footer"> <tr > <td class="right"> <span class="pagenum">pag. $[page]</span> </td> </tr> </section> </pd4ml:page.footer>
Still shows me as:
pag. 1 for all pages from 10-19, after pag.9
and pag. 2 for all pages from 20-29, etc..Any help would be appreciated.
April 25, 2022 at 10:45#34677Hi,
This issue is not yet fixed in 4.0.10 and still persists in 4.0.13. Is there any plan to fix?
Thanks,
SanghamitraJune 8, 2022 at 11:43#34779Created HELPD-385 ticket
November 10, 2022 at 11:29#35640Hi, I generated a pdf file with headers and footers but when rotating a page, the headers and footers are also rotated. How to avoid header and footer rotation when switching from landscape to portrait orientation ?
PD4ML version : 4.0.9fx5 (also tried with 4.1.0-SNAPSHOT)
Thank you for your help
Attachments:
You must be logged in to view attached files. -
AuthorPosts
You must be logged in to reply to this topic.