Questions tagged [princexml]

Prince is software for converting XML and HTML documents to PDF files.

Prince (formerly PrinceXML) is software for converting XML and HTML documents into PDF files.

The Prince library is developed by YesLogic Pty. Ltd. Versions for Windows, Mac OS X and Linux are available.

This is a commercial product. A free version is available, but PDF files generated from this free version have a watermark.

74 questions
1
vote
2 answers

Help with Ruby & PrinceXML

I'm trying to write a very simple markdown-like converter in ruby, then pass the output to PrinceXML (which is awesome). Prince basically converts html to pdf. Here's my code: #!/usr/bin/ruby # USAGE: command source-file.txt target-file.pdf # read…
user721543
1
vote
0 answers

Need to display page numbers in Table of contents

I am just printing the HTML page, I need to show the page numbers opposite to the titles in Table of contents. I investigated a lot, but couldn't find a proper solution. While investigating I found target-counter but it is not working for me. Seems…
1
vote
1 answer

Hyphenation of Prince XML for external languages not working in DocRaptor API

I have installed prince xml in local environment in linux. The hyphenation property works in local environment for tamil language, when i add the below css code in the file hyph.css in prince source folder of style. :lang(ta) { hyphens:auto; …
Sakthikanth
  • 139
  • 7
1
vote
1 answer

reference base64 data in multiple content properties

Instead of having the same base64 data multiple times, is there a way to define it once and reference it in multiple content properties? div#my_id1 { content: url(data:image/png;base64,...); } div#my_id2 { content:…
Dill
  • 1,943
  • 4
  • 20
  • 28
1
vote
2 answers

Selecting the last element on page (paged media)

I want to select the last element on a printed page. For example, given this HTML (assuming the printed page has a height of 100px):
Some content
Some…
DJL
  • 2,060
  • 3
  • 20
  • 39
1
vote
1 answer

PrinceXML: "Input is not proper UTF-8"

I'm generating HTML from a database and then sending it to PrinceXML for conversion to PDF. The code I use to do this is: string _htmlTemplate = @"
immutabl
  • 6,857
  • 13
  • 45
  • 76
1
vote
1 answer

How to automatically split table with princeXML

I have an HTML file that content an html table with many columuns (30) that I want to convert in PDF using the Software PrinceXML. Problem is my the table is too large and the end of the table and is out of the margin. I have tried to use the…
MboSeye
  • 31
  • 3
1
vote
1 answer

Overlay comprised of tiled image with Prince

I have a document that I'm converting to PDF using Prince. I want to have an overlay that will display a repeating text in demo envrionments so that generated documents can be marked. Normally, I would apply such a watermark with an element…
Moss
  • 855
  • 1
  • 9
  • 23
1
vote
1 answer

How to get docraptor to pdf using the print stylesheet in Rails?

So I have some Rails 3.2.x code that takes an HTML view page and outputs it to PDF using the docraptor print service. The only issue is that it doesn't shrink the contents to fit on the PDF page, so there's overrun. I initially tried to do a…
Nona
  • 5,302
  • 7
  • 41
  • 79
1
vote
2 answers

Prince PDF footer not displaying

I'm generating a PDF using Prince. I'm using the below stylesheet (part of a much larger css file) to include a footer on each page containing page numbers, but the footer doesn't appear. So the question is, what am I doing wrong? @page { size:…
Bob Black
  • 2,375
  • 2
  • 18
  • 26
1
vote
5 answers

Is Prince the best way to create PDFs in Ruby on Rails?

After several Google searches, it appears that the way to create PDFs in Rails from HTML and CSS (versus a new markup language) is to use Prince. With licensing at $3800 for my non-big-commercial app, I'm wondering if this is, in fact, consensus or…
Satchel
  • 16,414
  • 23
  • 106
  • 192
1
vote
1 answer

Set string variable content in princexml

I'm using PrinceXML and Django Templates to generate a PDF. I'm able to set the content of a url but unable to set a string for the bottom left @media print{ @page { @bottom-right { /* works */ content: url({{ user.logo }}) } …
user2954587
  • 4,661
  • 6
  • 43
  • 101
1
vote
2 answers

Cannot get page breaks to work using css and prince

I cannot get page breaks into my pdf using css and prince. The second table touches the first one. What am I doing wrong? I think I may have misunderstood how to use instructions for print in css, from my perspective it looks like I'm doing exactly…
MMill
  • 25
  • 5
1
vote
2 answers

how to force long URL/text to wrap in table cell when generating PDF in rails?

I am using princely(https://github.com/mbleigh/princely) to generate PDF in rails. I have long url in one table cell. It will extend the margin when I generate the PDF. In html,"word-break: break-all;" works well. But this rule "word-break:…
1
vote
1 answer

string-set multiple strings with PrinceXML

With PrinceXML it is possible to use string-set for one variable in one rule: h1 { string-set: header content(); } h2 { string-set: subheader content(); } This is a cool thing and works great, but I want to set subheader for every h1 element, too…
Maru
  • 894
  • 1
  • 12
  • 29