FPvectorial "Unsupported vector graphics" - PDF lazarus / 54-FPvectorial ---------------------------------------------------------------------- gummi.bear · 2017-09-15 12:17 I am trying to plot a pdf file to a canvas using the procedure Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TmainForm.plotPDF(PlotFileName: string; Dest: TCanvas);var  Vec    : TvVectorialDocument;  lFormat: TvVectorialFormat;begin    Vec := TvVectorialDocument.Create;  try    lFormat := TvVectorialDocument.GetFormatFromExtension(PlotFileName);    Vec.ReadFromFile(PlotFileName, lFormat);    DrawFPVectorialToCanvas(Vec.GetPageAsVectorial(0), Dest, 0, 0, 1.0, -1.0);  finally    Vec.free;  end;end;  but I am getting the "Unsupported vector graphics format." message from Vec.ReadFromFile(PlotFileName, lFormat). Are there some requirements on the format of the pdf files? My pdfs are generated by R (attached below). ---------------------------------------------------------------------- wp · 2017-09-15 12:27 Since fpvectorial links reader/writer units only for the formats needed you must add pdfvectorialreader to the uses clauses of your program. But I doubt that you'll be able to read this file with fpvectorial. As I saw recently this format is supported only in a very basic way. ---------------------------------------------------------------------- molly · 2017-09-15 12:28 Quote from: gummi.bear on September 15, 2017, 02:17:39 pmCode: [Select]    Vec.ReadFromFile(PlotFileName, lFormat); but I am getting the "Unsupported vector graphics format." message from Vec.ReadFromFile(PlotFileName, lFormat). Are there some requirements on the format of the pdf files? My pdfs are generated by R (attached below). According to fpvectorial textdoc wiki: QuoteTODO General Comprehensive testing, including opening the files in as many word processors and office suites as possible. DOCX and ODT Readers (volunteers required) Add PDF reader/writer (current PDF support is for Vector Image support only) Add HTML reader/writer Add RTF reader/writer Produce well documented examples and store in FPVectorial/Examples Code Documentation for distributing with Lazarus and fpvectorial wiki reads: QuoteReaders for various image formats: pdfvectorialreader - Read support for PDF files, supports compression, only reads the first page ---------------------------------------------------------------------- gummi.bear · 2017-09-15 12:51 QuoteReaders for various image formats: pdfvectorialreader - Read support for PDF files, supports compression, only reads the first page My pdf files have one page only and should be vector images. I also tried to turn off the compression in R, but it didn't help. I assumed that there is some support for pdf files because they are mentioned on the wiki page. So maybe only my format is wrong? ---------------------------------------------------------------------- wp · 2017-09-15 13:57 The problem is that the pdfreader does not even compile... It is certainly not too difficult to make it work, but I don't have the time to focus on this issue. Patches are welcome.