Text not splitting between two pages by generating a pdf - pdf-generation

I'm building dynamic PDFs with the API pdfswitch https://pdfswitch.io. Unfortunately I got some problems if the content is more than one A4-page long. The API generates more pages, no problem, but the text will cut off at the end of a page. Do anybody using this API Service as well? How can I manage to define a content-block where is not splitting between two pages ? f.e. ..)?
Thanks for help.

Related

Browser Plugin to fill a large html form with test data

In one of the flows in a java web application, I have a form page which captures around 50 odd fields. Now to test a code change in the last page in this flow I have to fill almost all the fields in all the pages that come before it (approximately around 75 fields). This takes a lot of effort in creating the test data and testing the change
Most of the time I enter the same data in these fields for testing. Any suggestion to automate this, something like a firefox plugin which could save the form data within the browser and populate it again the next time i want to ?
I tried searching over the internet but I could only find Charles Proxy which isn't what I need exactly.
You can use Selenium or iMacros for Firefox - https://addons.mozilla.org/en-US/firefox/addon/imacros-for-firefox/.

ASP.Net MVC. Making Dynamic Images SEO Friendly

I have a website made to provide free web-based tools for making indie games. Currently, it only supports artists contributing to games. The features for helping artists consist of a set of artist community tools that allow artists to upload images based on a description, then we post that image in a gallery page. Other artists can upload their images and each image can have several revisions.
The way I chose to implement the image upload and display feature is by serializing uploaded images to a byte array and storing it in the database. When I need to display the image in the UI I just call a controller action I named "GetScaledGalleryImage" and pass in the image ID. That controller action takes the binary from the database and converts it back into an image, returning the requested image back.
This works very well functionally, but the problem I realized later is that the google crawler thinks all of my images are named "GetScaledGalleryImage" so if someone searches for "sylph" on google images, nothing comes up from my site, but if someone searches for site:watermintstudios.com getscaledgalleryimage, all of my images come up.
Here is an example of the URL that is being output in my HTML http://watermintstudios.com/EarnAMint/GetScaledMedia/68?scale=128
In the past, pre-MVC I would handle 404 errors and return content based on what was requested even if the page didn't actually exist. This would of course allow me to have the images pulled back by the image name (or description).
Is that the best way to do this? Or is there a better option? Something simpler would be better like if I could just do http://watermintstudios.com/EarnAMint/GetScaledMedia/Iris%20Doll?id=68&scale=128, but based on how google indexes images, would that give me what I need? Or do I need to provide image file extensions for maximum indexability?
Thanks all
It is important when doing Search Engine Optimization to always use alt="this is a crazy robot" for your images. This will help the crawler identify them. Note: always use alt, don't always name your images this is a crazy robot.

SEO for Dynamically Loaded Images

I have a developed PHP code to dynamically load files contained in a directory into a gallery / slideshow. I have many (40 - 50) of these gallery web pages which display images grouped by content. With hundreds of images, the dynamic gallery code allows me to add images to a directory without having to write code to each web page each time.
However I've realized that these files will be invisible to search engines since there isn't any HTML code to index on (e.g. the 'alt' tag). Does anyone have any suggestions on how to get these images indexed? Two ideas I've had:
1) Write a program to automatically generate a single web page for every jpeg file which will display the image when found with the search engine and contain a link to the gallery page where the user can see more content. The benefit to this method is not having to modify my live web pages. The downside is hundreds of additional files only to be found by a search engine.
2) Write a program to generate hidden links that can be pasted into my gallery html page - using the alt tag. The benefit to this method is that users would find my main gallery page with a search. The downside is having to cut and paste code to my live gallery web pages - defeating somewhat the purpose of a dynamic gallery.
I'm new at this, so any suggestions would be appreciated.
If I understand you correctly:
I would have one page that just lists thumbnails of pages, and then one page for each of the images, that shows a bigger version of each image, and all the meta-data you have. The best would be if you added a short unique snippet of text to each image, describing what in it.

How to retrieve plain text from a formatted website to use in UIWebView

Not sure if what I want to do is possible, but what I am hoping to do is somehow gather certain pieces of text from a website, remove the header, footer, background, all formatting, and place it into my application in a scrollview or something similar...
I'll give you an example... Imagine I was making wikipedia's iPhone app, I want to download the information about the wiki on dogs, without the header, side bars etc, just the text. How would I go about doing this?
I understand that for this I have not provided any example code or what I've tried or started, but that's just because in this case I'm lost! That doesn't mean I want full chunks of code either. Any help will do. If this doesn't work, I will just have to make a 'mobile optimised' version of the webpages I want to include in my app.
Thanks
(Edit: the term I was trying to use was 'strip the web page of its HTML coding')
You may be going about this the wrong way, or perhaps even asking the wrong question.
Does the target website have an API or datafeed of some kind?
Can you get the information you need in JSON or XML format directly from the site?
I think you've misunderstood the technology. HTML is merely the framwork on which the formatting and data is hung.
Parsing the HTML page seems like an awfully big headache, I doubt you'll ever be able to get it to work, because almost all sites these days are partially or wholly generated on the server side, the page is only the result.
Some sites hide the information in memory and others get it dynamically through ajax for example, which means that simply trying to get the data by parsing the HTML will get zero data.
Another issue you should be aware of though, is that simply copying the data from generated websites may open yourself up to copyright issues.
You have to parse the html code and search for the part that you want and "throw" away the part that you do not need. This is more or less like bruteforcing and the code of the website should not change otherwise you are screwed. So you have to write the parser by hand with this method. But maybe there is a atom or rss feed and you can parse this one. This will be much more easier and you are not depending on the website layout because the rss/atom feed is just about the data. For parsing rss you could try out NSXMLParser.
And then you have to make a valid html page out of the data and present it in the UIWebView

Adobe InDesign Server examples

I'm new to Adobe InDesign Server and I'm having a hard time finding a good kitchen sink app. All the examples I got from the SDK seem to partially work. All I'm trying to do is use a master page from InDesign from the server side and edit certain text fields. For example placing first and last name in particular text fields. Does anyone know of a good place to get examples code that shows all the features or how I would approach this problem?
http://www.adobe.com/devnet/indesign/documentation.html#idserver Has a lot of resources that is useful when starting out. In particular http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/indesign/cs55-docs/InDesignServer/ids-solutions.pdf includes a number of code examples for various common operations.
As to your specific example, the typical way to go about it is:
1. Get the page object from the master pages list.
2. Iterate over each text field on the page.
3. Somehow identify the fields, for example by setting the script label in the template document and checking the labels of each text field you iterate through.
4. Set the contents of the text field.
A lot of the official InDesign documentation is partial.
Jongware also hosts the complete reference documentation:
http://www.jongware.com/idjshelp.html
Probably the reason why teh IDS documentation isn't that exhaustive is that dealing with the server version is an extension of the classical indesign use. So the exception of some peculiarities detailed in the ids sdk docs, you will find most of the help with InDesign Scripting guides ;)

Resources