dompdf rendering complete html in 1 line - rendering

I have created pdf with simple p tags, table and img tags.
On live server its not working and on localhost its working well.
Please see both pdf files.
Can you please help me to fix this issue?
Thanks
https://github.com/dompdf/dompdf/files/2218526/localhost.pdf
https://github.com/dompdf/dompdf/files/2218527/livesite.pdf

I've faced the same problem. I solved it..
You just need to delete a file dompdf_font_family_cache.php. You may found this file under 'dompdf/lib/fonts/'
and let the renderer regenerate the cache.
Hope this helps.

Related

Blocklayered module not working prestashop 1.6

I have a bug on my prestashop website that i don't know how to fix.
My blocklayered module is not working... I've tried refreshing cache and indexes and also restored the module with original one but it's not working... I've also setted permissions to 777 for all the folders and files of the module...
Here is the error line:
v_24_2e5bc2f239b0cac64f2bff372a426d98.js:4 GET https://www.bobo-sport.fr/modules/blocklayered/blocklayered-ajax.php?layered_category_12=12&id_category_layered=13&_=1532013197475 500 ()
You can see the problem on this page for exemple: https://www.bobo-sport.fr/13-soins
Could you please have a look to my problem?
Thanks a lot for your help! :)
Seems like a silly resolution but we had the same issue.
screenshot of blank line
Found the fix by total fluke.
In blocklayered.php remove the blank line on the top of the file.
Some apache configs manage this others not. Sometimes there is a hidden ascii value in there that throws an error of headers already sent.
One of our clever engineers spotted this after hours of searching.
Nearly killed us.
Hope this helps.

what should i do when installing mod_wsgi i lost ap_config.h

Can anybody tell me what's the content in this file(ap_config.h),i want to create this file by myself,but i don't know what's the content in it.please help me ,thks.enter image description here
Use ApacheLounge that includes the header.

Selenium 2.0 - File Upload not working

I am unable to upload a file using selenium. I employ the below code:
Browser.FindElement(By.XPath(XPath)).SendKeys(path);
However, all that happens is that the file browse form comes up. The file does not get selected.
Does anyone know what I need to do to get this working, or a workaround? Many Thanks.
Refer to(saucelabs.com/resources/selenium-file-upload)
WebElement upload = driver.findElement(By.id("myfile"));
upload.sendKeys("/Users/sso/the/local/path/to/darkbulb.jpg");
driver.findElement(By.id("submit")).click();
driver.findElement(By.tagName("img"));
Also make sure you have given the path correctly. For example if the file is in d:\abc\pqr.txt, then path needs to be given as
"d:\\abc\\pqr.txt"
Mark this as an answer if this answers your question.
If not, please post your query!
Regards,
Sakshi

Capybara open an html file in my computer

I have an html file in my computer and I want to open that file using Capybara to test it. Could you help me to solve this problem?
P/S: That html file is created automatically in my app. I do appreciate any idea helping me to solve this problem. Thanks :)
UPDATE:
Based on the capybara source code here, I found that I should use Capybara.current_session.driver.visit instead of page.visit. The problem is solved
I can confirm that the update to the question works (assuming the file is in the current directory):
filename = 'foo.html'
Capybara.current_session.driver.visit filename
If your file is located at /path/to/folder/file.html
Set Capybara.app to a folder containing this file:
Capybara.app = Rack::File.new('/path/to/folder')
and then
visit 'file.html'
should work for you
See also this gist for example
With simple relative file path I got errors:
Failure/Error: visit 'foo.html'
Selenium::WebDriver::Error::InvalidArgumentError:
invalid argument
I didn't want to switch Capybara.app to Rack::File and back, so I've tried this way and it works:
visit "file://#{__dir__}/foo.html"

How to access local css files in external HTML File

I load some external files form the web in webview, but now I won't to improve the loading time and save all css und images on device.
My folder is /Ressources/assets/themes/....
In html file I try everything from simply assets/... to file:///Ressources....
What is the right way?
Thank you!
we have to use prefix app://
For a example if you want to include style.css which is inside of folder mycss
app://mycss/style.css
You need to use the app:// prefix.
Try this will may help you
Was there ever a solution to this problem? I'm having it as well. I tried 4 methods of linking:
../css/style.css
/css/style.css
app://css/style.css
file:///css/style.css
app://Resources/css/style.css works for me.
Using 3.1.1.GA