Search Results

Search found 5683 results on 228 pages for 'zend pdf'.

Page 59/228 | < Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >

  • How to create a route that catch all pdf file?

    - by VinnyG
    I want to have my pdf files sent this way to my users : public ActionResult GetPDF( string filename ) { return File( filename, "application/pdf", Server.HtmlEncode( filename ) ); } But I don't know how to create a route that will catch all the different pdf file in my site? Thanks a lot for the help!

    Read the article

  • Java: Reading a pdf file from URL into Byte array/ByteBuffer in an applet.

    - by Pol
    I'm trying to figure out why this particular snippet of code isn't working for me. I've got an applet which is supposed to read a .pdf and display it with a pdf-renderer library, but for some reason when I read in the .pdf files which sit on my server, they end up as being corrupt. I've tested it by writing the files back out again. I've tried viewing the applet in both IE and Firefox and the corrupt files occur. Funny thing is, when I trying viewing the applet in Safari (for Windows), the file is actually fine! I understand the JVM might be different, but I am still lost. I've compiled in Java 1.5. JVMs are 1.6. The snippet which reads the file is below. public static ByteBuffer getAsByteArray(URL url) throws IOException { ByteArrayOutputStream tmpOut = new ByteArrayOutputStream(); URLConnection connection = url.openConnection(); int contentLength = connection.getContentLength(); InputStream in = url.openStream(); byte[] buf = new byte[512]; int len; while (true) { len = in.read(buf); if (len == -1) { break; } tmpOut.write(buf, 0, len); } tmpOut.close(); ByteBuffer bb = ByteBuffer.wrap(tmpOut.toByteArray(), 0, tmpOut.size()); //Lines below used to test if file is corrupt //FileOutputStream fos = new FileOutputStream("C:\\abc.pdf"); //fos.write(tmpOut.toByteArray()); return bb; } I must be missing something, and I've been banging my head trying to figure it out. Any help is greatly appreciated. Thanks. Edit: To further clarify my situation, the difference in the file before I read then with the snippet and after, is that the ones I output after reading are significantly smaller than they originally are. When opening them, they are not recognized as .pdf files. There are no exceptions being thrown that I ignore, and I have tried flushing to no avail. This snippet works in Safari, meaning the files are read in it's entirety, with no difference in size, and can be opened with any .pdf reader. In IE and Firefox, the files always end up being corrupted, consistently the same smaller size. I monitored the len variable (when reading a 59kb file), hoping to see how many bytes get read in at each loop. In IE and Firefox, at 18kb, the in.read(buf) returns a -1 as if the file has ended. Safari does not do this. I'll keep at it, and I appreciate all the suggestions so far.

    Read the article

  • Can I use google API to convert a PDF into PNGs?

    - by Ken
    I have noticed that when you view PDFs in google docs the PDF viewer renders the PDF file into PNG images. I was wondering if you could use Google Data API to upload a PDF and get the URLs of the rendered PNG files? I have never used the google API or really had the extra time to learn it, but if it help me do this it will be well worth the extra time.

    Read the article

  • How to search a PDF in Acrobat Reader AND jump to a certain page via parameter?

    - by agez
    Hi, we are using lucene within a web application to search in a great number of PDF documents. The workflow is like this: A user enters a search term A list of search results is presented to the user. Each search result represents one PDF document and shows the user on which page the search term was found. Each of these pages is represented as a hyperlink. If the user now clicks on such a hyperlink, he directly jumps to that page. But now the user has the problem that the search term isn't highlighted on the page. Therefore the user has to look on his own to find the search term on the page. What we wanted is a way to highlight the search term on the specific page in the PDF. The open parameters for Acrobat Reader allow for either searching a PDF document (with hit highlighting) OR jumping to a specific page. But the combination of both parameters - which we would need - doesn't work. Does anyone have an idea how jumping to a page and highlighting a search term in a pdf document could work? I had a look at the Acrobat SDK but don't see how we can use it (it's terribly documented). Cheers, Helmut

    Read the article

  • Is there a straight forward way to append one PDF doc to another using iTextSharp?

    - by Danno
    I've scoured the Web looking for examples on how to do this. I've found a few that seem to be a little more involved then they need to be. So my question is, using iTextSharp, is there a fairly concise way to append one PDF document to another one? Optimally this would NOT involve a third file. Just open the first PDF doc, append the second PDF doc to the first and then close them both.

    Read the article

  • Why does my PDF ask for a password after being retrieved from Visual SourceSafe?

    - by Schnapple
    PREFACE: Yes we're moving away from VSS in the next few months. One of my web projects contains, as one of its files, a PDF. The PDF on our QA site is being pulled from VSS. A QA tester recently told me he's being prompted for a password when he tries to open it. VSS says the file I have on disk is different than the one it has, so I updated it, but afterwards it's still being shown as different. So basically VSS is mangling my PDF and the results are so wobbly that Adobe Acrobat Reader is confused and thinks it has a password. I've tried adding it as Auto-Detect and as Binary. Same results. Why does my PDF ask for a password after being retrieved from Visual SourceSafe and how can I prevent it?

    Read the article

  • Is it possible to render PDF (fPDF) via a javascript?

    - by J. LaRosee
    So, I'm passing some values via jQuery to the server, which generates PDF garble. It goes something like this: $.post('/admin/printBatch', data, // Some vars and such function(data){ if(data) { var batch = window.open('','Batch Print','width=600,height=600,location=_newtab'); var html = data; // Perhaps some header info here?! batch.document.open(); batch.document.write(html); batch.document.close(); $( this ).dialog( "close" ); // jQuery UI } else { alert("Something went wrong, dawg."); } return false; }); The output file looks roughly like so: $pdf->AddPage(null, null, 'A PDF Page'); //.... $pdf->Output('', 'I'); // 'I' sends the file inline to the browser (http://fpdf.org/en/doc/output.htm) What gets rendered to the browser window: %PDF-1.3 3 0 obj <> endobj 4 0 obj <> stream ... I'm missing something major, I just know it... thoughts? Thanks, guys.

    Read the article

  • Is there a way to write System.Drawing.Graphics to PDF from C#?

    - by Brett Ryan
    I have a whole bunch of 2D graphics that is being used for both rendering controls on screen and used to print, it's pretty custom graphics that couldn't be done by any 3rd party reporting tools or off the shelf controls. The program can generate PDF files of the printed content but when I wrote it I cheated and just print the Graphics object to an in memory image and then embed that into the PDF page. Since the users are emailing the documents they're finding they are too large. I've started writing the PDF from scratch using iText, however is there a way to get System.Drawing.Graphics content directly into PDF? The way iText works and Graphics works is completely different.

    Read the article

  • How do I turn a PDF email attachment to an image (jpg) in a PHP page?

    - by user351630
    Hi guys. Long time viewer, first time question asker. I'm trying to have my personal website parse through my mail box for attachments from a certain subscription list, and then be able to view the PDF attachments as images, preferably jpg. With the help of this: http://www.linuxscope.net/articles/mailAttachmentsPHP.html I'm currently using imap_base64() to decode the MIME data and create the PDF. However, I hate using PDF readers in general and I thought it would be a lot more streamlined if I could just view it as an image instead. I've heard for convert with ImageMagick, but would I need to actually write the PDF to a directory before using this, or can I convert somehow directly from the MIME data in the email? Thanks in advanced!

    Read the article

  • Take user input and write to file from javascript inside a pdf?

    - by dazedandconfused
    Is it possible to have a pdf file that asks a user a set of questions and then writes their answers to a file, then next time it is viewed loads those answers as default values? I know pdfs can include javascript and have figured out how to add javascript to a pdf with iText (http://itextpdf.com/) but don't know how to prompt for user input or write to a file from inside the pdf. Any help would be appreciated.

    Read the article

  • Microsoft repère un PDF malicieux qui exploite la faille d'Adobe Reader, Adobe pousse à appliquer so

    Mise à jour du 11/03/10 NB : Les commentaires sur cette mise à jour commencent ici dans le topic Un PDF malicieux exploite la faille d'Adobe Reader L'éditeur pousse à appliquer son patch sorti en urgence Un PDF malicieux circule actuellement. Il aurait réussi à télécharger un cheval de Troie sur les machines des utilisateurs qui n'ont pas encore appliqué le correctif publié il y a maintenant trois semaines par Adobe à ses produits Reader et Acrobat. Cette attaque exploite la faille...

    Read the article

  • AuthSub target path prefix does not match the provided "next" URL

    - by dweebsonduty
    I am trying to use the Gcal API in PHP. I am using the ZEND framework function getAuthSubUrl($company) { $next = "http://$company.mysite.com"; $scope = 'http://www.google.com/calendar/feeds/'; $secure = false; $session = true; return (Zend_Gdata_AuthSub::getAuthSubTokenUri($next, $scope, $secure, $session)); } $authSubUrl = getAuthSubUrl(); echo "<a href=\"$authSubUrl\">login to your Google account"</a> I am not sure what I am doing wrong here. I am following the google example almost exactly. They do have $next = getCurrentUrl(); in their expample but I am getting undefined errors when I try that.

    Read the article

  • Zend_Navigation failing to load

    - by Grant Collins
    Hi, Following on from my earlier question, I am still having issues with loading the xml file into Zend_Navigation. I am now getting the following error message: <b>Fatal error</b>: Uncaught exception 'Zend_Navigation_Exception' with message 'Invalid argument: Unable to determine class to instantiate' in C:\www\mysite\development\website\library\Zend\Navigation\Page.php:223 I've tried to make my navigation.xml file look similar to the example on the Zend Documentation, However I just can't seem to get it to work. My XML file looks like this: <?xml version="1.0" encoding="UTF-8"?> <configdata> <navigation> <default> <label>Home</label> <controller>index</controller> <action>index</action> <module>default</module> <pages> <tour> <label>Tour</label> <controller>tour</controller> <action>index</action> <module>default</module> </tour> <blog> <label></label> <uri>http://blog.mysite.com</uri> </blog> <support> <label>Support</label> <controller>support</controller> <action>index</action> <module>default</module> </support> </pages> </default> <users> <label>Home</label> <controller>index</controller> <action>index</action> <module>users</module> <role>guser</role> <resource>owner</resource> <pages> <jobmanger> <label>Job Manager</label> <controller>jobmanager</controller> <action>index</action> <module>users</module> <role>guser</role> <resource>owner</resource> </jobmanger> <myaccount> <label>My Account</label> <controller>profile</controller> <action>index</action> <role>guser</role> <resource>owner</resource> <module>users</module> <pages> <detail> <label>Account Details</label> <controller>profile</controller> <action>detail</action> <module>users</module> <role>guser</role> <resource>owner</resource> <pages> <history> <label>Account History</label> <controller>profile</controller> <action>history</action> <module>users</module> <role>guser</role> <resource>owner</resource> </history> <password> <label>Change Password</label> <controller>profile</controller> <action>changepwd</action> <module>users</module> <role>employer</role> <resource>employers</resource> </password> </pages> </detail> ... </navigation> </configdata> Now I confess that I've totally got the wrong end of the stick with this, but rapidly running out of ideas, and it's been a long week. Thanks, Grant

    Read the article

  • Strategy for storing and displaying form dropdown data for provinces, states, prefixes?

    - by meder
    I'm currently migrating from a class that stores lists of countries, states & provinces in the form of arrays to using Zend's Locale data in the form of ldml xml files. These ldml files provide localised lists of countries, currencies, languages - so I'm not exactly sure where I should store US States, ( Canadian Provinces ), Prefixes - I was thinking possibly just create a generic xml file and store it in the same directory as the ldml files, but having doubts because it wouldn't really be localised as I'd store it in English. Should I go with storing it in a generic xml file, or possibly update each of the locale files ( eg en.xml ) and append them? The latter is probably not worth the work, which is why I'm swaying towards just a general.xml or dropdown-data.xml. As for generating dropdown options, I suppose I could just say, grab all US states, append the array with Canadian provinces, and append that with an 'Other' option - does this seem like the right way to go about?

    Read the article

  • Mysql adapter for Zend_Translate

    - by Peter
    Hi everybody, I'm currently in the planning phase of a rather large project that I'll develop in the Zend Framework. One of the problems I'm facing is that the customers will want to translate not only the content but also the interface. I'm currently using gettext and poedit to manage my language files but this is not an option for the customer as they, for one, want have FTP access to the site. Hence, I'm thinking of a mysql back end with an interface in the front end for the customer to manage his own translations of the interface. There is however still no mysql adapater for Zend_Translate. So, does anybody now of an adapter script for Zend_Translate so it can work with a mysql table? Or any arguments against using mysql and possible other solutions for this problem?

    Read the article

  • Optimising (My)SQL Query

    - by Simon
    I usually use ORM instead of SQL and I am slightly out of touch on the different JOINs... SELECT `order_invoice`.*, `client`.*, `order_product`.*, SUM(product.cost) as net FROM `order_invoice` LEFT JOIN `client` ON order_invoice.client_id = client.client_id LEFT JOIN `order_product` ON order_invoice.invoice_id = order_product.invoice_id LEFT JOIN `product` ON order_product.product_id = product.product_id WHERE (order_invoice.date_created >= '2009-01-01') AND (order_invoice.date_created <= '2009-02-01') GROUP BY `order_invoice`.`invoice_id` The tables/ columns are logically names... it's an shop type application... the query works... it's just very very slow... I use the Zend Framework and would usually use Zend_Db_Table_Row::find(Parent|Dependent)Row(set)('TableClass') but I have to make lots of joins and I thought it'll improve performance by doing it all in one query instead of hundreds... Can I improve the above query by using more appropriate JOINs or a different implementation? Many thanks.

    Read the article

  • How to change Zend_Db_Table name within a Model to insert in multiple tables

    - by jwhat
    Using Zend Framework, I've created a Model to insert a record into a database. My question is, after $this->insert($data) how can I switch the active table so that I can insert a record into another table? Here's my code so far: class Model_DbTable_Foo extends Zend_Db_Table_Abstract { protected $_name = 'foo'; public function addFoo($params) { $data = array( 'foo' => $params['foo'], ); $this->insert($data); $foo_id = $this->getAdapter()->lastInsertId(); $data2 = array( 'bar' => $params['bar'] ); // I need to change the Db Table name here. $this->insert($data2); $bar_id = $this->getAdapter()->lastInsertId(); } }

    Read the article

  • Modules and custom routes

    - by Dennis Haarbrink
    I'm building a website using Zend Framework and having trouble implementing modules and custom routes. There are basically two rules: Select a module based on the domain (multiple domains can select a single module) Regardless of domain, select one specific module based on path Examples: domain1.com selects module domain1 domain1.net selects module domain1 domain2.com selects module domain2 both domain1.com/admin and domain2.com/admin select module admin This is the first project where I use ZF, so my experience with the framework is basically non-existent. I have done some dirty hacking in my bootstrapper where I check the domain and than execute Zend_Layout::startMVC() to get the correct layout, but that is messed up when I'm implementing custom routes. So I was wondering what is the best way to go about implementing this?

    Read the article

  • How can I generate XML application configuration using Zend_Tool?

    - by wimvds
    When creating a new project using zf create project myproject it will create a default project layout with an application.ini in the configs folder. Where can I change these default settings so that it generates (and uses) an XML file (application.xml)? I've looked at the documentation for Zend_Tool (http://framework.zend.com/manual/en/zend.tool.html), but there seems to be no information on how to do this. And suppose you'd like to use a different default folder layout (ie. use htdocs instead of public as your document root), is there a way to specify this as well? Any pointers to relevant information (btw I've looked at the Quickstart, nothing relevant is mentioned there unless I'm overlooking it)? edit I already tried creating a profile (stored in .zf/project/profiles), and used that to create a project (using zf create project myproject myprofile) but that doesn't change anything, even though the .zfproject.xml file in the root of the new project does contain the <applicationConfigFile type="xml"/> setting... The new project contains this (as you can see, it's just the default settings, only the type of applicationConfigFile has been changed) : <?xml version="1.0"?> <projectProfile type="default" version="1.10"> <projectDirectory> <projectProfileFile filesystemName=".zfproject.xml"/> <applicationDirectory classNamePrefix="Application_"> <apisDirectory enabled="false"/> <configsDirectory> <applicationConfigFile type="xml"/> </configsDirectory> <controllersDirectory> <controllerFile controllerName="Index"> <actionMethod actionName="index"/> </controllerFile> <controllerFile controllerName="Error"/> </controllersDirectory> <formsDirectory enabled="false"/> <layoutsDirectory enabled="false"/> <modelsDirectory/> <modulesDirectory enabled="false"/> <viewsDirectory> <viewScriptsDirectory> <viewControllerScriptsDirectory forControllerName="Index"> <viewScriptFile forActionName="index"/> </viewControllerScriptsDirectory> <viewControllerScriptsDirectory forControllerName="Error"> <viewScriptFile forActionName="error"/> </viewControllerScriptsDirectory> </viewScriptsDirectory> <viewHelpersDirectory/> <viewFiltersDirectory enabled="false"/> </viewsDirectory> <bootstrapFile filesystemName="Bootstrap.php"/> </applicationDirectory> <dataDirectory enabled="false"> <cacheDirectory enabled="false"/> <searchIndexesDirectory enabled="false"/> <localesDirectory enabled="false"/> <logsDirectory enabled="false"/> <sessionsDirectory enabled="false"/> <uploadsDirectory enabled="false"/> </dataDirectory> <docsDirectory> <file filesystemName="README.txt"/> </docsDirectory> <libraryDirectory> <zfStandardLibraryDirectory enabled="false"/> </libraryDirectory> <publicDirectory> <publicStylesheetsDirectory enabled="false"/> <publicScriptsDirectory enabled="false"/> <publicImagesDirectory enabled="false"/> <publicIndexFile filesystemName="index.php"/> <htaccessFile filesystemName=".htaccess"/> </publicDirectory> <projectProvidersDirectory enabled="false"/> <temporaryDirectory enabled="false"/> <testsDirectory> <testPHPUnitConfigFile filesystemName="phpunit.xml"/> <testApplicationDirectory> <testApplicationBootstrapFile filesystemName="bootstrap.php"/> </testApplicationDirectory> <testLibraryDirectory> <testLibraryBootstrapFile filesystemName="bootstrap.php"/> </testLibraryDirectory> </testsDirectory> </projectDirectory> </projectProfile>

    Read the article

  • How to optimize indexing of large number of DB records using Zend_Lucene and Zend_Paginator

    - by jdichev
    So I have this cron script that is deployed and ran using Cron on a host and indexes all the records in a database table - the index is later used both for the front end of the site and the backed operations as well. After the operation, the index is about 3-4 MB. The problem is it takes a lot of resources (CPU: 30+ and a good chunk of memory) and slows the machine down. My question is about how to optimize the operation described below: First there is a select query built using the Zend Framework API, this query is then passed to a Paginator factory that returns a paginator which I am using to balance the current number of items being indexed and not iterate over too much items. The script is iterating over the current items in the paginator object using a foreach loop until reaching the end and then it starts from the beginning after getting items for the next page. I am suspecting this overhead is caused by the Zend_Lucene but no idea how this could be improved.

    Read the article

  • zend studio 5.5.1 on windows xp - won't open!

    - by esther h
    I have been using zend studio 5.5.1 for the last year and and a half (on windows xp), with some occasional issues, such as a blank error dialog box when I started the program, but always went away when i restarted my computer, and usually got messages about javaw.exe errors. But now, the program does not open at all. What happens is, I get a little dialog that says Loading project - this is normal... but then, nothing. The zend program item is sitting in the taskbar, but when i click on it - nothing! there is nothing to show. i can right click and press close, but that is all. restarting computer did not help. i just uninstalled it, downloaded again from zend website, and reinstalled. tried opening - get loading box, seems to have loaded, even got tip of the day box. but there is nothing showing behind them. once i closed the tip box, i dont have any indication that zend is open besides the program item in the taskbar. windows task manager says it is running... anyone have a clue? help!!! thanks

    Read the article

< Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >