Search Results

Search found 4148 results on 166 pages for 'pdf'.

Page 8/166 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Reporting Services as PDF through WebRequest in C# 3.5 "Not Supported File Type"

    - by Heath Allison
    I've inherited a legacy application that is supposed to grab an on the fly pdf from a reporting services server. Everything works fine up until the point where you try to open the pdf being returned and adobe acrobat tells you: Adobe Reader could not open 'thisStoopidReport'.pdf' because it is either not a supported file type or because the file has been damaged(for example, it was sent as an email attachment and wasn't correctly decoded). I've done some initial troubleshooting on this. If I replace the url in the WebRequest.Create() call with a valid pdf file on my local machine ie: @"C:temp/validpdf.pdf") then I get a valid PDF. The report itself seems to work fine. If I manually type the URL to the reporting services report that should generate the pdf file I am prompted for user authentication. But after supplying it I get a valid pdf file. I've replace the actual url,username,userpass and domain strings in the code below with bogus values for obvious reasons. WebRequest request = WebRequest.Create(@"http://x.x.x.x/reportServer?/reports/reportNam&rs:format=pdf&rs:command=render&rc:parameters=blahblahblah"); int totalSize = 0; request.Credentials = new NetworkCredential("validUser", "validPass", "validDomain"); request.Timeout = 360000; // 6 minutes in milliseconds. request.Method = WebRequestMethods.Http.Post; request.ContentLength = 0; WebResponse response = request.GetResponse(); Response.Clear(); BinaryReader reader = new BinaryReader(response.GetResponseStream()); Byte[] buffer = new byte[2048]; int count = reader.Read(buffer, 0, 2048); while (count > 0) { totalSize += count; Response.OutputStream.Write(buffer, 0, count); count = reader.Read(buffer, 0, 2048); } Response.ContentType = "application/pdf"; Response.Cache.SetCacheability(HttpCacheability.Private); Response.CacheControl = "private"; Response.Expires = 30; Response.AddHeader("Content-Disposition", "attachment; filename=thisStoopidReport.pdf"); Response.AddHeader("Content-Length", totalSize.ToString()); reader.Close(); Response.Flush(); Response.End();

    Read the article

  • Consolidate the same image used multiple times in a PDF.

    - by Jack
    I am generating PDF documents using DevExpress XtraReports. I am using the same image over and over (in rows of status lights). The PDF generated seems to duplicate the image definition for each image included. I would prefer if it included the image once and referenced it wherever it needed another copy - this would drastically reduce the size of my PDF docs. Is there any way to achieve this using DevExpress or even post processed via a third party application. Any help is appreciated.

    Read the article

  • Dynamically append number to PDF or make submit button change its URL based on that number.

    - by jamone
    I'm serving up PDFs from a SQL db and presenting them in the browser. I'm trying to figure out a way to embed a number in the PDF dynamically that is the recordID for that PDFs SQL record so that when the user hits the submit button and the form submits its XML data to my submission page I can tell which PDF this is. If there is some way of changing the submission URL on the fly then I could do a query string to pass my self the recordID. I'm not generating the PDF in code, its being created by hand and then uploaded to my site.

    Read the article

  • Batch OCR for many PDF files (not already OCRed) ?

    - by David
    Hello, I use Google Desktop Search (I am on Vista) and not all my PDF files are recognized in my archive folder. It is normal as "PDF files that contain scanned images" are not indexed (http://desktop.google.com/support/bin/answer.py?hl=en&answer=90651) So I would like to OCR many of my PDF files that are not already OCRed. My goal : I give the program a folder and it search alone in the subfolders the PDF files that need to be converted into PDF-OCRed files. Note: In the past, if a PDF file was password protected, I removed the password with another batch (paying) tool: verypdf.com "pwdremover" Any (not too much expensive) idea ? I already tried : Finereader 6 pro on xp at the time, but there was no batch processor included... Paperfile paperfile.net which uses Tesseract code.google.com/p/tesseract-ocr/. But the OCR is only PDF to text, not PDF to PDF! There is also another project code.google.com/p/ocropus Thanks in advance ;)

    Read the article

  • Simple Merging Of PDF Documents with iTextSharp 5.4.5.0

    - by Mladen Prajdic
    As we were working on our first SQL Saturday in Slovenia, we came to a point when we had to print out the so-called SpeedPASS's for attendees. This SpeedPASS file is a PDF and contains thier raffle, lunch and admission tickets. The problem is we have to download one PDF per attendee and print that out. And printing more than 10 docs at once is a pain. So I decided to make a little console app that would merge multiple PDF files into a single file that would be much easier to print. I used an open source PDF manipulation library called iTextSharp version 5.4.5.0 This is a console program I used. It’s brilliantly named MergeSpeedPASS. It only has two methods and is really short. Don't let the name fool you It can be used to merge any PDF files. The first parameter is the name of the target PDF file that will be created. The second parameter is the directory containing PDF files to be merged into a single file. using iTextSharp.text; using iTextSharp.text.pdf; using System; using System.IO; namespace MergeSpeedPASS { class Program { static void Main(string[] args) { if (args.Length == 0 || args[0] == "-h" || args[0] == "/h") { Console.WriteLine("Welcome to MergeSpeedPASS. Created by Mladen Prajdic. Uses iTextSharp 5.4.5.0."); Console.WriteLine("Tool to create a single SpeedPASS PDF from all downloaded generated PDFs."); Console.WriteLine(""); Console.WriteLine("Example: MergeSpeedPASS.exe targetFileName sourceDir"); Console.WriteLine(" targetFileName = name of the new merged PDF file. Must include .pdf extension."); Console.WriteLine(" sourceDir = path to the dir containing downloaded attendee SpeedPASS PDFs"); Console.WriteLine(""); Console.WriteLine(@"Example: MergeSpeedPASS.exe MergedSpeedPASS.pdf d:\Downloads\SQLSaturdaySpeedPASSFiles"); } else if (args.Length == 2) CreateMergedPDF(args[0], args[1]); Console.WriteLine(""); Console.WriteLine("Press any key to exit..."); Console.Read(); } static void CreateMergedPDF(string targetPDF, string sourceDir) { using (FileStream stream = new FileStream(targetPDF, FileMode.Create)) { Document pdfDoc = new Document(PageSize.A4); PdfCopy pdf = new PdfCopy(pdfDoc, stream); pdfDoc.Open(); var files = Directory.GetFiles(sourceDir); Console.WriteLine("Merging files count: " + files.Length); int i = 1; foreach (string file in files) { Console.WriteLine(i + ". Adding: " + file); pdf.AddDocument(new PdfReader(file)); i++; } if (pdfDoc != null) pdfDoc.Close(); Console.WriteLine("SpeedPASS PDF merge complete."); } } } } Hope it helps you and have fun.

    Read the article

  • Rails PDF Generation with Prawn in IE7

    - by fluid_chelsea
    I'm using Prawn and Prawnto to generate a PDF in a Ruby on Rails app (Rails version 2.2.2) which works great and generates PDFs happily and sends them to the user to download in Firefox. The problem is in IE7. I have a route set up like so: map.invoice_pdf '/invoices.pdf', :controller => 'invoices', :action => 'index', :format => 'pdf' Which I then have a link like so to call: invoice_pdf_path(:year => params[:year], :month => params[:month], :unpaid_only => params[:unpaid_only]) And the following in my controller: def index params[:year] = default params[:year] params[:month] = default params[:month] params[:page] ||= 1 @invoices = Arobl.find_invoices_for_customer(current_customer.strCustomerID, params) respond_to do |format| format.html{ render :action => 'index' } format.pdf{ prawnto :inline => false, :filename => "#{current_customer.strCustomerID}_invoice.pdf" end In FF this works as expected, when the link is clicked the show action is invoked with a format of .pdf, and responds with the correctly named PDF. When it's hit with IE7 it says that the file or website could not be found, and references "invoices.pdf" instead of the expected customer_id_invoice.pdf filename. Any idea what could be causing this behaviour? Thanks!

    Read the article

  • Rendering PDF on WebPage

    - by Priyank
    Hi. We are trying to load a pdf file in web browser using pdfobject javascript api. Currently the size of the pdf's that we are trying to display is close to 10MBs. This creates a long delay in displaying a PDF on web page; while the complete PDF gets downloaded. We need to remove this lag by achieving either of the alternatives: Show a progress bar until the PDF is actually displayed. We couldn't find an event which is triggered and can be used to find out if pdf is visible now. This lacking doesn't let us decide when to stop showing progress bar/spinner OR lazy load the PDF such that it gets displayed as soon as first page gets loaded. With that ateast user will have a visual indication as to something is happening. We couldn'find anything in pdf object that lets us do a lazy load. User alternative pdf rendering api; this is a low priority as we already have complete code in place; but in an event of first 2 alternatives not being met; we'd have to consider this option. So please feel free to suggest. Any other ideas as to how user interaction can be made more intuitive or pleasant; would be welcome. Cheers

    Read the article

  • Creating a multi-page PDF doc

    - by codemercenary
    Hi, has anyone already created a PDF document in an iPad app. i see that there are new functions in the UIKit to do this, but I can't find any code example for this. BOOL UIGraphicsBeginPDFContextToFile ( NSString *path, CGRect bounds, NSDictionary *documentInfo ); void UIGraphicsBeginPDFPage ( void ); I found an example that is supposed to work on the iPhone, but this gives me errors: Fri Apr 30 11:55:32 wks104.hs.local PDF[1963] <Error>: CGFont/Freetype: The function `create_subset' is currently unimplemented. Fri Apr 30 11:55:32 wks104.hs.local PDF[1963] <Error>: invalid Type1 font: unable to stream font. Fri Apr 30 11:55:32 wks104.hs.local PDF[1963] <Error>: FT_Load_Glyph failed: error 6. Fri Apr 30 11:55:32 wks104.hs.local PDF[1963] <Error>: FT_Load_Glyph failed: error 6. Fri Apr 30 11:55:32 wks104.hs.local PDF[1963] <Error>: FT_Load_Glyph failed: error 6. Fri Apr 30 11:55:32 wks104.hs.local PDF[1963] <Error>: FT_Load_Glyph failed: error 6.

    Read the article

  • PDF form submission

    - by Jeff
    I have a PDF form (made in Acrobat) that has button to submit via HTTP. What I want to do it have a PHP script that will take the PDF form and e-mail it to me via attachment. What I don't want: --PDF Submit via e-mail button. This requires webmail users to save the pdf and attach it, and is just too confusing for most users. I want one-click and done. --Submit via mailto:[email protected]. Does the same thing as above. If there's a pdf on the server, I know how to use PHP's mail() function to e-mail it to someone. What I don't know how to do is process the PDF once someone hits Submit within the PDF. Does that make sense? Thanks, Jeff

    Read the article

  • PostScript versus PDF as an output format

    - by Brecht Machiels
    I'm currently writing a typesetting application and I'm using PSG as the backend for producing postscript files. I'm now wondering whether that choice makes sense. It seems the ReportLab Toolkit offers all the features PSG offers, and more. ReportLab outputs PDF however. Advantages PDF offers: transparancy better support for character encodings (Unicode, for example) ability to embed TrueType and even OpenType fonts hyperlinks and bookmarks Is there any reason to use Postscript instead of directly outputting to PDF? While Postscript is a full programming language as opposed to PDF, as a basic output format for documents, that doesn't seem to offer any advantage. I assume a PDF can be readily converted to PostScript for printing? Some useful links: Wikipedia: PDF Adobe: PostScript vs. PDF

    Read the article

  • What is a good PDF report generator tool for python?

    - by jlouis
    What is a good tool for PDF report generation in Python? I've checked out ReportLab, but it seems to be awfully low-level for what I want to do. My current hunch is to call TeX on the command-line and let it produce the PDF, but if there is something that is easier to work with (and looks professional - We'll send this to customers) I'd very much like a prod in the right direction.

    Read the article

  • How to embed evince in firefox 4?

    - by Alaukik
    I installed mozplugger and created the file mozpluggerrc with the following content according to this post But whenever I open a .pdf it opens in a separate evince windows is there a way I can truly embed it in Firefox like the chrome pdf reader? application/pdf: pdf: PDF file application/x-pdf: pdf: PDF file text/pdf: pdf: PDF file text/x-pdf: pdf: PDF file application/x-postscript: ps: PostScript file application/postscript: ps: PostScript file application/x-dvi: dvi: DVI file : evince $file

    Read the article

  • Implements EAN13 and UPC-A barcode in PDF using fpdf in classic ASP

    - by Jeremy N
    /* FPDF library for ASP can be downloaded from: http://www.aspxnet.it/public/default.asp INFORMATIONS: Translated by: Jeremy Author: Olivier License: Freeware DESCRIPTION: This script implements EAN13 and UPC-A barcodes (the second being a particular case of the first one). Bars are drawn directly in the PDF (no image is generated) function EAN13(x,y,barcode,h,w) -x = x coordinate to start drawing the barcode -y = y coordinate to start drawing the barcode -barcode = code to write (must be all numeric) -h = height of the bar -w = the minimum width of individual bar function UPC_A(x,y,barcode,h,w) Same parameters An EAN13 barcode is made up of 13 digits, UPC-A of 12 (leading zeroes are added if necessary). The last digit is a check digit; if it's not supplied or if it is incorrect, it will be automatically computed. USAGE: Copy all of this text and save it in a file called barcode.ext file under fpdf/extends folder EXAMPLE: Set pdf=CreateJsObject("FPDF") pdf.CreatePDF "P","mm","letter" pdf.SetPath("fpdf/") pdf.LoadExtension("barcode") pdf.Open() pdf.AddPage() 'set the fill color to black pdf.setfillcolor 0,0,0 pdf.UPC_A 80,40,"123456789012",16,0.35 pdf.Close() pdf.NewOutput "" , true, "test.pdf" */ this.EAN13=function (x,y,barcode,h,w) { return this.Barcode(x,y,barcode,h,w,13); }; this.UPC_A=function (x,y,barcode,h,w) { return this.Barcode(x,y,barcode,h,w,12); }; function GetCheckDigit(barCode) { bc = barCode.replace(/[^0-9]+/g,''); total = 0; //Get Odd Numbers for (i=bc.length-1; i=0; i=i-2) { total = total + parseInt(bc.substr(i,1)); } //Get Even Numbers for (i=bc.length-2; i=0; i=i-2) { temp = parseInt(bc.substr(i,1)) * 2; if (temp 9) { tens = Math.floor(temp/10); ones = temp - (tens*10); temp = tens + ones; } total = total + temp; } //Determine the checksum modDigit = (10 - total % 10) % 10; return modDigit.toString(); } //Test validity of check digit function TestCheckDigit(barcode) { var cd=GetCheckDigit(barcode.substring(0,barcode.length-1)); return cd==parseInt(barcode.substring(barcode.length-1,1)); } this.Barcode=function Barcode(x,y,barcode,h,w,len) { //Padding while(barcode.length < len-1) { barcode = '0' + barcode; } if(len==12) {barcode='0' + barcode;} //Add or control the check digit if(barcode.length==12) { barcode += GetCheckDigit(barcode); } else { //if the check digit is incorrect, fix the check digit. if(!TestCheckDigit(barcode)) { barcode = barcode.substring(0,barcode.length-1) + GetCheckDigit(barcode.substring(0,barcode.length-1)); } } //Convert digits to bars var codes=[['0001101','0011001','0010011','0111101','0100011','0110001','0101111','0111011','0110111','0001011'], ['0100111','0110011','0011011','0100001','0011101','0111001','0000101','0010001','0001001','0010111'], ['1110010','1100110','1101100','1000010','1011100','1001110','1010000','1000100','1001000','1110100'] ]; var parities=[[0,0,0,0,0,0], [0,0,1,0,1,1], [0,0,1,1,0,1], [0,0,1,1,1,0], [0,1,0,0,1,1], [0,1,1,0,0,1], [0,1,1,1,0,0], [0,1,0,1,0,1], [0,1,0,1,1,0], [0,1,1,0,1,0] ]; var code='101'; var p=parities[parseInt(barcode.substr(0,1))]; var i; for(i=1;i<=6;i++) { code+= codes[p[i-1]][parseInt(barcode.substr(i,1))]; } code+='01010'; for(i=7;i<=12;i++) { code+= codes[2][parseInt(barcode.substr(i,1))]; } code+='101'; //Draw bars for(i=0;i<code.length;i++) { if(code.substr(i,1)=='1') { this.Rect(x+i*w,y,w,h,'F'); } } //Print text uder barcode. this.SetFont('Arial','',12); //Set the x so that the font is centered under the barcode this.Text(x+parseInt(0.5*barcode.length)*w,y+h+11/this.k,barcode.substr(barcode.length-len,len)); }

    Read the article

  • Does Google use any “Language” flags / tags set within a PDF file when determining its language?

    - by Ally Ak
    When determining the language of a HTML page, I understand that Google looks at any language declarations that the page owner has set, and then also applies its own language detection algorithms. But does Google similarly look at language meta data set in PDF files when determining a PDF file's language? (Authors of PDF files can set document-wide properties describing the language (or languages) contained within it.) Or does Google rely exclusively on language detection algorithms and disregard the language flag set within the PDF file? Can anyone shed any light?

    Read the article

  • How to convert a .pdf file into a folder of images?

    - by Shawn
    I have some .pdf files that I would like to convert to my preferred reading format of .cbr or .cbz or, if this isn't directly possible, I need to extract all pages from the .pdf as images and then compress them into my format of choice. I have only been able to save pages one at a time with Document Viewer. Obviously, I'd like to do it a little quicker. I have tried pdfsam, pdf shuffler, and pdfmod all with no luck. I am using Ubuntu 11.10.

    Read the article

  • How to reduce the size of a pdf file?

    - by Nicole
    I'm looking for a way in Ubuntu to reduce the size of a pdf (by reducing the quality of the images). I know that this can be done in Ghostscript by typing the following command in terminal: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf The problem is that I can't specify the quality with any accuracy. The parameter -dPDFSETTINGS=/screen is the one that decides the quality; but the alternatives are quite rigid (for example it is possible to do -dPDFSETTINGS=/ebook for slightly better quality). I'm looking for a way to reduce the size of a pdf in a way that allows me to specify the desired quality numerically. I know that this is possible in a Mac, so it must be possible in Linux -- right? Any help would be well appreciated.

    Read the article

  • How to import a pdf in libreoffice? under ubuntu, all pages are blank

    - by Daniele
    I have some .pdf generated by a scanner, that I want to import in LibreOffice and do some small editing. The PDF has only one object per page, a page-size image. If I open it in LibreOffice under Ubuntu 12.10, it imports "successfully" but all pages are blank. I have the libreoffice-pdfimport package installed. That is true with both LibreOffice 3.6 (part of Ubuntu 12.10) and with 4.0.2, from libreoffice ppa. The same .pdf files open perfectly fine on both LibreOffice for Windows and LibreOffice for Mac (yes, I have three computers with all three OSes), but on Ubuntu 12.10, all pages are blank, so I can only conclude this is an issue with Ubuntu packaging, or something really weird prevents it from working under linux. How can I import these kinds of .pdf into LibreOffice for editing?

    Read the article

  • How to print a pdf in a new tab? [migrated]

    - by TheDuke777
    I need to print a pdf by opening it in a new window. I've looked at tutorials for days, but nothing is working. I've tried many approaches, but this is the most recent: <!DOCTYPE html> <html> <head> <script type="text/javascript"> function print() { window.getElementById("pdf").focus(); window.getElementById("pdf").print(); } </script> </head> <body onload="print()"> <embed id="pdf" src="http://path/to/file" /> </body> </html> The page loads fine, with the pdf embedded. But it won't print, and I feel like I've been beating my head against a brick wall trying to figure this out. How can I get this to work? I'm willing to try anything at this point.

    Read the article

  • How to convert an html page to pdf using javascript? [closed]

    - by user1439891
    I am developing a project, In that I have a receipt page (this is the html page that I want to convert it into pdf) and I've to print it. While printing that page alignments are not coming properly. If I convert it into pdf, then pdf only will take care of that alignments thus my work will become easy and effective. I was restricted to use either JavaScript or js libraries only to complete this task. Could any of you please help me?

    Read the article

  • Design PDF template and populate data at runtime using java,xml etc..

    - by Samant
    well i have been looking for a java based PDF solutions...we dont have a clean way i guess-still.. all solutions are primitive and kind of workarounds... No easy solution for this requirement - 1. Designing a PDF template using a IDE (eg. Livecycle designer ..which is not free) 2. Then at runtime using java, populate data into this PDF template...either using xml or other datasources... such a simple requirement and NONE has a good "open-source and free" solution yet ! Is anyone aware of any ? I have been searching for since 3-4 years now..for a clean way out... Eclipse BIRT comes close.. but does not handle Barcode elements ..OOB. Jasper - ireport is also good but that tool does not have a table concept and is kind of annoying ! Also barcode support is not good. XSL-FO has not free IDE for design . Looking for a better answer .. got one ?

    Read the article

  • C#. Document conversion to PDF

    - by Umar Siddique
    Hi. I need to convert below mentioned file formats to pdf using C#/VB.Net. User will upload the file using FileUpload control and system will returns the pdf file after converting the document. doc/docx to pdf xls/xlsx to pdf ppt/pps to pdf Does ITextSharp provide such facility ? Please Only mentioned open source or free libraries. Thanks

    Read the article

  • Show loading image when pdf rendering

    - by Pankaj
    I am displaying pdf on my page like this <object data="/Customer/GetPricedMaterialPDF?projID=<%= ViewData["ProjectID"]%>" type="application/pdf" width="960" height="900" style="margin-top: -33px;"> <p> It appears you don't have a PDF plugin for this browser. No biggie... you can <a href="/Customer/GetPricedMaterialPDF?projID=<%= ViewData["ProjectID"]%>">click here to download the PDF file. </a> </p> </object> and Controller function are public FileStreamResult GetPricedMaterialPDF(string projID) { System.IO.Stream fileStream = GeneratePDF(projID); HttpContext.Response.AddHeader("content-disposition", "attachment; filename=form.pdf"); return new FileStreamResult(fileStream, "application/pdf"); } private System.IO.Stream GeneratePDF(string projID) { //create your pdf and put it into the stream... pdf variable below //comes from a class I use to write content to PDF files System.IO.MemoryStream ms = new System.IO.MemoryStream(); Project proj = GetProject(projID); List<File> ff = proj.GetFiles(Project_Thin.Folders.IntegrationFiles, true); string fileName = string.Empty; if (ff != null && ff.Count > 0 && ff.Where(p => p.AccessToUserID == CurrentCustomer.CustomerID).Count() > 0) { ff = ff.Where(p => p.AccessToUserID == CurrentCustomer.CustomerID).ToList(); foreach (var item in ff) { fileName = item.FileName; } byte[] bArr = new byte[] { }; bArr = GetJDLFile(fileName); ms.Write(bArr, 0, bArr.Length); ms.Position = 0; } return ms; } Now my problem is function on controller taking 10 to 20 second to process pdf, data="/Customer/GetPricedMaterialPDF?projID=<%= ViewData["ProjectID"]%>" at that time my page shows blank, which i don't want. i want to show loading image at that time. How can i do this...

    Read the article

  • Downloading a file from the internet with '&' in URL using wget

    - by matt_tm
    Hi, I'm trying to download a file from a URL that looks like this: http://pdf.example.com/filehandle.ashx?p1=ABC&p2=DEF.pdf Within the browser, this link prompts me to download a file called x.pdf irrespective of what DEF is (but 'x.pdf' is the right content). However using wget, I get the following: >wget.exe http://pdf.example.com/filehandle.ashx?p1=ABC&p2=DEF.pdf SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc --2011-01-06 07:52:05-- http://pdf.example.com/filehandle.ashx?p1=ABC Resolving pdf.example.com... 99.99.99.99 Connecting to pdf.example.com|99.99.99.99|:80... connected. HTTP request sent, awaiting response... 500 Internal Server Error 2011-01-06 07:52:08 ERROR 500: Internal Server Error. 'p2' is not recognized as an internal or external command, operable program or batch file. This is on a Windows Vista system Edit1 >wget.exe "http://pdf.example.com/filehandle.ashx?p1=ABC&p2=DEF.pdf" SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc --2011-02-06 10:18:31-- http://pdf.example.com/filehandle.ashx?p1=ABC&p2=DEF.pdf Resolving pdf.example.com... 99.99.99.99 Connecting to pdf.example.com|99.99.99.99|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 4568 (4.5K) [image/JPEG] Saving to: `filehandle.ashx@p1=ABC&p2=DEF.pdf' 100%[======================================>] 4,568 --.-K/s in 0.1s 2011-02-06 10:18:33 (30.0 KB/s) - `filehandle.ashx@p1=ABC&p2=DEF.pdf' saved [4568/4568]

    Read the article

  • Apply a Quartz filter while saving PDF under Mac OS X 10.6.3

    - by olpa
    Using Mac OS X API, I'm trying to save a PDF file with a Quartz filter applied, just like it is possible from the "Save As" dialog in the Preview application. So far I've written the following code (using Python and pyObjC, but it isn't important for me): -- filter-pdf.py: begin from Foundation import * from Quartz import * import objc page_rect = CGRectMake (0, 0, 612, 792) fdict = NSDictionary.dictionaryWithContentsOfFile_("/System/Library/Filters/Blue \ Tone.qfilter") in_pdf = CGPDFDocumentCreateWithProvider(CGDataProviderCreateWithFilename ("test .pdf")) url = CFURLCreateWithFileSystemPath(None, "test_out.pdf", kCFURLPOSIXPathStyle, False) c = CGPDFContextCreateWithURL(url, page_rect, fdict) np = CGPDFDocumentGetNumberOfPages(in_pdf) for ip in range (1, np+1): page = CGPDFDocumentGetPage(in_pdf, ip) r = CGPDFPageGetBoxRect(page, kCGPDFMediaBox) CGContextBeginPage(c, r) CGContextDrawPDFPage(c, page) CGContextEndPage(c) -- filter-pdf.py: end Unfortunalte, the filter "Blue Tone" isn't applied, the output PDF looks exactly as the input PDF. Question: what I missed? How to apply a filter? Well, the documentation doesn't promise that such way of creating and using "fdict" should cause that the filter is applied. But I just rewritten (as far as I can) sample code /Developer/Examples/Quartz/Python/filter-pdf.py, which was distributed with older versions of Mac (meanwhile, this code doesn't work too): ----- filter-pdf-old.py: begin from CoreGraphics import * import sys, os, math, getopt, string def usage (): print ''' usage: python filter-pdf.py FILTER INPUT-PDF OUTPUT-PDF Apply a ColorSync Filter to a PDF document. ''' def main (): page_rect = CGRectMake (0, 0, 612, 792) try: opts,args = getopt.getopt (sys.argv[1:], '', []) except getopt.GetoptError: usage () sys.exit (1) if len (args) != 3: usage () sys.exit (1) filter = CGContextFilterCreateDictionary (args[0]) if not filter: print 'Unable to create context filter' sys.exit (1) pdf = CGPDFDocumentCreateWithProvider (CGDataProviderCreateWithFilename (args[1])) if not pdf: print 'Unable to open input file' sys.exit (1) c = CGPDFContextCreateWithFilename (args[2], page_rect, filter) if not c: print 'Unable to create output context' sys.exit (1) for p in range (1, pdf.getNumberOfPages () + 1): #r = pdf.getMediaBox (p) r = pdf.getPage(p).getBoxRect(p) c.beginPage (r) c.drawPDFDocument (r, pdf, p) c.endPage () c.finish () if __name__ == '__main__': main () ----- filter-pdf-old.py: end

    Read the article

  • ??????????????????!?????

    - by Yuichi Hayashi
    OTN?????????????????????????????!?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? SQL?????? ?SQL??????????????????????????????????????SQL????????????????? ???????????!SQL????????? ??? Part1&2 ??(PDF) ??(WMV) ??(MP4) ???????????!SQL????????? ??? Part3 ??(PDF) ??(WMV) ??(MP4) ???????????!SQL????????? ??? Part4 ??(PDF) ??(WMV) ??(MP4) ???????????!SQL????????? ??? Part5 ??(PDF) ??(WMV) ??(MP4) ?????? ?SQL????????????????????????????????????????????????? ???????????!????????? Part1 ??(PDF) ??(WMV) ??(MP4) ???????????!????????? Part2 ??(PDF) ??(WMV) ??(MP4) ???????????!????????? Part3 ??(PDF) ??(WMV) ??(MP4) ???????????!????????? Part4 ??(PDF) ??(WMV) ??(MP4) ???? ??????????????????????????????????????? ???????????!??????? Part1 ??(PDF) ??(WMV) ??(MP4) ??????? ??????????????????????Tips??????????????? ???????????!?????????&??????? ??(PDF) ??(WMV) ??(MP4) ???????????!??????????????????? ??(PDF) ??(WMV) ??(MP4) ???????????!???????????????????????????? ??(PDF) ??(WMV) ??(MP4) ??????? ??????????????? ??????????????????????????Tips????????? ???????????!DB??????????????? ??(PDF) ??(WMV) ??(MP4) ???????????!??????????????Tips ??(PDF) ??(WMV) ??(MP4) ???? Oracle Database ???????????????????????????????????????????????????????????????? ???????????!??????? Part1 ??(PDF) ??(WMV) ??(MP4) ???????????!??????? Part2 ??(PDF) ??(WMV) ??(MP4) ???????????!??????? Part3 ??(PDF) ??(WMV) ??(MP4) ???????????!??????? Part4 ??(PDF) ??(WMV) ??(MP4) ???·??? ????????????????????·?????????????????????????????????????????????????????? ???????????!Exadata???????????????????Tips ??(PDF) ??(WMV) ??(MP4) ???????????!??TimesTen?????????? ??(PDF) ??(WMV) ??(MP4) ???????????!GoldenGate??????????????????? ??(PDF) ??(WMV) ??(MP4) ???????????!Oracle CEP?????????·??????????? ??(PDF) ??(WMV) ??(MP4) ???????????!??????????????????WebLogic?????? ??(PDF) ??(WMV) ??(MP4)

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >