João Vidinha Posted April 18, 2020 Share Posted April 18, 2020 Hi Everyone, I'm not the only one having this kind of problem with importing PDFs to Publisher but here's my question. I'm a music score publisher and I definitely love Affinity software because it saved me money and time. What is happening is that every time I import a PDF to Publisher, some strange things happen to the scores: signs appearing, head notes completely away from their place... I don't know if PDFs can be "locked" to avoid these situations and I can solve them inside publisher but imagine I have 60 pages of music on A3 format, with 30 instruments. I need to check every bar on every staff! And there goes the "saved me money and TIME". Could someone help me with this or - Affinity - have this in mind for a coming update? Placing 2 images attached as examples. Thanks and keep the good work! Quote Link to comment Share on other sites More sharing options...
Old Bruce Posted April 18, 2020 Share Posted April 18, 2020 Hi João Vidinha and welcome to the forums, Music scores are a right royal pain, due to fonts and the way Affinity deals with them and the necessary kerning and offsets. About the only thing I can suggest is outlining them in Sibelius/Finale if that is possible or exporting them as TIFFs at a high dpi. I do realize that the latter is not a practical solution when you have more than a page. João Vidinha 1 Quote Mac Pro (Late 2013) Mac OS 12.7.4 Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear. I have never mastered color management, period, so I cannot help with that. Link to comment Share on other sites More sharing options...
João Vidinha Posted April 18, 2020 Author Share Posted April 18, 2020 Hi Old Bruce, Thanks for your prompt reply. I completely understand but it is a file format we don't use at all and only Sibelius extracts TIFF directly, not Finale. Indeed, not very practical. Anyway, that's a "half-solution" for now. Quote Link to comment Share on other sites More sharing options...
A_B_C Posted April 19, 2020 Share Posted April 19, 2020 Hi João, have you tried the solution, I should probably say “workaround,” detailed in the following thread? https://forum.affinity.serif.com/index.php?/topic/106203-workaround-for-font-problem-with-placed-pdfs/ As you posted in the macOS forum, you may be able to use the Ghostscript installer created by Richard Koch which I linked somewhat later in that thread. In case you don’t want to mess around with installing Ghostscript from source. Alas, it’s a workaround, and I don’t know how faithfully it will preserve your files, but it might be worth a try. Best, Alex João Vidinha 1 Quote Link to comment Share on other sites More sharing options...
A_B_C Posted April 19, 2020 Share Posted April 19, 2020 To give you an idea, this is a PDF document I once downloaded from the web. As you will see, it doesn’t open well in Publisher, even if you have Sabon Next installed: Sabon-Next.pdf After vectorising with ghostscript, the document is looking like that: Sabon-Next-Vectorised.pdf (Document provided for illustrative purposes only.) João Vidinha 1 Quote Link to comment Share on other sites More sharing options...
João Vidinha Posted April 19, 2020 Author Share Posted April 19, 2020 Hi A_B_C, Thanks for your reply. It is an idea but as far as I could read, it wasn't 100% efficient. And it looks so difficult, with coding and so on... But I will give it a try! Greetings. Quote Link to comment Share on other sites More sharing options...
A_B_C Posted April 19, 2020 Share Posted April 19, 2020 Oh no, it's really not that difficult! 😀 You can install Ghostscript using Robert Koch’s installer. That’s a signed and notarised .pgk installer package like any other. Once installed, you’ll just have to launch terminal and use, in the most basic case, gs -dNoOutputFonts -sDEVICE=pdfwrite -o /path/to/output-file.pdf /path/to/source-file.pdf with the appropriate file names and paths. If you want, just attach a sample PDF document exported from Sibelius or Finale to this thread, and I’ll happily convert it for you using Ghostscript. I’d be also curious to see whether it works or not. 😉 Alex João Vidinha 1 Quote Link to comment Share on other sites More sharing options...
A_B_C Posted April 19, 2020 Share Posted April 19, 2020 By the way, the Ghostscript documentation can be found here. João Vidinha 1 Quote Link to comment Share on other sites More sharing options...
João Vidinha Posted April 19, 2020 Author Share Posted April 19, 2020 Movimentum Pro Thomas Tallis In Memoriam (1991) - cópia.pdf Could you try on this? I downloaded Ghostscript but could not run on Terminal. Quote Link to comment Share on other sites More sharing options...
A_B_C Posted April 19, 2020 Share Posted April 19, 2020 Oh, what did go wrong? 🙁 Here’s the file I distilled with Ghostscript: Testfile-Vectorized.pdf Looks good in Publisher: João Vidinha 1 Quote Link to comment Share on other sites More sharing options...
João Vidinha Posted April 19, 2020 Author Share Posted April 19, 2020 Coding, don't understand so much about it... Well, I should send you a troubled one that I've tested before on Publisher. Here is one. document.pdf Quote Link to comment Share on other sites More sharing options...
A_B_C Posted April 19, 2020 Share Posted April 19, 2020 So here’s a little description of the process. I suppose you downloaded the installer for your version of macOS from Richard Koch’s page: https://pages.uoregon.edu/koch/ Please note that there are different versions. Since I am still using macOS Sierra with my older Macbook Pro, I downloaded Ghostscript 9.27, but you may need a different installer, depending on your system. Download the package, double click it and run the installer. After having successfully installed the package, you can open the Terminal app from the Utilities folder inside the Applications folder, and do the following, for a first test. Copy this line and paste it after the $ prompt: gs -dNoOutputFonts -sDEVICE=pdfwrite -o Then add a space character and drag your PDF document onto the Terminal window. By doing so, you will set the path and the name of the output file that will be created. Of course, you don’t want to overwrite your original file, so use the arrow keys to go to the filename, add some suffix like “-Vector,” and use the arrow keys again to go to the end of the line. (Alternatively, you can type in the path and the filename, but this is a little more tedious.) Then add another space character and drag your PDF file onto the Terminal window a second time. This way, you will set the path of the input file. Then press Return, and your file will be created. (Don’t be confused by the blue patches in my video. You will find your own account name there.) Hope that helps … 😀 Alex Testfile.mov João Vidinha, vonBusing and thomaso 3 Quote Link to comment Share on other sites More sharing options...
A_B_C Posted April 19, 2020 Share Posted April 19, 2020 Oh, and this is your second document after applying the method above. Doesn’t look too bad to my eyes. document-vector.pdf João Vidinha 1 Quote Link to comment Share on other sites More sharing options...
João Vidinha Posted April 19, 2020 Author Share Posted April 19, 2020 Thank you so much for your extended explanation. I will follow every step. The document you sent was perfect on Publisher! But we have to be honest and say it is a bug on Affinity software, that should be fixed soon. Anyway, thanks again! A_B_C and Old Bruce 2 Quote Link to comment Share on other sites More sharing options...
João Vidinha Posted April 19, 2020 Author Share Posted April 19, 2020 Dear Alex, It worked quite well! Thanks again A_B_C 1 Quote Link to comment Share on other sites More sharing options...
A_B_C Posted April 19, 2020 Share Posted April 19, 2020 Glad it worked. 😀 Quote Link to comment Share on other sites More sharing options...
garrettm30 Posted April 27, 2020 Share Posted April 27, 2020 On 4/19/2020 at 3:24 AM, A_B_C said: To give you an idea, this is a PDF document I once downloaded from the web. As you will see, it doesn’t open well in Publisher, even if you have Sabon Next installed: Sabon-Next.pdf 34.71 kB · 3 downloads After vectorising with ghostscript, the document is looking like that: Sabon-Next-Vectorised.pdf 694.41 kB · 2 downloads (Document provided for illustrative purposes only.) I notice a pretty drastic difference in file size (which is as I would expect), and that is just one page. I can appreciate that this workaround may help in some cases, but is this the best we can currently do? There is a project that I am anticipating several months down the road that would have me doing the layout for a book of songs, and this particular publication would be distributed digitally as PDF as much or more as in print. I would prefer to do it with Publisher rather than InDesign, because a few years down the road I may very well no longer have InDesign. However, so far it looks like I better stick with InDesign for the sake in the kind of results I need. Does anyone have an idea at how to retain quality and fidelity without the 20-fold file size increase when placing music PDFs in Publisher? A_B_C 1 Quote Link to comment Share on other sites More sharing options...
João Vidinha Posted April 27, 2020 Author Share Posted April 27, 2020 3 hours ago, garrettm30 said: I notice a pretty drastic difference in file size (which is as I would expect), and that is just one page. I can appreciate that this workaround may help in some cases, but is this the best we can currently do? There is a project that I am anticipating several months down the road that would have me doing the layout for a book of songs, and this particular publication would be distributed digitally as PDF as much or more as in print. I would prefer to do it with Publisher rather than InDesign, because a few years down the road I may very well no longer have InDesign. However, so far it looks like I better stick with InDesign for the sake in the kind of results I need. Does anyone have an idea at how to retain quality and fidelity without the 20-fold file size increase when placing music PDFs in Publisher? Hi Garrett, I know that changing PDF files to vectorized takes a while but if you organize 1 file and run it once, you will have it done fast enough. I am a manager of 2 music publishers and would rather do this and pay one time for Affinity (they are all now with 50% discount!!!!!!) than joining Adobe or trying a cracked version. This solution has worked 100% so far. If Affinity software develops in a good way, well, we will benefit from it for sure! Quote Link to comment Share on other sites More sharing options...
garrettm30 Posted April 27, 2020 Share Posted April 27, 2020 6 minutes ago, João Vidinha said: I know that changing PDF files to vectorized takes a while but if you organize 1 file and run it once, you will have it done fast enough. I am a manager of 2 music publishers and would rather do this and pay one time for Affinity (they are all now with 50% discount!!!!!!) than joining Adobe or trying a cracked version. This solution has worked 100% so far. If Affinity software develops in a good way, well, we will benefit from it for sure! My concern is not speed of export but the file size of the finished PDF. (By the way, I do own all Affinity apps on both Mac and iPad. I am a big fan.) Quote Link to comment Share on other sites More sharing options...
João Vidinha Posted April 27, 2020 Author Share Posted April 27, 2020 1 minute ago, garrettm30 said: My concern is not speed of export but the file size of the finished PDF. (By the way, I do own all Affinity apps on both Mac and iPad. I am a big fan.) I also own them, just wish I could use them more but would need an intensive course. Then divide it in songs and save them in 2 different folders. On 4/19/2020 at 11:20 PM, A_B_C said: Glad it worked. 😀 Maybe Alex knows a way to vectorize several files at once? That would also save me some time. Quote Link to comment Share on other sites More sharing options...
A_B_C Posted April 29, 2020 Share Posted April 29, 2020 Hi João, there is indeed a way to batch process files, and you are lucky, as @benwiggy created a perfect Automator-based solution for it, which can be found here. Let’s tweak it a little to make it a workflow. Launch Applications > Automator.app Create a new workflow using File > New > New Workflow Go to [Sidebar] > Library > Files & Folders Find the action Get Specified Finder Items and add it to your workflow Go to [Sidebar] > Library > Utilities Find the action Run Shell Script and add it to your workflow The action block has two fly-out menus called Shell and Pass input. Select Pass Input: as arguments. This is crucial, for otherwise your action won’t work. Finally, copy and paste the following code block into the Run Shell Script action: for f in "$@" do f=${f//\\} filename="${f%.*}" filename="$filename"" Vectorised.pdf" /usr/local/bin/gs \ -dNOPAUSE \ -dBATCH \ -dNoOutputFonts \ -sDEVICE=pdfwrite \ -sOutputFile="$filename" \ "$f" echo $f, $filename done Now you can go ahead and load PDF documents into your workflow and batch-process them with ghostscript. All credits for this solution go to @benwiggy, as mentioned above. I just slightly changed the structure of the solution, as it feels more natural to me to use a workflow and load a batch of PDF files directly into Automator. But of course, it depends. The vectorised PDFs will be output to the same folder where the original files are stored. I think you’ll have a nice and easy solution for batch-processing your files now. Hope it works … 😀 Alex João Vidinha 1 Quote Link to comment Share on other sites More sharing options...
A_B_C Posted April 29, 2020 Share Posted April 29, 2020 As Garret correctly pointed out, there is no way to overcome the file size increase with this solution. As soon as a PDF file containing text is vectorised, each single glyph used for rendering the text has to be described as a set of vector paths, rather than being referenced from a font file embedded into the PDF where the respective glyph is just described once. Some glyphs in the embedded font may even be described as composites or on the basis of subroutines, which will make the file size even smaller. Therefore, by vectorising your file, you will create an enormous amount of descriptive redundancy. garrettm30 1 Quote Link to comment Share on other sites More sharing options...
João Vidinha Posted April 29, 2020 Author Share Posted April 29, 2020 Hi Alex, This is great! Thank you again and @benwiggy! A_B_C 1 Quote Link to comment Share on other sites More sharing options...
Catscout Posted May 25, 2020 Share Posted May 25, 2020 I've the same problem. When importing PDF to Affinity Design, even with the right fonts installed the result is completely different. The music font is Opus ST and the text font is Sabon (both installed in the computer) The original Imported to Affinity Design Quote Link to comment Share on other sites More sharing options...
João Vidinha Posted May 25, 2020 Author Share Posted May 25, 2020 Boa tarde @Catscout Acima está a explicação do Alex @A_B_C que funciona na perfeição. Dá um pouco de trabalho ao início mas compensa! É só seguir os passos descritos. Força! A_B_C 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.