-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Page clipRect is ignored if output is PDF #10465
Comments
alexandr...@gmail.com commented:
|
adkison....@gmail.com commented:
|
a...@andyfreeland.net commented:
|
Any update? This still occurs. |
I am using 1.9 and the problem persists. It ignores the clipRect and captures the whole page. |
1.9.1 and the problem persists. Have any of you been using a workaround? I'm thinking about phantomjs -> png -> pdf, but that's unfortunate. |
This issue is important indeed! Can we hope that clipRect is accepted by PDF rendering in the next PhantomJS version? Thanks in advance. |
👍 |
Had a quick look, and even though in PhantomJS the path to "print" a PDF is entirely different from the path to "render" a pixel image (probably to retain vector-ish properties), in the end this seems to be primarily a limitation in the underlying Qt library. However, it does look possible to add a clipRect feature to Again, from what I can see we'd need a patch in QtWebkit in order to fix this; I don't see yet how it can be worked around just in PhantomJS without going via a pixel image. |
You can very easly do pdf rect-clip render using combination of iframes and body overflow hidden style and height. |
@mateuszjarzewski Can you please share some piece of code on how you achieved it? |
This issue still there in 1.9.7... Looking forward the day this issue be fixed... @mateuszjarzewski Would you please share in work around in achieving your method, thank you very much. |
... :| |
Version 1.9.8. Problem is still there. |
+1 |
1 similar comment
+1 |
I've just found, that parameters top:0 & left:0 (with any values for width & height) render full page instead of specific area. |
I have the same problem. I want to select a DOM-Element and render only those to a pdf. It hides all elements except the element that i want to render. page.includeJs(jquery, function(){
page.evaluate(function (element){
$(element).appendTo('body');
$('body > :not(' + element + ')').hide();
}, element);
});
window.setTimeout(function(){
page.render("page.pdf");
},1000); Maybe it helps someone |
This issue is now three years old and many people are having this problem. Maybe it should be a higher priority? |
+1 |
6 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
3 similar comments
+1 |
+1 |
+1 |
It would be a life saver if page.clipRect behaved the same in .pdf as in the image formats. Please please add this :-) |
If it is a matter of life maybe it would be worth considering providing some help to the maintainers of this project #justsaying |
@leplatrem I really would if I have the knowledge required or the time. My company is heavily relying on phantomjs and we would be willing to pay for a phanomjs license is funding was something that would help the development efforts. |
+1 👍 |
+100 need this fixed too. on 2.1.1 |
Adding +1* here won't have much impact. AFAIK it is clearly stated that the program is distributed as-is and without any warrantee. Maybe relying on a funding platform (like http://www.fixthatbug.com or whatever) could help. If several companies need that bug fixed, they could gather funds to attract developers with the right skillset. (my 2 cents) |
@leplatrem , I suppose those who really needed the functionality just wrote a simple ghostscript-based workaround like me:). |
@szakharchenko now you can start a company that sells the script to those who seem to really need it ;) |
+1 |
2 similar comments
+1 |
+1 |
@szakharchenko mind sharing ? I really need it ! |
@Hamza-324
|
Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed. In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution! |
leplat...@gmail.com commented:
Disclaimer:
This issue was migrated on 2013-03-15 from the project's former issue tracker on Google Code, Issue #465.
🌟 6 people had starred this issue at the time of migration.
The text was updated successfully, but these errors were encountered: