I am using wkhtmltopdf v0.9.6, 32-bit static binary with pdfkit. It works as expected (without header, footer, etc). The server has a 64-bit OS, so the PDF file appears with a header and footer.
I want to remove the header and footer. I have tried with using CSS, but it doesn't seem to work. I am using Rails 3.2.11 and ruby 1.8.7 without the asset pipeline.
Kindly give me a suggestion how I can remove the unwanted header and footer.
Related
I'm working using sublimetext 3 to make markdown files.
the header indicator # makes a big header, ## slightly smaller, but ### or more than 2 hashes doesn't render. Do i need to install an ST3 package for markdown or something?
I'm using packages MarkdownEditing and Markdown Preview.
I uninstalled all markdown packages with Package Control, then installed MarkdownEditor and Markdown Preview packages, quit and restarted ST3, and it seems to be working correctly.
I had a few other markdown packages installed- perhaps there were conflicts.
I use dita-ot to render to pdf.
Recently, I upgraded from dita-ot 1.8.M2 to 2.5.1
Updating my pdf plugins was quite a bit of work, but the only thing that I don´t get to work properly is hyphenation.
I did it all as described on the Apache website.
The relevant instruction in detail:
"Download the precompiled JAR from OFFO and place it either in the
{fop-dir}/lib directory, or in a directory of your choice (and append
the full path to the JAR to the environment variable
FOP_HYPHENATION_PATH)."
That is how it worked with dita-ot 1.8.M2, where the {fop-dir} was placed in the "org.dita.pdf2" plugin.
Now, {fop-dir} is in the "org.dita.pdf2.fop" plugin. Maybe this is the reason, why "fop-hyph.jar" is obviously not found by the process? But what about the environment variable?
Has anybody a solution?
I found the solution by myself: I just added the attribute <xsl:attribute name="hyphenate">true</xsl:attribute> to the attribute set common.block inside of the attribute file commons-attr.xsl.
I found out that not FOP or the jar file is the cause, when I compared a FO file generated with the old dita-ot (with hyphenation) to a FO file of the new dita-ot. What was missing was the hyphenate=true attribute in each block.
Thanks for your patience!
Given:
The Swig template engine: http://paularmstrong.github.io/swig/
Webstorm has a plugin for it: Textmate bundles support
A Textmate bundle for Swig is available: https://github.com/paularmstrong/Swig.tmbundle
I expect I should be able to get Swig highlighting fixed, but I'm only getting half way.
Below is the resulted highlighting I get. The Swig code is highlighted as expected, but HTML is not highlighted anymore.
I've tried installing and enabling the HTML textmate bundle as well, but when both the HTML and the Swig bundle are activated, the code is highlighted as only HTML. If I disable the HTML bundle but have the Swig bundle still active, I only get Swig highlighting.
My Question: How do I get Swig code and HTML code highlighted in the same file in WebStorm on Windows?
Result:
This is my Textmate Bundles configuration in WebStorm 9:
Again, simply selecting the HTML bundle to enable it doesn't work.
Swig has nearly identical syntax to Twig, so we can assume they can be used interchangeably speaking of syntax highlighting and code completion.
The thing is that PHPStorm it has a Twig support throught a plugin (which is awesome BTW), but sadly it is not available in the others IDEs thought the Plugins menu.
This issue can be solved by:
manually downloading the plugin from the official repo at https://plugins.jetbrains.com/plugin/7303?pr=
then installing it manually thought the Plugin interface,
then or use the .twig extension on files or adding a new mapping in the File Types system menu for the type Twig, with wildcard *.html or *.swig, how you prefer.
I'm using the *.html workaround and work like a charm, both Swig & HTML syntax highlighting + code completion.
Hope this helps you like it did to me :)
I am using PhantomJs 1.9.2 on Centos 6.3 to for automated ui tests. When a test fails,
screenshots are saved to the server.
My problem is that even though the screenshots are saved, they do not contain readable fonts.
So if the website reads like this:
חיים טכנולוגיים
the screenshot of the site will look like this:
םםםםםםםםםםםםם
So, instead of the actual letters, it renders and saves little boxes.
The system is centos 6.3. Freetype and Fontconfig are also installed.
How could I go about fixing this?
Thanks!
follow these steps:
in /usr/share/fonts/ I added a folder named arial with the arial.ttf for hebrew
I ran fc-cache -vf.
That's it! I did not edit or change fonts.conf or did anything else as suggested in the link.
You should use python code for taking screenshots of website. there are two module which will do whatever you want pyvirtualdisplay & selenium. Install them and write a class to create screenshot and call it with command line with your code.
Best of luck...
I recently had to fix the same problem myself. I ended up doing what's suggested in the this answer. Well, sort of. I skipped some of the steps:
in /usr/share/fonts/ I added a folder named arial with the arial.ttf for hebrew
I ran fc-cache -vf.
That's it! I did not edit or change fonts.conf or did anything else as suggested in the link.
Granted, I still had a little trouble with parts of the page (I'm guessing it was because they were using fonts other than arial), but I ended up not needing them. Hopefully that'll be good enough for you too!
I am trying to use ImageResizer (http://imageresizing.net/) installed as COM object to thumbnail a PDF file.
I have got imageresizer successfully working with a JPG file, and moved onto using the PDF render plug in.
Classic ASP code
Set c = Server.CreateObject("ImageResizer.Configuration.Config")
set p = Server.CreateObject("ImageResizer.Plugins.PdfRenderer.PdfRendererPlugin")
p.Install(c)
c.BuildImage "d:\temp\wibble.pdf", "d:\temp\tractor-rotated.jpg", "format=jpg&rotate=45"
Error Message
ImageResizer.Plugins.PdfRenderer error '80131509'
Ghostscript native library for this platform not found: gsdll32.dll
/resize.asp, line 11
(line 11 is p.Install(c))
Now I have downloaded and installed Ghostscript.
I have put the gsdll32.dll and gsdll64.dll in the /bin directory
But it will not work.
What am I doing wrong?
UPDATE BASED ON SUPPLIED COMMENTS.
I have imageresizer installed and working successfully using Classic ASP; I have resized and rotated a plain old .jpg file fine; the issues I am having are with the PDF Rendering plug in... that too seems to be working it is just it is looking for Ghostscript which does not seem to be installed..
Re: Ghostscript. I have run the Ghostscript install program. It seems Ghostscript is actually installed but that the PDF render plug in cant find it.
I copied it to the /bin folder because that is part of the install instructions and I wondered if that is where it might be looking (trying to eliminate variables)
I have created a standalone project to test this and have run the Classic ASP apppool in both 64 and 32 bit modes to again eliminate variables.
But I am still stuck with the error as defined above.
From the update I eliminated most possibilities; I also ran Ghostscript from the supplied documentation so I knew that ImageResizer and Ghostscript were both installed and working but not talking finding each other ....
So the fix is ... add the Ghostscript bin directory(s) to your PATH environment variable, that way ImageResize can find it and after a reboot it all worked. In my case I added
;C:\Program Files\gs\gs9.10\bin;C:\Program Files (x86)\gs\gs9.10\bin to PATH
I have not found this documented anywhere else; so I hope it helps someone else
You can't just drop your dll into the bin folder the way you can in asp.net. With classic asp third party components you need to register the component (which the installation process should have done for you anyway), then you need to give your IUSR account read/execute permission on the registered dll. I haven't used Ghostscript but at a guess look in Program Files/Ghostscript/ or Program Files(x86)/Ghostscript. Another thing to watch out for in Classic is that if you're using a 32 bit component you need to enable 32 bit applications in your app pool