pdf-generation

ios- pdf generation in uiscrollview

北城余情 提交于 2020-01-04 21:39:56
问题 in my ios app i am listing out some data in scroll view. When a button is clicked the datas in the page are been generated in pdf file format. Following is the bit of code. - (void)createPDFfromUIView:(UIView*)aView saveToDocumentsWithFileName:(NSString*)aFilename{ // Creates a mutable data object for updating with binary data, like a byte array NSMutableData *pdfData = [NSMutableData data]; // Points the pdf converter to the mutable data object and to the UIView to be converted

ios- pdf generation in uiscrollview

元气小坏坏 提交于 2020-01-04 21:39:03
问题 in my ios app i am listing out some data in scroll view. When a button is clicked the datas in the page are been generated in pdf file format. Following is the bit of code. - (void)createPDFfromUIView:(UIView*)aView saveToDocumentsWithFileName:(NSString*)aFilename{ // Creates a mutable data object for updating with binary data, like a byte array NSMutableData *pdfData = [NSMutableData data]; // Points the pdf converter to the mutable data object and to the UIView to be converted

Optimize ABCpdf file size

余生长醉 提交于 2020-01-04 14:16:13
问题 We've got a web system that generates dynamic pdf files with ABCpdf. While it works... okay, the file sizes are a little large. For example, this morning as a test I generated a 140+ page file with lots of little graphics (actually, the same six little images repeated over and over.) The total file size was 12 megs and change. Taking that file, opening it in Acrobat Pro and running it through the default optimization settings got me a 600k file. Does anyone have any suggestions for getting

Accented Character showing as é in a pdf Using Persits.PDF

懵懂的女人 提交于 2020-01-04 11:38:08
问题 I'm trying to display a name on a pdf using Persits.PDF (Persits URL), this particular name has a an accented character in it, this being é When I use the Arial font it works fine: Dim standardFont As PdfFont = doc.Fonts.Item("Arial") However when I use Helvetica, é is shown as é Dim standardFont As PdfFont = doc.Fonts.Item("Helvetica") strParams = "x=" & (leftMarginX + CDbl(1345)).ToString() & "; y=660; width=1430.5; size=42; color=#000000;" page.Canvas.DrawText(strFullName, strParams,

Programmatically create PDF photo albums

泄露秘密 提交于 2020-01-04 06:02:54
问题 I have a set of PDF photo album templates (they have blank squares where text and photos should go). My need is to use these templates to generate actual albums. My plan was to use iText and Java. I would send the app an array of all the image URLs to use. I will know exactly where the images should be placed on the templates and use absolute positioning to place them. I was just wondering if there was an easier or cleaner way of doing this - even if it means using a different language? After

Morris Graphs Export as PDF?

你离开我真会死。 提交于 2020-01-04 04:16:10
问题 I am using Morris.js to create graphs. I have requirement to export graphs as pdf. I can see that graphs are svg elements. What should i do to achieve this. 回答1: I took one of the Morris samples and made a fiddle for you: http://jsfiddle.net/1roLdqte/48/ I added a simple call to format to PDF the existing div with just the morris chart: $('#print').click(function () { printMe(); }); function printMe() { xepOnline.Formatter.Format('line-example',{render:'download', srctype:'svg'}); } Run the

FPDF produces empty pages in Python

北慕城南 提交于 2020-01-04 03:58:06
问题 I wrote Python script that will produce PDFs based on folders with JPEGs. Nothing fancy: import os from fpdf import FPDF folders = [ ... here are numbers - folders are numbered ... ] for folder in folders: pdf = FPDF() for fil in os.scandir("parent folder" + str(folder) + "/"): pdf.add_page() pdf.image(fil.path, w=210, h=297) pdf.output("target location/" + str(folder) + ".pdf", "F") This code however results in PDF having every other page blank. Interestingly enough this code: import os from

Help with PDFKit and Rails App

◇◆丶佛笑我妖孽 提交于 2020-01-04 03:55:07
问题 Working on Ubuntu 10.04 Lucid webserver (linode). Followed these instructions to install wkhtmltopdf link (only one that worked for me.) I can run wkhtmltopdf http://www.google.com google.pdf and it works. Anything from my rails app generates a 500 error. apache error.log /bin/wkhtmltopdf: symbol lookup error: /bin/wkhtmltopdf: undefined symbol: _ZN9QListData11detach_growEPii rails log Rendered customers/agreement_form.html.erb (15.0ms) Completed 200 OK in 19ms (Views: 16.6ms | ActiveRecord:

Android N: PrintManager.print() results in java.lang.IllegalStateException: Can print only from an activity

三世轮回 提交于 2020-01-03 20:12:08
问题 My app is using PDF printing using PrintManager. This functionality is running just fine in Android L and M but fails under Android N. Print action is called within a non-fragment activity from options menu in onOptionsItemSelected(). if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { PrintManager printManager = (PrintManager) getSystemService(Context.PRINT_SERVICE); String jobName = "createPDFReport"; printManager.print(jobName, new InterimReportAdapter(AuditValidation.this,

iText set cell's height

允我心安 提交于 2020-01-03 18:34:07
问题 I am using a java version of this library and can't figure out how to set the cell's height. When I use cell.setFixedHeight() and passing any number less that 18 the content dissapears in output PDF file. Why? Thank you 回答1: Check whether the width and height given for document is not exceeds. Document document = new Document(PageSize.A4, 60, 60, 120, 80); and for cell height you have to give in float value for e.g Cell.setFixedHeight(45f); I hope this will help you to proceed further :-) 来源: