Page Orientation V.2019 #4439
base: master
Are you sure you want to change the base?
Page Orientation V.2019 #4439
Conversation
Hi @PerlTester, I would like to understand if your change can handle when an html spans multiple pages? Example: Or, if an html uses the following css code
This works in the existing release. Just wondering if it would work in yours as well. |
Yes in your example the second landscape page will have multiple pages
within the PDF. The landscape orientation will continue until another
Portrait page is found.
P.
…On Tue, Aug 27, 2019 at 9:32 AM SankethJain ***@***.***> wrote:
Hi @PerlTester <https://github.com/PerlTester>, I would like to
understand if your change can handle when an html spans multiple pages?
Example:
If the content is dynamic, there is a possibility that the content in an
html overflows to the next page in the pdf, and if I have specified 2 htmls
(1 portrait, 1 landscape), it is expected to churn out 3 pages.
Or, if an html uses the following css code
@media screen, print{
section {
page-break-before: always;
}
}
This works in the existing release. Just wondering if it would work in
yours as well.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4439?email_source=notifications&email_token=AAUT4NKAHSZ3WIMSSYGGPVLQGTKCBA5CNFSM4IKOH2S2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5GZK3I#issuecomment-525178221>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUT4NJ4CDJVUOJ77UBPZR3QGTKCBANCNFSM4IKOH2SQ>
.
|
Sounds great. Also, is it possible for you to generate a binary with your changes and share it as an alpha, until the final merge happens? I am working on a requirement that could really use this feature. Thanks for the reply. |
I took the shamitv issue further to solve that exact issue and proposed a
pull request for that branch, since then the master code has changed so
this latest commit realigns to the master.
…On Tue, Aug 27, 2019 at 12:36 PM SankethJain ***@***.***> wrote:
Sounds great.
In issue #1564 <#1564>,
user shamitv had released an alpha version (in 2016) for this idea, but I
encountered an issue in the PLP scenario. The portrait after the landscape
pages were taking the width of the landscape. This is not an issue with
your pull, right?
Also, is it possible for you to generate a binary with your changes and
share it as an alpha, until the final merge happens? I am working on a
requirement that could really use this feature.
Thanks for the reply.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4439?email_source=notifications&email_token=AAUT4NKYBHIYDTIM7ECM35LQGT7SFA5CNFSM4IKOH2S2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5HJLKI#issuecomment-525243817>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUT4NM6DEN2AYVXSTETJWTQGT7SFANCNFSM4IKOH2SQ>
.
|
Would you be able to produce an alpha version, so that I don't have to wait for the merge to complete? Would that be ok? |
Alpha with absolutely NO warrantee, Ubuntu 18.04 Bionic deb file zipped under windows!!! wkhtmltox_0.12.6-0.20180619.5.dev.4f1b79d.bionic_amd64.zip Windows 64 - multi-part winzip files below, remove .zip from filename of .z01 and .z02 wkhtmltox-0.12.6-0.20190712.20.dev.e3fa5a9.msvc2015-win64_multipart.z02.zip |
Is there a windows executable version of this? |
Hi @PerlTester. This works just as intended. In fact, I just discovered a hidden gem, that I can have different headers/footers for each of the pages. It even skipped the 1st page of the document as I had expected. Alternatively, to have a common header/footer for the entire document, you can write as below: I hope this makes it into the final merge. Be warnedGiven the above feature, writing a code like below will only produce header/footer for the last page(s) only. Additional documents for replication P.S. Note to @ashkulz Kindly look into this and merge. This feature has been requested since Feb 2014. |
Happy to be of help. P. |
@ashkulz any update on when this will be reviewed/merged to the trunk? |
We plan to use version wkhtmltopdf with different page orientation. But we have had some problems with packaging. May I ask you to built wkhtmltopdf with this functionality for CentOS 7 64? |
Hi,
Sorry but I've also not had success building for centos on ubuntu.
P.
…On Sun, Oct 27, 2019 at 1:45 PM azinchenko ***@***.***> wrote:
We plan to use version wkhtmltopdf with different page orientation. But we
have had some problems with packaging. May I ask you to built wkhtmltopdf
with this functionality for CentOS 7 64?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4439?email_source=notifications&email_token=AAUT4NLXC3773VB26OIQH73QQWENRA5CNFSM4IKOH2S2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECK5Q4Y#issuecomment-546691187>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUT4NJPDTFOKLK6RCL6XBTQQWENRANCNFSM4IKOH2SQ>
.
|
Hi PerlTester would you be willing to help advise us on a project where we need what you have done inside of a PHP environment? |
Hi Justin,
I'm afraid I am not active in the PHP world, but there are many web
examples of getting wkhtmltopdf working within a PHP env. this one for
example
https://github.com/mikehaertl/phpwkhtmltopdf
The build I have provided is a straight replacement for the current
version. Just construct the arguments to point to your landscape and
portrait html's
in the manner described above.
P.
…On Fri, Nov 15, 2019 at 4:02 PM Justin Slabbert ***@***.***> wrote:
Happy to be of help.
P.
Hi PerlTester would you be willing to help advise us on a project where we
need what you have done inside of a PHP environment?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4439?email_source=notifications&email_token=AAUT4NIP77RNFQAIY5RA7O3QT22YFA5CNFSM4IKOH2S2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEFV2LY#issuecomment-554392879>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUT4NPBNSV6VD62A5T3HZ3QT22YFANCNFSM4IKOH2SQ>
.
|
Can someone please look into this? We're still on a really old version because we need this for our application. |
Internal links between pages doesn't seem to work regardless of --disable-external-links and --enable-external-links options. |
@PerlTester I'm having random errors when trying to print a large table that can span over 1 or more pages. I've noticed I get a lot more failures when the table spans over two pages. Here's the output I get: When it works, it works perfectly. Please let me know if you need more test code. Thanks ! |
@PerlTester Great work, this works great but I've found a bug that I think is related to the issue @mrdj07 was having. I believe if the document orientation is set to Portrait, but the last page is a landscape and contains multiple pages it will then produce an error |
What do you think @PerlTester, time for a v.2020? :D |
Sorry, wasn't able to spend time on this project lately. @PerlTester, not sure about this comment you made earlier -- do you plan to incorporate the change in the PR? |
@knash94, can you link/add a minimal test case so that we can verify this? |
Thanks Ashish,
Yes the comment I think should be included in the PR I just am not such a
big user of GItHub that I need to see how to do it easily.
P.
…On Tue, Nov 24, 2020 at 7:48 AM Ashish Kulkarni ***@***.***> wrote:
Great work, this works great but I've found a bug that I think is related
to the issue @mrdj07 <https://github.com/mrdj07> was having.
I believe if the document orientation is set to Portrait, but the last
page is a landscape and contains multiple pages it will then produce an
error
@knash94 <https://github.com/knash94>, can you link/add a minimal test
case so that we can verify this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4439 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUT4NPSX52AAAMEOEFGXHTSRNI3LANCNFSM4IKOH2SQ>
.
|
Modified lines 952 & 953 as per update in message thread
@ashkulz any updates ! |
Since we missed Amit's birthday this year for a new release, I suspect the next release will be Jun 10, 2022. |
any updates |
Not from my side - if there was a commitment to look at it I could revise
to the latest source but I've done that twice now already so I need some
incentive....
…On Thu, Feb 10, 2022 at 7:08 AM leond08 ***@***.***> wrote:
any updates
—
Reply to this email directly, view it on GitHub
<#4439 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUT4NMISEZN475KZDQM3J3U2NI6VANCNFSM4IKOH2SQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I have kinda lost hope on this too and we have scheduled to migrate our wkhtmltopdf logic to something else, like https://github.com/puppeteer/puppeteer |
I'm watching puppeteer also for some time but they have not sorted the
table of contents issue.
Some suggest to use paged.js which can handle the toc but have issues on
the orientation - if they ever get it sorted that might be a runner.
https://gitlab.pagedmedia.org/tools/pagedjs/-/issues/99
…On Thu, Feb 10, 2022 at 5:21 PM jerbob92 ***@***.***> wrote:
I have kinda lost hope on this too and we have scheduled to migrate our
wkhtmltopdf logic to something else, like
https://github.com/puppeteer/puppeteer
—
Reply to this email directly, view it on GitHub
<#4439 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUT4NOGXDGTJKIWCIA3YUTU2PQX3ANCNFSM4IKOH2SQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @ashkulz, any hope that 0.12.7 (and mainly this patch) will ever be released? Or should wkhtmltopdf be considered practically abandoned? @PerlTester Thank you very much for creating this patch! |
@erakadjiev not yet. Will probably be Puppeteer or Gotenberg |
Thanks @erakadjiev
I had opened a ticket with Chromium bugs last april regarding the issue
with chrome print pdf - if this was solved it would open up puppeteer as an
option but no traction to date.
https://bugs.chromium.org/p/chromium/issues/detail?id=1312978
P.
…On Tue, Sep 27, 2022 at 2:16 PM jerbob92 ***@***.***> wrote:
@erakadjiev <https://github.com/erakadjiev> not yet. Will probably be
Puppeteer or Gotenberg
—
Reply to this email directly, view it on GitHub
<#4439 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUT4NLZTUNX6QZ3MGE252DWALQRLANCNFSM4IKOH2SQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@jerbob92 @PerlTester Thank you for the replies! Would be good if Chromium would address that issue soon. I'll check out Gotenberg - I haven't heard about it before. Thanks! |
@erakadjiev I imagine Gotenberg would have the same issue as Puppeteer since it also uses Chromium, but it's seems to fit this use-case a bit better than Puppeteer. |
This updated commit adds the necessary code to allow Portrait and Landscape page
changes within a PDF document.
Implemented a new PDF Object parameter --page-orientation with a value of P for portrait and L for landscape.
Given 3 HTML files where you want First Landscape, Second Portrait and Third Landscape invoke as follows:
wkhtmltopdf.exe part_1.htm --page-orientation L part_2.htm --page-orientation P part_3.htm --page-orientation L Output.pdf