flying-saucer

Want to generate landscape pdf using Flying Saucer

心已入冬 提交于 2021-02-08 08:41:31
问题 I am having below given html with me, when I am converting this to PDF using flying saucer, It is not fitting A4 Portrait size. How to generate landscape pdf file. <html> <head> <title> Selenium Test SC </title> </head> <body style='font-family:Tahoma;font-size:9pt;letter-spacing:0.5px'> <table border='1' style='color:black;font-size:12px;'> <tr> <td> <a href="file:///C:/Users/611066167/Documents/Sel%20Test%20Result/Screenshots/Screen1.png" target="_blank"> NGSD:TMD (Search) <img src="file://

Flying Saucer not reading stylesheet

不打扰是莪最后的温柔 提交于 2021-02-07 08:24:19
问题 I am using flyingsaucer together with iText in an asp.net application(using IKVM) to convert HTML into PDF's. If I put a style directly in the html it works fine (even styles put between style tags) but when I link a style sheet it fails to notice it and produces the pdf without the styles. Any reason why this is happening? This is the code that I am using Dim renderer As New ITextRenderer Dim buf As New StringBuffer buf.append(HTML) Dim builder As DocumentBuilder = DocumentBuilderFactory

Flying Saucer not reading stylesheet

泄露秘密 提交于 2021-02-07 08:21:44
问题 I am using flyingsaucer together with iText in an asp.net application(using IKVM) to convert HTML into PDF's. If I put a style directly in the html it works fine (even styles put between style tags) but when I link a style sheet it fails to notice it and produces the pdf without the styles. Any reason why this is happening? This is the code that I am using Dim renderer As New ITextRenderer Dim buf As New StringBuffer buf.append(HTML) Dim builder As DocumentBuilder = DocumentBuilderFactory

Flying Saucer not reading stylesheet

微笑、不失礼 提交于 2021-02-07 08:21:21
问题 I am using flyingsaucer together with iText in an asp.net application(using IKVM) to convert HTML into PDF's. If I put a style directly in the html it works fine (even styles put between style tags) but when I link a style sheet it fails to notice it and produces the pdf without the styles. Any reason why this is happening? This is the code that I am using Dim renderer As New ITextRenderer Dim buf As New StringBuffer buf.append(HTML) Dim builder As DocumentBuilder = DocumentBuilderFactory

How to embed font in PDF created from HTML with iText and Flying Saucer?

谁说胖子不能爱 提交于 2020-07-17 09:52:26
问题 I have problem with embedding Polish fonts into PDF converted from HTML. My HTML code have style in body: <BODY style="font-family: Tahoma, Arial, sans-serif;font-size : 8pt;"> I tried 2 ways of converting such HTML into PDF: FOP with htmlcleaner iText with flying-saucer For FOP I can add all used fonts into its config file and then created PDF have those fonts embedded (if font is used in HTML). In resulting PDF I have Tahoma font in Identity-H encoding. It looks good -- all Polish letters

How to embed font in PDF created from HTML with iText and Flying Saucer?

烈酒焚心 提交于 2020-07-17 09:52:23
问题 I have problem with embedding Polish fonts into PDF converted from HTML. My HTML code have style in body: <BODY style="font-family: Tahoma, Arial, sans-serif;font-size : 8pt;"> I tried 2 ways of converting such HTML into PDF: FOP with htmlcleaner iText with flying-saucer For FOP I can add all used fonts into its config file and then created PDF have those fonts embedded (if font is used in HTML). In resulting PDF I have Tahoma font in Identity-H encoding. It looks good -- all Polish letters

css pdf page - header overlapping with content

百般思念 提交于 2020-06-27 15:32:30
问题 As we can see from the image my content overlaps with the header image and this is the code I have: <style type="text/css" media="print"> @page { /*size:landscape;*/ @top-center { content: element(header); } @bottom-left { content: element(footer); } } div.header { padding: 10px; position: running(header); } div.footer { display: block; padding: 5px; position: running(footer); } .pagenumber:before { content: counter(page); } .pagecount:before { content: counter(pages); } </style> </head> <div

css pdf page - header overlapping with content

 ̄綄美尐妖づ 提交于 2020-06-27 15:32:12
问题 As we can see from the image my content overlaps with the header image and this is the code I have: <style type="text/css" media="print"> @page { /*size:landscape;*/ @top-center { content: element(header); } @bottom-left { content: element(footer); } } div.header { padding: 10px; position: running(header); } div.footer { display: block; padding: 5px; position: running(footer); } .pagenumber:before { content: counter(page); } .pagecount:before { content: counter(pages); } </style> </head> <div

css pdf page - header overlapping with content

♀尐吖头ヾ 提交于 2020-06-27 15:32:08
问题 As we can see from the image my content overlaps with the header image and this is the code I have: <style type="text/css" media="print"> @page { /*size:landscape;*/ @top-center { content: element(header); } @bottom-left { content: element(footer); } } div.header { padding: 10px; position: running(header); } div.footer { display: block; padding: 5px; position: running(footer); } .pagenumber:before { content: counter(page); } .pagecount:before { content: counter(pages); } </style> </head> <div

Relative paths in Flying Saucer XHTML?

こ雲淡風輕ζ 提交于 2020-01-31 08:46:48
问题 I am using Flying Saucer to render some PDF documents from strings to XHTML. My code is something like: iTextRenderer.setDocument(documentGenerator.generate(xhtmlDocumentAsString)); iTextRenderer.layout(); iTextRenderer.createPDF(outputStream); What I'm trying to understand is, when using this method, where are relative paths in the XHTML resolved from? For example, for images or stylesheets. I am able to use this method to successfully generate a text-based document, but I need to understand