markdown to pdf and scrollbars - pdf-generation

When I use a markdown file and I use any tool to convert to pdf (pandoc, marp, etc.) wider that screen width I get something as follows:
The problem is the scrollbar, I'd like to get a movable scroll bar, is that possible?

Related

How to create SVG's with the stroke property?

I've been using a combination of Illustrator, Sketch, Inkscape, and Peter Collingridge's svg-editor to create and manipulate SVG's, but I've been running into a few issues. I am trying to create a basic logo using text, and when the logo appears on the page I would like to animate the outside border (with a drawing effect), and then fill the centers with a solid color.
In Illustrator and Sketch, I started with a basic text box and converted the layer to outlines, but my exported SVG's only contain a single path without the stroke and stroke-width fields. It just looks something like this: <path fill="#FFF" d="…"/>, with alot of markup in the d='' field.
I read up and learned Inkscape exports some of the cleanest SVG's, so imported a PNG of my initials, "traced a bitmap image" and the "ungrouped the layers" per this demo. This exported a multi-path svg, but each still lacked the stroke and stroke-width params. This is the closest I've come so far to animating it: codepen.io/pcooney10/pen/PPvGrx, and it also contains the actual SVG code.
I have a few questions, hopefully some people over here can help:
How can I create/export SVG's that contain stroke, stroke-width, stroke-dasharray, and stroke-dashoffset fields? These params seem to unlock a lot of animation functionality,and my paths only seem to have fill='' and d=''.
Generally, what's the best tool for creating SVG's? It seems Inkscape exports the cleanest SVG code, but it's not as easy to maneuver as Sketch and Illustrator. Peter Collingridge's svg-editor seems to be the best for slimming down the code, but it doesn't remove all of the styling that Sketch and Illustrator embed in the file.
You complain of your SVG as containing "d" operations. But this is a powerful notation which draws your letters! You can use this as a start for animation.
Idea: just use Inkscape.
Enter your text. Make it just the way you wish it to appear. Click Menu > Path > Object to Path. This converts it from font-based to vector-based.
Click Save As... and choose the plain SVG format.

couldn't find a way to load a 960x624 image on j2me netbeans emulator

How to show a full 960x624 image using j2me canvas?
I wouldn't mind to scroll but I don't want it resized.
{image = Image.createImage("/earth.png");}
{g.drawImage(image, width, height, Graphics.BOTTOM | Graphics.RIGHT);}
doesn't serve the purpose. I want to know if I have any option to get both the horizontal and vertical scroll bars without actually creating them to view the whole image?
The image size should be same as I don't want the TEXT on the image become unreadable.

Make text not selectable when printing to PDF

I have a view designed for printing which includes a watermark, a transparent view which draws some text atop the other content.
When printing and using the Mac OS Save as PDF feature, the watermark text is selectable. Sometimes this interferes with selecting the other content, other times it's just distracting.
How can I make the text not selectable in the generated PDF?
I tried drawing the watermark behind the other content instead of in front. It didn't prevent selecting the watermark, but kept it out of the way of the other content. However, the table view rows occluded the watermark, which of course is worse.
Commenter asked for code, so here's some code which prepares the view:
// self.view is the print view
// watermark is an instance of WatermarkBackground, an NSView
if (watermark) {
watermark.frame = self.view.frame;
[self.view addSubview:watermark positioned:NSWindowAbove relativeTo:nil];
}
And the line in [WatermarkBackground drawRect] which does the drawing:
// _message is an NSString
// textAttributes returns a dictionary with a color and font
[_message drawWithRect:textRect
options:NSLineBreakByWordWrapping
attributes:[WatermarkBackground textAttributes]];
I meant to post this screenshot originally:
One option would be to create one or multiple CGPaths from your string and draw those into the PDF instead. One way to do so would be to use CTFontCreatePathForGlyph, but it's actually quite a lot of work to do this for entire strings, Core Text does help, but it's a pretty low-level framework.
If you're always drawing the same watermark, it would be much easier to create a static PDF in some vector graphics app and use that with CGPDFPageDraw etc. Illustrator has a "Convert to Paths" command for text objects.
As far as I know, there in no way to make text unselectable in PDF. Probably the best solution would be to use an image watermark instead.
However, if it is in front of text, it can make background text difficult to select. If it is behind everything, there will be same issues with obscuring it with tables. So, possibly a better plan of action would be not to try to make text unselectable, but rather make table background transparent. Then, use image watermark.
Taking an idea from omz, instead of using CGPaths and generating them on the fly, the simplest, most elegant solution would be this:
Create a vector watermark by typing the text in a vector editor and expanding text to create outlines.
Save it as SVG or PDF.
Then, put this new vector graphic on top as a watermark. It will not be selectable, will not obscure the view, and will not be obscured by tables.

AIR Highlight search results inside image

We have an Adobe AIR application. It has an image preview feature to show TIF and JPG images inside a TitleWindow.
My requirement is as follows:
i want to highlight(yellow color) a line containing a searched term results inside that image.
i found out examples which can highlight text inside a textarea. But wanted the same thing inside image.
There can be multiple lines having this keyword. All those llines have to be highlighted.
Not sure if this is possible. Please let me know how can this be done in Flex/AIR.
Create mx.controls.Text, assign style which will paint it yellow and place over the Image. This can be done, for example, with Canvas container which allows absolute positioning.
mx:Text has no background, so it will just text over image. Or do you need some background as well?

WP7 wrap text around image

I have an image with a large amount of text to the right in a textblock control. How can I get that text to wrap on the right and below the image?
The standard TextBlock and Image controls wouldn't work for you.
I think you'd either:
have to use HTML inside a WebBrowser (this is potentially very slow and ugly!)
have to use multiple TextBlock's and you'd have to measure the text in order to implement the wrapping out yourself.
It might be an idea to consider a different layout - is the text really free flowing and needs wrapped around the image? Or can the text be split up into header, caption, body, etc?

Resources