I want to display a pdf in a webview, but the chrome pdf plugin only shows a blank/grey rectangel.
Am I missing a permission in my manifest.json?
Ok, it looks like that if the width of the webview is set to a high value (in my case I set it to 10000) the pdf renders only a grey rectangel. Resetting the width to a more sane value brings back the pdf.
Related
I have PDF , to view that pdf i have used document viewer
var viewer = Ti.UI.iOS.createDocumentViewer({
url:"Barcode.pdf",
height:'100%',
bottom:0
});
viewer.show();
The pdf will be displayed as center, top as title bar, but bottom as empty, I am unable to set the height as 100%. I have also used Ti.UI.FILL but still no use. Can any one please share the ideas.
Thanks in Advance,
Swathi.
Your example is correct. The height of your viewer component is filling the height of the parent component.
The issue you have is related to the specific pdf document you're using. I don't know which is the ratio (width/height) of your document, but if it's greater then your device screen ratio you will have something like this:
If you try to zoom in then the entire screen of your device will be used!
Only in two cases the entire screen will be completely used:
if the document ratio is smaller then the screen ratio (try with a document with a very small width)
if the document has many pages
If you are in the first case (document ratio > device screen ratio) and you want to have a well designed page then I suggest to just center the DocumentViewer instead of setting the height to 100%
I would like to display descriptive text, next to each image in a Colorbox gallery. I can give sufficient width to get me space around the image using the colorbox parameter 'width' and change some CSS to get the space to the left of the image. Now, I want to place text in the white space. All the content is generated dynamically but that does not matter for this question as the colorbox code itself is generated using PhP.
Any ideas of doing this without changing the colorbox JS code?
I use Hiero, java version, because I want to create fonts for CCLabelBMFont.
However, due to my game being on retina display, my font images are big, and they require more than one page. Cocos2d only supports one.
So, essentially, how can I produce bigger pages (canvases)? I don't think Hiero has that feature.
Click on Glyph cache radio button. Then adjust Page width and Page height until it says Pages: 1. Then change the font size to the size you want. Re-adjust page width/height if the new font size increases the number of pages.
p/s: Make sure you adjust page width/height before increasing the size. Hiero will freak out if you suddenly change to a large size without changing the page width/height, and stop displaying the sample rendering. If that happens, you have to close and restart Hiero.
This is with reference to this thread How to make a pdf printout occupy the entire A4 page.
I am able to bring all the content into a single page, but even if I set the printer preferences to landscape format, it doesn't print it.
What could be the problem?
Are you setting the orientation attribute of the tag? That attribute controls the orientation of the page, and you should set it to landscape.
From the Seam documentation
orientation — The orientation of the
page. Valid values are portrait and
landscape. In landscape mode, the
height and width page size values are
reversed.
I'm working on a split view application that is used to view PDF files in a webView. Right now I am able to get three PDF's loaded to the app, and have their titles displayed in the table in the RootView. I'm able to select them and have them displayed to the DetailView, however the sizing the of PDF isn't what I want it to be.
My hope is that the PDF will take up the whole screen and will resize itself to fit the screen if it is too large or too small. One PDF I have is too large and I have to scroll left or right to view the sides of the file, another I have is too small, it isn't centered and instead pushed to the left side of the screen and the empty side on right is filled in with black.
How do I make it so that the PDF's size themselves correctly to fit the whole screen and have even margins on the sides?
Thanks in advance!
Lots of PDF questions on SO today. Sounds like you may have to abandon the webview and go to a tiledlayer CGPDFDocument route. Check out the answer I just posted at Reading text and images from a pdf document in iOS