We have created a configurator using Gatsby.js where users can customize their products and download the PDF using WKHTMLTOPDF. To do that we are passing the custom values on the URL like this
http://127.0.0.1:8887/configurator/pdf/?params=W3siY3JvcHBlZEFyZWEiOnt9LCJsb2dvIjoiaHR0cHM6Ly9ncm91cGhvc3RpbmcuYmxvYi5jb3JlLndpbmRvd3MubmV0L2ltYWdlcy9jMmQ0ZjYyNi00MGRkLTRjOGEtYWM1OS1kYjM2NjUwMGM0OWIucG5nIiwiYm9yZGVyIjoidGhpY2siLCJib3JkZXJDb2xvciI6IiM1NTNmOGUiLCJjdXN0b21Db2xvciI6IiM5QjUxRTAiLCJncmFkaWVudCI6InJhZGlhbCIsImltYWdlIjoiL3N0YXRpYy9pLW1vcC14bC1jb25maWd1cmF0b3ItMDc1MTBjYzJiZDk3OTQyYTNmMTAwZTY3ZjA2YzgyNjMucG5nIiwiaWQiOjIsInBhdHRlcm4iOiIiLCJyb3RhdGlvbiI6MCwiem9vbSI6MSwiY3JvcCI6eyJ4IjowLCJ5IjowfSwicG9zaXRpb24iOnsibGVmdCI6IjQ2LjklIiwidG9wIjoiNDQuMyUiLCJ3aWR0aCI6IjklIiwiaGVpZ2h0IjoiOSUiLCJyb3RhdGlvbiI6IjI4LjJkZWcifX1d
We are getting the URL values if we use the latest browsers like Chrome (Tried every way I know to get the URL values).
But if we try to do this and convert the page using WKHTMLTOPDF we are getting this (Reference errors shows ONLY on the PDF itself).
What can I try to resolve this?
Related
I need a dynamic link (short url) that:
on mobile:
when app is installed -> open app
when app is not installed -> open store
on desktop:
open specific web url
I managed to get it working for the mobile part. However, on desktop it also opens the deeplink for the app. The documentation states to use the OFL parameter for that. Now if I manually add this parameter to the long url everything works as expected but I need a short url. How can I add this parameter via Firebase Console directly?
Cheers
The 'ofl' feature is not yet available for Dynamic Links created via the Firebase console. Currently, this is only possible with Manual URL construction dynamic link. The idea is to add the "ofl" parameter to the url to make the FDL redirect another URL on the desktop, like displaying a full web page of the app content.
I faced the same problem and i fixed it by using the property longDynamicLink that the DynamicLinkParameters object provides as they said in documentation:
/// Set the long Dynamic Link when building a short link (i.e. using `buildShortLink()` API). This allows the user to append
/// additional query strings that would otherwise not be possible (e.g. "ofl" parameter). This will not work if using buildLink() API.
final Uri? longDynamicLink;
I can embed content from my app to GoodData dashboard using "Web content". Dashboard macros are a way how to have the content customized depending on the dashboards it appears in - some reference:
http://developer.gooddata.com/article/how-to-use-dashboard-macros
http://developer.gooddata.com/article/dashboard-macro-reference
I'm trying to embed content on a link like this:
http://myserver.com/apps/my_app#%CURRENT_DASHBOARD_URI%/%CURRENT_DASHBOARD_TAB_URI%
It works fine in Chrome, but it does weird things in Firefox. Seems like I'm the macros don't work - the %CURRENT_DASHBOARD_URI% isn't being replaced with a tring like %2Fgdc%2Fmd%2FGoodSalesDemo%2Fobj%2F1952 as suggested in the docs
In fact macros work in Firefox, the issue is just the way Firefox works with decoding URLs.
Chrome doesn't decode the string dashboard URI for you and therefore you get:
http://myserver.com/apps/my_app#%2Fgdc%2Fmd%2FGoodSalesDemo%2Fobj%2F1952/85f6945b672d
Firefox does the decoding for you and you get
http://myserver.com/apps/my_app#/gdc/md/GoodSalesDemo/obj/1952/85f6945b672d
Therefore slash isn't a good character to separate %CURRENT_DASHBOARD_URI% and %CURRENT_DASHBOARD_TAB_URI% in your app.
Also when parsing the parameters out of the URL, you have to make sure that it's decoded - e.g. the decodeURIComponent function in JavaScript. decoding won't hurt the already decoded string in Firefox and will decode the string in Chrome.
I am using Symfony1.4 with doctrine. I want to save a invoice template to PDF. How can i do this.
I use for this sfTCPDFPlugin
For converting HTML to PDF, I get the best results with Wkhtmltopdf. Because it uses the Webkit rendering engine (the same used in Chrome and Safari for example), the results are exactly the way you can see the HTML rendered in those browsers.
It is in fact just a binary you can run from the command-line, but an example PHP wrapper class is available from the website. I also did not find it very hard to write a wrapper class myself with some added functionality.
I need to test an output of a page without making it pop up, but just go to the url.
If you have a pdf or word export link how would you test its contents.
The answer is to step outside of Selenium
To test a URL without making the window pop-up, consider downloading the contents of the URL without Selenium. I'm assuming you are using Java, so look into downloading the content of a URL in java. It also depends on what you are testing, this works if you want to just check if a URL is broken or not for example.
To check the contents of a PDF or a Word file, you also can't use Selenium. You will need to find a Java library to parse the PDF and Word files and then use that to read the content.
As you can see both require a bit of research on your part. The key is not getting hung up on Selenium and making use of the rest of the programming language.
I'm developing an application that converts a web page containing a 1000 elements table to pdf.
I'm trying the wkhtmltopdf version 0.11.0 rc2, the resulting pdf looks great but... the column headers are not repeated on the pages and are visible only on the first page.
This seems to be a problem affecting also chromium engine, see http://code.google.com/p/chromium/issues/detail?id=24826
Does anyone have a solution for this problem?