PDFTK - and the ability to change the default view - view

I have been merging PDFs using PDFTK with great success, the pages that are used to generate the pdf are set to 'click to show one page at a time' (basically the whole of the first page is displayed when the pdf opens, based on the height of the page).
however the generated pdf defaults back to filling the reader based on its width (not all the first page shows).
Do you know a way of controlling the view of the generated pdf? because I would prefer the whole page to be displayed based on its height?
Best regards
Daniel

Daniel,
Thank you for your message. When using pdftk to assemble a new PDF from PDF pages or documents (via the cat operation), the new PDF does not have display settings. So the resulting PDF is displayed using the defaults set in your viewer's preferences. Pdftk doesn't have a means of setting the display mode, but I will add that to the feature wishlist. Meanwhile, you can change your Reader/Acrobat preferences to your preferred view mode as a workaround.
Regards-
Sid Steward
Pdftk Maintainer

Related

PDFDocument(data: myPdfDoc.dataRepresentation()) does not reproduce original PDF

I encounter a weird bug using PDFKit's PDFDocument.
I have an app with a PDFView and the user can drag & drop a PDF on it.
On this event, I save the data representation (NSData) in my core-data structure
myCoreDataObject.pdfdata = myPDFView.dataRepresentation()
Later, the user can select the core data object to display the PDF, which calls
myPDFView.setDocument(PDFDocument(data: myCoreDataObject.pdfdata))
The PDF is correctly displayed in the PDFView BUT when the user selects text in it, copy-pastes it in another editor, the selection is made of empty(blank) characters ! Which was not the case with the original dragged-and-dropped PDF.
So my question is: WHY this code:
PDFDocument(data: myPdfDoc.dataRepresentation())
does not return the exact same PDF ?
IMPORTANT NOTE: this only happens with OCR'd PDF that have been through ABBY FineReader OCR.
Additional information: the "modification" in the PDF only appears when the binary data goes through core data. I ran a test by directly calling
PDFDocument(data: PDFDocument(url: myUrl).dataRepresentation())
, and the PDF works as expected.

Create image of, "specific page" of postscript file using ghostscript

Please someone help me with ghostscript....
I want to create image of a particular page postscript file using ghostscript. I will specify the page number or something like that will get the respective image as output.
Is this possible with ghostscript?
In current versions of Ghostscript you have two choices:
1) Render every page to an image file, use the '%d' file name format so that you know which page you want, delete the others.
2) PostScript is a programming language. Write a customer EndPage procedure which returns true when the page is the one you want, and false for all others.
In a yet to be released version of Ghostscript, the FirstPage and LastPage paramters could be used to do this.

Flash / Actionscript: How to insert images in dynamic text (In line image)?

I want to insert images in dynamic-text-box(s) which should be inline.
Detail:
I am preparing an application using flash CS4; The application is just like a chat room which will show conversation the only difference in this; it will show stored messages (stored in XML file). I want to insert smiling faces (emotions) in text body (using html tags) but the problem is that image is not inline (like in chat room [yahoo, hotmail, etc.]).
I have no idea what to do......
Please paste your code where you set the dynamic-text-box.text
Make sure that you wrap the whole text in html braces, not only images.
You can embed images in any HTMLText field using the tag.
The image, however, must be loaded externally. You can't get images stored in your library.
Its good to get the solution of my problem but sad I got solution by myself :-P
The simplest solution I got is, to update my Flash CS4 to Flash CS6; in Flash CS6 text (TextField) have extra feature like TLF (Text Layout Framework). By use TLF I can insert graphics in text area and inserted graphics are inline as well.
Problem Solved :-)

Posting link to Page now includes thumbnails when none is set

As of this morning (12th July) a server script we used to automatically add updates to a facebook page is including a thumbail of the website logo.
We add an image ourselves if there is a suitable one - but leave the picture variable as blank otherwise.
As of today Facebook grabs the image set in the webpage og:image setting (or the first off the page if that is disabled) and adds it to the post update.
Net result, every single post this morning has the site logo as an image, and it looks a right mess.
Question - how can I set the image variable to NULL (or equiv) so that it wont try to generate a thumbnail where one is not explicitly defined?
Thanks
(Every help search I make returns results explaining how to add a thumbail - I want to get rid of it!)
A slight workaround has been to define the thumbnail image as a 1x1 png file, which forces it to use that instead of grabbing the site logo off the linked webpage.
Would still prefer to find a way of forcing it to not use a thumbnail at all though - as was the default behaviour until a couple of days ago.

How to display pictures in the project resource?

I have a set of small icons and hope to display them in my application when certain condition occurs, for example on sunny day, I display the sunny icon.
I can add the jpg files in the picture, and they seem to be uploaded to phone when I deploy the app. However, I don't know how to access these jpgs in my program.
Could someone help? Thanks a lot!
Check this post about content and resources: http://www.windowsphonegeek.com/tips/wp7-working-with-images-content-vs-resource-build-action
To summarize: You should mark your images with a Build Action of Content or Resource, preferably Content. Now you can reference the Content from your Xaml or in code.
If the Build Action for your image resources is set to Content, then you just specify the Source property for the Image control to the relative path to your images:
this._image.Source = new BitmapImage(
new Uri("/Images/myImage.jpg", UriKind.Relative"));
You can display pictures using the Image element:
<Image Source="/MyImage.png" Visibility="Visible"/>
If you want to switch images according to conditions then you can create multiple images and change each of their Visibility states - or (more preferable) you can create a single image element and change its Source.
Quite how you do this depends on whether you are using databinding or working directly with the UIElements in code behind.

Resources