A Good Example Needed
See original GitHub issueI’m trying to use your application to make a widget for Yii Framework, but I can’t find where is my mistake once the pdf.js is compiled…
Steps I did:
- compiled to obtain the “build” folder
- moved th complete “build” folder where the Yii Framework needs
- borrowed and renamed view.html to .php
- I did the steps needed to work in a view in the Yii’s model (I’ll not boring you with technical stuff)
- the “pseudo” header of that view says:
<link rel="resource" type="application/l10n" href="<?php echo Yii::app()->request->baseUrl.'/js/pdf/web/';?>locale.properties"/>
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl.'/js/pdf/web/';?>viewer.css"/>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl.'/js/pdf/build/pdf.js';?>"></script>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl.'/js/pdf/web/viewer.js';?>"></script>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl.'/js/pdf/web/l10n.js';?>"></script>
<script type="text/javascript">
var kDefaultURL = 'http://ps/prensa/PDF/queiroz_Mandarn_El.pdf';
var kImageDirectory = '<?php echo Yii::app()->request->baseUrl.'/js/pdf/web';?>/images/';
[... the blablabla from viewer.html]
- I rem’ed the lines where these vars are defined in “viewer.js” to get the file I need to render (next these will be replaced for php’s vars in run time)
PROBLEM TypeError: mozL10n is undefined http://ps/js/pdf/web/viewer.js Line 2634
I realized than a lot of “include” are replaced for “pdf.js” as you can see in the code above, but… 😦
I have no clue where to fix to get a “viewer” such as your “full example”, which I think it is very nice 😃
I’d very much like to contribute (almost in documentation), or other Yii Coders (in implementations or integration) if I can solve that and then I’ll shared to the Yii Comunity…
Issue Analytics
- State:
- Created 11 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Good Example Quotes - BrainyQuote
Few things are harder to put up with than the annoyance of a good example. Share this Quote · Mark Twain · A...
Read more >good needs | English examples in context - Ludwig
High quality example sentences with “good needs” in context from reliable sources - Ludwig is the linguistic search engine that helps you to...
Read more >The best 500 needed sentence examples - YourDictionary
The most voted sentence example for needed is Maybe they all needed to know. ... He needed the reminder of the good in...
Read more >14 Examples of Needs and Wants - Simplicable Guide
14 Examples of Needs and Wants · Personal Needs · Personal Needs · Activities · Social Needs · Life Events · Life Decision...
Read more >10 Qualities of a Good Employee (With Examples) | Indeed.com
3. Reliability · Showing up to work-related events · Coming to work on time · Consistently meeting deadlines · Producing high-quality work ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
mozL10n defined in l10n.js. Is there a reason why you placed it after viewer.js?
thanks 😄