Search Results

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

Page 70/228 | < Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >

  • Drawing a PDF Right-Side-Up in CGContext

    - by Carter Allen
    I'm overriding the drawRect: method in a custom UIView, and I'm doing some custom drawing. All was going well, until I needed to draw a PDF resource (a vector glyph, to be precise) into the context. First I retrieve the PDF from a file: NSURL *pdfURL = [NSURL fileURLWithPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"CardKit.bundle/A.pdf"]]; CGPDFDocumentRef pdfDoc = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL); CGPDFPageRef pdfPage = CGPDFDocumentGetPage(pdfDoc, 1); Then I create a box with the same dimensions as the loaded PDF: CGRect box = CGPDFPageGetBoxRect(pdfPage, kCGPDFArtBox); Then I save my graphics state, so that I don't screw anything up: CGContextSaveGState(context); And then I perform a scale+translate of the CTM, theoretically flipping the whole context: CGContextScaleCTM(context, 1.0, -1.0); CGContextTranslateCTM(context, 0.0, rect.size.height); I then scale the PDF so that it fits into the view properly: CGContextScaleCTM(context, rect.size.width/box.size.width, rect.size.height/box.size.height); And finally, I draw the PDF and restore the graphics state: CGContextDrawPDFPage(context, pdfPage); CGContextRestoreGState(context); The issue is that there is nothing visible drawn. All this code should theoretically draw the PDF glyph into the view, right? If I remove the scale+translate used to flip the context, it draws perfectly: it just draws upside-down. Any ideas?

    Read the article

  • R plotting multiple histograms on single plot to .pdf as a part of R batch script

    - by Bryce Thomas
    I am writing R scripts which play just a small role in a chain of commands I am executing from a terminal. Basically, I do much of my data manipulation in a Python script and then pipe the output to my R script for plotting. So, from the terminal I execute commands which look something like $python whatever.py | R CMD BATCH do_some_plotting.R. This workflow has been working well for me so far, though I have now reached a point where I want to overlay multiple histograms on the same plot, inspired by this answer to another user's question on Stackoverflow. Inside my R script, my plotting code looks like this: pdf("my_output.pdf") plot(hist(d$original,breaks="FD",prob=TRUE), col=rgb(0,0,1,1/4),xlim=c(0,4000),main="original - This plot is in beta") plot(hist(d$minus_thirty_minutes,breaks="FD",prob=TRUE), col=rgb(1,0,0,1/4),add=T,xlim=c(0,4000),main="minus_thirty_minutes - This plot is in beta") Notably, I am using add=T, which is presumably meant to specify that the second plot should be overlaid on top of the first. When my script has finished, the result I am getting is not two histograms overlaid on top of each other, but rather a 3-page PDF whose 3 individual plots contain the titles: i) Histogram of d$original ii) original - This plot is in beta iii) Histogram of d$minus_thirty_minutes So there's two points here I'm looking to clarify. Firstly, even if the plots weren't overlaid, I would expect just a 2-page PDF, not a 3-page PDF. Can someone explain why I am getting a 3-page PDF? Secondly, is there a correction I can make here somewhere to get just the two histograms plotted, and both of them on the same plot (i.e. 1-page PDF)? The other Stackoverflow question/answer I linked to in the first paragraph did mention that alpha-blending isn't supported on all devices, and so I'm curious whether this has anything to do with it. Either way, it would be good to know if there is a R-based solution to my problem or whether I'm going to have to pipe my data into a different language/plotting engine.

    Read the article

  • Nested table height in TCPDF

    - by Kuroki Kaze
    Is it possible to make nested table fit height of its parent cell in TCPDF? My code: <?php require_once('tcpdf/config/lang/eng.php'); require_once('tcpdf/tcpdf.php'); $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); $pdf->SetFont('times', 'BI', 8); $pdf->AddPage(); $pdf->writeHTML('<table> <tr><td bgcolor="gray"> Angoisse et vif espoir, sans humeur factieuse.<br/> Plus allait se vidant le fatal sablier,<br/> Plus ma torture était âpre et délicieuse;<br/> Tout mon coeur s’arrachait au monde familier</td> <td bgcolor="lightgray">Second</td> <td bgcolor="gray">Third</td> <td> <table style="height: 100%"> <tr bgcolor="blue" style="height: 30%"><td bgcolor="yellow" style="height: 30%">Ichi</td></tr> <tr bgcolor="white" style="height: 30%"><td bgcolor="cyan" style="height: 30%">Ni</td></tr> <tr bgcolor="blue" style="height: 30%"><td bgcolor="yellow" style="height: 30%">San</td></tr> </table> </td></tr> </table>'); $pdf->Output('example_002.pdf', 'I'); ?> I want table in last cell to fill it entirely. Is there any way to do this?

    Read the article

  • Help in alignment in HTML2pdf..

    - by piemesons
    I am having a html page with no style attribute.HTML tags i am using are "center,line break tag, bold tag".Html page doesnot contain any table. its a simple document.I need help for:- Adding margin of 1 inch on all sides of the pdf file. I want to start every para with space of two tabs. ("&nbsp" generate space in html file but not in pdf file.) Code i am using:-- ob_start(); // start buffering and displaying page echo 'All the content i m fetching according my requirements'; $file_name_string=substr($guid, 0, 8); $file_name=$file_name_string.".htm"; file_put_contents($file_name, ob_get_contents()); // end buffering and displaying page ob_end_flush(); $output_file=$file_name_string.".pdf"; require('html2fpdf.php'); $pdf=new HTML2FPDF(); $pdf->SetFont('Arial','B',12); $pdf->AddPage(); $fp = fopen($file_name,"r"); $strContent = fread($fp, filesize($file_name)); fclose($fp); $pdf->WriteHTML($strContent); $pdf->Output($output_file); EDIT ANybody who can help me....

    Read the article

  • How do I overwrite a file currently being read by Python

    - by Brian
    Hi guys, I am not too sure the best way to word this, but what I want to do, is read a pdf file, make various modifications, and save the modified pdf over the original file. As of now, I am able to save the modified pdf to a separate file, but I am looking to replace the original, not create a new file. Here is my current code: from pyPdf import PdfFileWriter, PdfFileReader output = PdfFileWriter() input = PdfFileReader(file('input.pdf', 'rb')) blank = PdfFileReader(file('C:\\BLANK.pdf', 'rb')) # Copy the input pdf to the output. for page in range(int(input.getNumPages())): output.addPage(input.getPage(page)) # Add a blank page if needed. if (input.getNumPages() % 2 != 0): output.addPage(blank.getPage(0)) # Write the output to pdf. outputStream = file('input.pdf', 'wb') output.write(outputStream) outputStream.close() If i change the outputStream to a different file name, it works fine, I just cant save over the input file because it is still being used. I have tried to .close() the stream, but it was giving me errors as well. I have a feeling this has a fairly simple solution, I just haven't had any luck finding it. Thanks!

    Read the article

  • Google Books Downloader Downloads Google Books to PDF and JPG

    - by Jason Fitzpatrick
    If you’re looking for a way to download and format shift books and magazines found in Google Books, Google Books Downloader can help. Google Books Downloader takes what you can see in Google Books and downloads it either as a PDF file or as a series of JPGs. The key to using Google Books Downloader successfully is to understand that it can only download what you can see sitting at your computer. It isn’t tapping into some secret back-end resource at Google to siphon books down; it is simply converting the pages you see that are “stuck” in Google Books into a format you can use elsewhere. As such you can download the entire book if it is marked “Full Preview”, part of the book if it is marked “Preview” (useful if you’re trying to save pages for a research project and don’t need the whole book), and none of the book if it is only “Snippet View”. The process works on anything you can find in Google Books including magazines. Google Books Downloader is free, Windows only. Google Books Downloader [via Addictive Tips] How To Encrypt Your Cloud-Based Drive with BoxcryptorHTG Explains: Photography with Film-Based CamerasHow to Clean Your Dirty Smartphone (Without Breaking Something)

    Read the article

  • PDF to Image Conversion in Java

    - by Geertjan
    In the past, I created a NetBeans plugin for loading images as slides into NetBeans IDE. That means you had to manually create an image from each slide first. So, this time, I took it a step further. You can choose a PDF file, which is then automatically converted to an image for each page, each of which is presented as a node that can be clicked to open the slide in the main window. As you can see, the remaining problem is font rendering. Currently I'm using PDFBox. Any alternatives that render font better? This is the createKeys method of the child factory, ideally it would be replaced by code from some other library that handles font rendering better: @Override protected boolean createKeys(List<ImageObject> list) { mylist = new ArrayList<ImageObject>(); try { if (file != null) { ProgressHandle handle = ProgressHandleFactory.createHandle( "Creating images from " + file.getPath()); handle.start(); PDDocument document = PDDocument.load(file); List<PDPage> pages = document.getDocumentCatalog().getAllPages(); for (int i = 0; i < pages.size(); i++) { PDPage pDPage = pages.get(i); mylist.add(new ImageObject(pDPage.convertToImage(), i)); } handle.finish(); } list.addAll(mylist); } catch (IOException ex) { Exceptions.printStackTrace(ex); } return true; } The import statements from PDFBox are as follows: import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDPage;

    Read the article

  • PHP ZendOptimizer on Red Hat Enterprise Linux

    - by Jacob Kristensen
    I would like to install FlashMoto and the requirements are not unreasonable: PHP 5.2.1 or higher, Zend Optimizer 3.3 or higher. However my RHEL 5.4 provides me with PHP 5.1.6. So I tried the remi repository http://rpms.famillecollet.com/ but it gave me PHP 5.3.1 and Zend Optimizer from zend.com does not support anything higher than 5.2.x. I also tried the dag repo but it does not have PHP in any version. I also tried some RPMs that Oracle provides on their homepage but they don't provide php-mbstring that I also need. Does anyone know how to get PHP 5.2.1 installed on a RHEL 5.4? Then I can probably fix install the Zend thing. Thanks in advance.

    Read the article

  • How to solve "command not found" on Ubuntu bash shell?

    - by redcoder
    I am very new to Ubuntu, struggling to find the proper command to install Zend Server on my Ubuntu 9.10 Server. After downloading the ZF Server and extracting it, I try to run this command: install_zs.sh 5.3 This is the ls of the extracted ZF archive: install_zs.sh README upgrade_zs_php.sh zend.deb.repo zend.rpm.repo But it says command not found. Any idea?

    Read the article

  • ubuntu bash shell

    - by redcoder
    hi, i am very new to ubuntu.... struggling to find the proper command to install Zend Server on my Ubuntu9.10 Server. After downloading the ZF Server and extracted, i try to run this command install_zs.sh 5.3 This is the ls of the extracted ZF archive install_zs.sh README upgrade_zs_php.sh zend.deb.repo zend.rpm.repo But it says command not found ... any idea ?

    Read the article

  • php-cgi.exe Taking out server, multiple running

    - by Alex
    I have been using ZendServer CE for over a year and have never had a problem. Recently, about a week or two ago I have found my server to be acting up and even causing RDP to be un-connectable. After some looking around I have 20, 25, 30+ php-cgi.exe running. With my IIS7 service starting with Windows once my server started all these php-cgi.exe would start running (even though the limit is 10) and I could not even connect to it. After disabling the Web Server as startup which stops php-cgi.exe from running the server runs flawless, like it always has. As soon as I run the web server all these odd issues start. I have a post over at Zend http://forums.zend.com/viewtopic.php?f=44&t=41043&p=95133 where I was told to update my Zend install. After doing so this issue has not gone away. Even running 1 php-cgi.exe (somehow 2 start anyway) the server begins to go silly. The first issue I find myself with running php-cgi.exe is that Windows Services, weather be stock or using FireDaemon begin to lag, slow start, crash, etc. If anyone can help me with this I would GREATLY appreciate it. At this time I am forced to look for a alternative to running PHP other than cgi as it simply takes out the whole box. On another note, I run this same version of Zend on a similar server with no issues. Starting to think its a IIS issue. (UPDATE) Installed newest version of PHP, separate from Zend, same issue. Server Specs: Intel Xeon Quad w HT Nehlam Based 24GB DDR3 1333 2x1TB Raid Mirror OS 2x1TB Raid Mirror (Other) 4x2TB Raid 5 (Storage) Server 2008 R2

    Read the article

  • SQL SERVER – Free eBook Download – EPUB, MOBI, PDF Format

    - by pinaldave
    Microsoft has released recently free eBooks on various Microsoft Technology. The best part is that all these books are available in ePub, Mobi and PDF. You can download them to your local machine or eBook reader and read them. This is a great start as many important subjects are now covered and converted into an eBook. I personally read through a few of the books and found they are very comprehensive and and detailed. The goal is not to cover complete technology in a single book but rather pick a single topic and discuss it in detail. The source of the book is white paper, Technet wiki as well book online and it is clearly listed right bellow the book title. Following are the books available for SQL Server Technology and I encourage all of you to have a look at them as they are great resources. Master Data Services Capacity Guidelines Microsoft SQL Server AlwaysOn Solutions Guide for High Availability and Disaster Recovery Microsoft SQL Server Analysis Services Multidimensional Performance and Operations Guide QuickStart: Learn DAX Basics in 30 Minutes SQL Server 2012 Transact-SQL DML Reference You can download above eBooks from here. This is indeed a great attempt as each book talks about the a single subject in depth keeping author focus on the single and simple subject. I have previously written two books by focusing on the same subject and I had great pleasure writing it as well. Writing on focus subjects gives complete freedom to author to explore the a single subject without having burden to cover everything which is associated with that technology at large. Just like eBooks mentioned earlier my SQL Server Wait Stats was inspired from my article series on SQL Wait Stats. The latest book SQL Server Interview Question and Answers was derived from my article series on SQL Interview Q and A. Writing book is an absolutely different concept than writing blog posts. When I was converting my blog posts to books, I ended up writing 50% new material and end up removing many repetitive content which shows up in blog series. It was indeed fun to focused book at the same time it was a great learning experience as an individual. Reference: TechNet Wiki, Pinal Dave (http://blog.SQLAuthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Documentation, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • iPhone SDK Zoom and refresh PDF with Quartz

    - by Ben
    Looking at the QuartzDemo sample application, I love the speed of the PDF rending using quartz alone (that is, without using uiwebview). However, when I'm zooming in the PDF it doesn't seem to become more clear like it does in PDF view. Is there something that I can change to have the same effect when zooming in and out using multitouch? like manipulate the PDF transformation matrix or something? Thanks a bunch. --Ben

    Read the article

  • how i can add watermark to existing pdf file using php

    - by Yasir
    i am in need to add watermark to existing pdf file using php i have google that but could't find any library. i found fpdf library that preview thumbnail of pdf file i don't know it add watermark to existing pdf file or not any one can suggest php library ? than show preview and add watermark to existing pdf file ?

    Read the article

  • Show pdf in the browser in asp.net mvc

    - by Pankaj
    I have a tab on my page, when i click on this tab, i need to show a pdf file on page(browser). For this i am writing function on control like this public ActionResult PricedPdf(string projID,string fileName) { byte[] bArr = new byte[] { }; bArr =getdata(); return File(bArr, System.Net.Mime.MediaTypeNames.Application.Pdf, fileName+".pdf"); } Now my problem is when i render this, page only show some unreadable data not pdf.

    Read the article

  • Convert in-memory pdf to byte[]

    - by daft
    I'm writing a websercive in C# that will generate pdf-files and send back to the caller as a byte[]. The pdf file is generated using a third party component, but I'm struggling with the conversion. The pdf is just an in-memory object in the web service, and I can't find any good way of converting the generated pdf to a byte[] before returning it to the caller. Any advice on this?

    Read the article

  • javascript ajax save opened pdf

    - by Jovo Krneta
    I was wondering if I could open a pdf in new browser window ,sign it with a smart card ,save it (without file download) and send it back (upload from new browser window ) by using javascript,ajax and php.I can also use javascript inside pdf(call javascript inside pdf). I was thinking something like getElementsByTagName('body')[0].innerHTML of a pdf document, then pass this to php using ajax and saving to server.Can I do this...

    Read the article

  • Render SSRS .RDL to PDF and just open it.

    - by FelipeFiali
    I tried to be the most descriptive I could. Ok, so since I've never done anything like this before, I guess it's better to ask before starting at all to just don't get the whole process wrong. We have a report that has to be called from an ASP.NET application, it could be a simple button. Through the code-behind, I gotta pass in a paramater, render the report, and don't save it anywhere, just open it to the user, as a .pdf file so he could save or print it. So please, give me links or tips, I'm reading MSDN documentation right now... If you have any suggestion on other technologies, as for the report, I'd like to hear it, but it has to be called from ASP.NET. Thanks in advance!

    Read the article

  • How to set dojo theme correctly using zend framework and Google CDN?

    - by Nazariy
    I'm trying to add Dojo Toolkit to Zend Framework application, in my Bootstrap.php I defined following settings: protected function _initDoctype() { $this->bootstrap('view'); $view = $this->getResource('view'); Zend_Dojo::enableView($view); $view->doctype('XHTML1_STRICT'); $view ->headLink() ->appendStylesheet('/assets/css/global.css') ; $view ->dojo() ->enable() ->setCdnVersion('1.5') ->addStyleSheetModule('dijit.themes.claro') ; } All JavaScript functionality included correctly and working fine, however styling of forms and other widgets looks incomplete, no background,no images and no text styles, just basic layout defined. Did I missed something here?

    Read the article

  • What is the autoload class names structure, for the root "library" dir in a Zend Framework 1.10.2 pr

    - by Doron
    I have a project I created with Zend Framework 1.10.2. I usually use the application/models directory for new model files I create, and the auto loading is fine, so for example - My_Model_SampleClass is located application/models/SampleClass.php. However, I have just created a custom Exception class, and it does not fit in the models directory inside the application dir (at least the way I see it, I could be logically wrong), so I've created it in the root "library" dir, but I can't seem to find the correct class name + file name to use, so auto loading will be done correctly. BTW, I use a namespace for all custom classes I use, let's assume it's "My".

    Read the article

  • How to change line thickness in iText? (iText is Java pdf framework)

    - by drasto
    I'm drawing images to pdf using Java framework iText. I need to draw lines of specified width. There is a method setLineWidth(float width) in class PdfContentByte that should change it. However no matter what value I pass as its parameter the lines drawn are always extra thin. There is following line in javadoc of setLineWidth: The line width specifies the thickness of the line used to stroke a path and is measured in user space units. I don't know what is "space unit". Everything else in iText seems to be measured in point(around 1/72 inch). I cant find any reference to what are those "space units" and how to change them. code: to.setLineWidth(thickness); to.moveTo(x, y); to.lineTo(x + 100, y + 100);

    Read the article

  • Routing zend request through a default controller when controller not found.

    - by Brett Pontarelli
    Below is a function defined in my Bootstrap class. I must be missing something fundamental in the way Zend does routing and dispatching. What I am trying to accomplish is simple: For any request /foo/bar/* that is not dispatchable for any reason try /index/foo/bar/. The problem I'm having is when the FooController exists I get Action "foo" does not exist. Basically, the isDispatchable is always false. public function run() { $front = Zend_Controller_Front::getInstance(); $request = $front->getRequest(); $dispatcher = $front->getDispatcher(); //$controller = $dispatcher->getControllerClass($request); if (!$dispatcher->isDispatchable($request)) { $route = new Zend_Controller_Router_Route( ':action/*', array('controller' => 'index') ); $router = $front->getRouter(); $router->addRoute('FallBack', $route); } $front->dispatch(); }

    Read the article

  • How to set up virtual hosts properly on a windows machine using Zend Community CE ?

    - by Scott F
    I have set up Zend Server CE on a windows machine and am having the hardest time setting up virtual hosts. No matter what I do, links on my local machine are showing "localhost" in the path causing all images and links to not work properly. I have the following in my vhosts file and while the site loads up, most links show "local host in them". Please help. NameVirtualHost *:80 DocumentRoot D:\zend_server_ce\Apache2\htdocs\domain.dev ServerName www.domain.dev ServerAlias www.domain.dev *.domain.dev domain.dev UseCanonicalName Off #CustomLog D:\zend_server_ce\Apache2\htdocs\domain.dev\logs\access.log # ErrorLog D:\zend_server_ce\Apache2\htdocs\domain.dev\logs\error.log Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all

    Read the article

  • [Zend Framework] Is there any way to use more than 1 bootstrap class?

    - by rasouza
    It should sound workaround or something like, but I'll tell you what: I chose to have a separated "project" with every library I could use. It's like a global library which I included Zend library, Doctrine ORM, JQuery, Blueprint CSS, etc. Then I set the include path. Nothing wrong. The problem is: I'd like to have also a global bootstrap class inside the library folder and an individual bootstrap class on each project I create for individual use. I don't know how to set more than 1 bootstrap class. Is it possible?

    Read the article

< Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >