PDF as img source
Hello,
In order to improve image resolution, we aim at using PDF files as image source within our HTML code (ex: <img src="docs/docmentation.pdf" alt="" />). Nevertheless, the image doesn't show up when generating my PDF using PrinceXML.
Do you know whether there would be a trick about that issue or if not, could you consider adding this option ?
Best regards !
Boris
From my understanding, you will not be able to improve resolution by using the PDF.
Try looking here to help understand. Maybe you have a different question.
http://www.webmasterworld.com/forum21/10808.htmhttp://www.espressographics.com/text/imagesize.html
Jim Albright
Wycliffe Bible Translators
Thanks for the links but during my tests it seemed that using PDF as images could greatly improve the overall (print + screen) image quality.
At the moment our focus is on improving support for SVG as an image format, which allows scalable vector graphics in a more web-friendly manner than PDF.
This might actually be useful, for another reason: I prepare a lot of documents for clients in two versions: with and without letterhead – the version with letterhead is printed on normal paper, and the version without gets printed on company stationery. In InDesign I simply have the letterhead.pdf placed in the document, on a layer which I turn off and on.
Moving my document production over to Prince, I'm expecting to do something like this:
http://www.pdflib.com/pdflib-cookbook/pdf-import/import-pages-into-layers/, but it'd obviously be nicer to do it right in Prince
Something like this would be awesome:
@page:first {
background-image:url('letterhead.pdf');
}
edit: link to another similar discussion:
http://princexml.com/bb/viewtopic.php?f=3&t=1881
+1 for this feature, we are currently using PDFTK to merge two PDF files. I agree with Mike that a focus on SVG is better, Prince can provide much more flexibility with SVG than with PDF. Converting PDF to SVG should not be that hard. I'd love to see support for references to SVG files, both in image tags and in CSS:
<img src="some.svg" />
And:
@page { background: url('some.svg'); }
Edit: it seems like the documentation is not very clear on this point. The SVG section only talks about svg elements in HTML, the images section only talks about bitmap images. The roadmap and other topics on this forum tell me that my request is already possible
Boris wrote:
In order to improve image resolution, we aim at using PDF files as image source within our HTML code (ex: <img src="docs/docmentation.pdf" alt="" />).
+1 on this. I have two strong use cases for this:
1. Sometimes, some of the content is not available in HTML, only PDF. (Example: Office document). Currently have to splice manually.
2. Logos and other non-bitmapped graphics. Using a bitmapped format produces terrible output. It would be nice if Prince supported PDF and/or EPS for graphics. How does everyone currently insert them? Again, quality of bitmapped is awful.
SVG is ideal for logos and other vector graphics.
edwin.vlieg wrote:
<img src="some.svg" />
We use
<object data="some.svg" type="image/svg+xml"><img alt="fallback" src="fallback.png" /></object>
edwin.vlieg wrote:
@page { background: url('some.svg'); }
We use this all the time, and it works well.
Interesting. I wasn't aware that PDFs can be converted to SVGs (not sure how that's done, as PDFs can contain bitmaps as well.) My experience with SVGs has been poor - I've found that text shows up poorly, but perhaps that's just the tools I've used.
Still, it would seem to me that as a PDF tool, Prince users are most comfortable with PDF. I certainly am. And it's still the common way to express a document that you'd like to include. It would be a great benefit to Prince users.
PDF2SVG is free tool.
I just googled it. Interesting.
Jim Albright
Wycliffe Bible Translators
Sorry for warming up old threads, but: Are there any new investigations?
In the near future, we're about to face the challenge to integrate PDFs as background images on special pages, and PDFs as whole pages for our Prince workflow. Those PDFs are CMYK PDFs from designing applications such as InDesign oder XPress with complex structures (texts, images, vector graphics, all possibly with effects).
Converting those PDFs to SVG wouldn't be very easy, I think (partly because SVG natively supports RGB, which will end up with color shifting of CMYK PDFs).
I'd be glad to hear of some existing workflows and tips, how to master this matter.
Thanks
Tobias
It is possible to use CMYK in SVG, but unfortunately not many tools support it yet.
One day it would be nice if Prince could load PDF images as well, but this will require a substantial amount of work.