pdf-generation

wrong PDF output size with ExportAsFixedFormat in Excel VBA

送分小仙女□ 提交于 2019-12-03 16:12:50
I use Excel 2010 with VBA. I have the following code : mySh.PageSetup.PaperSize = xlPaperLetter mySh.ExportAsFixedFormat Type:=xlTypePDF, _ Filename:=filePathTmp, _ Quality:=xlQualityStandard, IncludeDocProperties:=False, _ IgnorePrintAreas:=False, OpenAfterPublish:=False It generates a PDF without error but the size is not correct. I get a 22.26 x 28.80 cm instead of the 21.59 x 27.94 cm that I would like to obtain. Any ideas ? Thanks for your help I use Excel 2010 and had this problem. I fixed it by changing the printer in Excel's dropdown list on the Print section of the File tab. My

How to convert an HTML content to PDF without losing the formatting using Java?

吃可爱长大的小学妹 提交于 2019-12-03 16:12:19
I have some HTML content (including formatting tags such as strong , images etc).In my Java code, I want to convert this HTML content into a PDF document without losing the HTML formatting. Is there anyway to do it in Java (using iText or any other library)? Nate365 I would try DocRaptor.com . It converts html to pdf or html to xls in any language, and since it uses Prince XML (without making you pay the expensive license fee), the quality is a lot better than the other options out there. It's also a web app, so there's nothing to download. Easy way to get around long, frustrating coding. Here

Produce PDF files, draw polygons with rounded corners

こ雲淡風輕ζ 提交于 2019-12-03 16:03:45
What's the right tool for the job if I want to write a Python script that produces vector graphics in PDF format ? In particular, I need to draw filled polygons with rounded corners (i.e., plane figures that are composed of straight lines and circular arcs ). It seems that matplotlib makes it fairly easy to draw rectangles with rounded corners and general polygons with sharp corners. However, to draw polygons with rounded corners, it seems that I have to first compute a Bézier curve that approximates the shape. Is there anything more straightforward available? Or is there another library that

Generate table in PDF

风格不统一 提交于 2019-12-03 15:59:22
I want to create a table in a PDF, in which the data are coming from my iPhone app. How can i do that? You can achieve the same with Quartz 2D , I found an excellent tutorial for this : How To Create a PDF with Quartz 2D in iOS 5 Tutorial Part 2 Check out below link there are many other links to do so, it is called table of contexts. pdf file text reading and searching 来源: https://stackoverflow.com/questions/5742616/generate-table-in-pdf

How to find x,y location of a text in pdf

一世执手 提交于 2019-12-03 15:46:35
Is there any tool to find the X-Y location on a text content in a pdf file ? Docotic.Pdf Library can do it. See C# sample below: using (PdfDocument doc = new PdfDocument("your_pdf.pdf", "password_if_need")) { foreach (PdfTextData textData in doc.Pages[0].Canvas.GetTextData()) Console.WriteLine(textData.Position + " " + textData.Text); } Try running "Preflight..." in Acrobat and choosing PDF Analysis -> List page objects, grouped by type of object . If you locate the text objects within the results list, you will notice there is a position value (in points) within the Text Properties -> * Font

PDF Tj command with angle brackets?

自古美人都是妖i 提交于 2019-12-03 15:43:42
I'm trying to figure out where in an uncompressed PDF v1.4 document the Times font is used. The /Font object describing the Times font within the PDF is object 65 as follows: 65 0 obj <</Type /Font /Subtype /TrueType /BaseFont /PXAAAD+TimesNewRoman,Italic /FirstChar 1 /LastChar 35 /Widths [250 333 333 333 500 500 500 500 500 500 500 500 500 500 333 722 722 833 666 610 500 556 500 443 443 500 277 443 500 389 389 277 500 443 500] /FontDescriptor 205 0 R /ToUnicode 206 0 R>> endobj It refers to a /FontDescriptor object 205 to further define the Times font object, and to a /ToUnicode map in object

Wicked pdf rendering the last row across two pages

我的梦境 提交于 2019-12-03 15:14:30
问题 I am using wicked_pdf to generate pdfs. The problem i am facing is that, sometimes it displays the last row in the page across two pages. Is there a way to tell wicked_pdf to render the row in next page if it can't fit the entire row in that page or set a limit on the number of rows in a page? Below image is an example of my problem. My options are render :pdf => file_name, :layout => "pdf.html", :disposition => "attachment" 回答1: Since WickedPDF isn't actually creating a table (just rendering

Create PDF Annotations with Quartz (iOS)

倾然丶 夕夏残阳落幕 提交于 2019-12-03 14:52:41
问题 Did anyone manage to write custom annotations in a existing PDF using Quartz? I have rendered an PDF using CGPDFDocumentRef etc, works fine now :) And i'm successful reading the Annots dict using if(!CGPDFDictionaryGetArray(pageDictionary, "Annots", &outputArray)) { .... But i can't get my head around, how to write new annotations .. Hmmm, no-one?? it can't be impossible ... :( 回答1: As stated in the Quartz 2D Programming Guide : http://developer.apple.com/library/ios/documentation

Debugging PDF for error

﹥>﹥吖頭↗ 提交于 2019-12-03 14:51:55
I'm creating PDF files using PDFClown java library. Sometimes, when openning these files with Adobe Acrobat Reader I get the famous error message: "An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem." The error shows while reading (with Adobe) the attached file only when scrolling down to the 8'th page, then scrolling back up to 3'td page. Alternatively, Zooming out to 33.3% will also produce the message. Just for the record, Foxit reader reads the file flawlessly, as well as other PDF readers

Is it possible to include svg image in pdf document rendered by rmarkdown?

不羁的心 提交于 2019-12-03 14:22:33
I want an svg image to be embedded in an pdf document that I render by using rmarkdown. This doesn't seem possible, or do I miss something? If it's not possible is there a way to first convert the .svg image to a .png before embedding it? In my rmarkdown file it looks like this (notice the two different kinds of inserting the image): ```{r results="asis",eval=TRUE,echo=FALSE,message=FALSE, error=FALSE, warning=FALSE, comment = NA,fig.height=10} cat("![](svg_file.svg)") ``` ![](svg_file.svg) I found a solution that works for me. It is based on using the svg LaTeX package and some LaTeX code