Font Alignment issue when render to pdf/image - phantomjs

does anyone know how to solve this alignment issue?
ISSUE: When I add text and gave alignment to right and render to pdf. it has a scale issue as shown in the URL.
Editor: https://i.imgur.com/MonGfQR.png
Generated PDF: https://i.imgur.com/HvGpaqG.png
I am using phantomJS.

Related

Font Not Displaying Properly in PDF

I am trying to save a pdf from illustrator and I have never had this issue, the font looks fine in illustrator, but when I save the pdf and open the pdf in a pdf viewer the "i" character now has a box beneath the text but the dot of the i stays there.
When viewed in illustrator:
When viewed in a PDF viewer:
I know that when the square shows up it means the font you are trying to use isn't there however the other characters appear fine, it just seems to be the I which is odd. The font passed verification (for reference it is Playfair Display
Does anyone know how to fix this or why this could be occurring? Am I exporting wrong(I've never had this issue before with exporting)?
Thanks in advance!
Update: I solved my question while writing it. The font that was installed was a variable font type (I downloaded it from Google), for some reason it doesn't seem to want to play nicely in a pdf (maybe I'm saving it incorrectly?). I deleted the variable font and installed the static versions of the font and now the issue has gone away.
I don't know too much about variable fonts but it seems like they are maybe a bit finicky?
Hope this can help others!

iText: why would adding an image cause text to appear fuzzy in PDF?

I'm using iText with Java to create a PDF file. I'm trying to place a paragraph on left, and float an image on right (e.g. next to each other). Using the following code does insert the image, but it also makes the text fuzzy on the entire page (other pages are fine).
// add image
Image img = Image.getInstance(imgPath);
img.setAlignment(Image.RIGHT | Image.TEXTWRAP);
img.scaleToFit(1000, 72f); // 1" height
//img.setSpacingBefore(0f); // does not have any effect
document.add(img);
// add text
Paragraph par = new Paragraph("some text here", styleBody);
par.setSpacingBefore(20f);
document.add(par);
If I remove the image portion of the code, the text looks clean. This is my first attempt at adding an image next to text. Must be doing something obviously wrong. Any idea what could cause this?
I was able to solve this problem. The code above is perfectly fine. The problem was I was using a PNG image with transparency. When I removed the transparency (by re-exporting the image from Illustrator with transparency turned off), I was able to create PDFs with clear text.
I think the transparency forces the PDF page to be written in CMYK color scheme rather than RGB, which perhaps causes this issue.
Hope this helps someone else. I searched everywhere but couldn't find any leads talking about fuzzy text in iText.

Inkscape svg to pdf crops too much

There is a slight error when exporting an svg file to pdf: the right margin of the plot is cropped too much (see the missing vertical line for completing the box area of the plot - this is how the pdf looks like):
Here is the svg file (the box area is complete - the right margin line exists):
I'm exporting with this command:
inkscape filename.svg --export-area-drawing --export-pdf=filename.pdf
I also did a test and manually exported the file from the GUI but it gave the same result. Is there a way to fix it? Like adding some padding? Can it be done from the command line?
Posting/linking the svg file could help. Tried to download the complete image, transform it as vector and export it as pdf, worked fine.
wich version of Inkscape are you using ? It is up to date ? ( mine, that is working is version 0.48.4 r9939 on Ubuntu ).
A solution I use when facing export problems is create a empty rectangle around my draw, set it to no border and no fill, and then apply "File" > "Document Properties" > "Resize page to content" > "Resize page to drawing or selection" with no object selected. Re-export.
Try to make a "Vacuums Defs" to clean the svg file before export.
Good luck to you!
EDIT : command line equivalent to this manipulation can be achieved by adding "--export-area-drawing --vacuum-defs" as command line parameters.

Tinymce html2pdf

I have been searching for this but i can't start coding or change configuration because i can't quite understand the concept. Can you help me know where to start?
i have a tinymce editor with different fonts. When i saved it the the text(with its font) was saved in html format. I am converting the html format to pdf by using html2pdf plug in but there was an "TCDPF Error: can not include ''". I have tested all the fonts in my tinymce editor but only Arial works with the html2pdf. I know that you can set the font in html2pdf by using
$html2pdf->pdf->setFont('calibri');
but this means the text will be saved in one font only. Here comes my problem because in my text each word has different fonts. What should i do? i appreciate any help. :) please understand, i am just a novice
I would use some other tool to create a pdf, what about a ghostscript solution?

Editing Flexslider HTML

I'm still new to coding. I downloaded flex slider, and I have it running fine on my site and working fine. However I can't make ANY edits into my html regarding the slider. It has the 'next' and 'previous' image links on my gallery, which I would like to replace. It shows up in the html when I inspect it in firebug, yet when I run my html through my text editor (Im using text mate), it doesn't show up at all!
Any ideas why?
I think you are talking about the navigational arrows on the left and right side of the images. This can be changes in the "flexslider.css" file. If you are using textmate then the line number is 52.
Probably the easiest way is to find the image here images/bg_direction_nav.png. Right click the image and open with your image editing software eg. photoshop. Then once you have change the image just save it and it will be saved in the same folder location. If you keep the image the same size then you will not have to mess around with anything else..