Jump to content
achilles177

Thin lines with zero thickness from PDF import

Recommended Posts

I started to use AD with the trial and I was really surprised by the speed and smooth workflow. I think it is already my best buy of the year. Great work, guys!

 

Since I use AD primary for architectural presentation, I often need to import PDF printed from Autocad. When I import lines with thickness 0.02 mm (from Autocad plot styles) they are imported in AD with 0 thickness. The lines are present and I need to select them and change the thickness manually. The same PDF is imported well in Illustrator. How can I resolve the issue?

Share this post


Link to post
Share on other sites

I'm sorry about that. Could you create an attach a simple PDF that shows the problem?

 

I just tried to export a 0.02mm line from Affinity, and re-imported it, and it seemed to work. I don't have Autocad myself to see what it is doing differently.

Share this post


Link to post
Share on other sites

Thanks for the file. In the PDF, most lines have a width of 0.24pt or 1.08pt (0.08mm or 0.38mm). The ones that appear not to draw have a width of 0.00012pt (or 0.000042mm). We respect that. If you zoom in enough (eg, 100,000%) you can see they are being drawn with that width.

 

It looks like Acrobat rounds anything less than 0.001pt down to 0, and then treats zero-width lines as a special 1-pixel line regardless of zoom. That second part is what the PDF spec says to do with zero-width lines. It also says that on hi-res devices they may be nearly invisible, and some devices can't render them at all. "Since the results of rendering such 'zero-width' lines are device dependent, their use is not recommended." So technically I believe Affinity is within the PDF specification here; being a vector app, its resolution is virtually infinite. Not that that helps you.

 

I am loath to add the notion of 1-pixel lines to Affinity: because their appearance relative to other lines depends on zoom, their behaviour is a bit weird and they really aren't something that should be used. I think the best I can do is detect the zero-width case and give them some other width, such as 0.1pt; thin but visible at reasonable zooms. 0.1pt is equivalent to a 1 pixel line at 720 DPI. I think anything thicker would be too thick. In your document it works fairly well, although not equal to the 0.02mm (0.007pt) you started with.

 

This will be in a future beta. In the meantime, there isn't much you can do other than select the lines and adjust their width by hand. In future we plan a "select-by-line-width" feature, which would make it easier, but we don't have that yet.

Share this post


Link to post
Share on other sites

Thank you so much Dave for the deep reply. I think that the feature "select-by-line-width" will be a great improvement. In the meanwhile I'll print from autocad with a bigger thickness.

Share this post


Link to post
Share on other sites

If I can add another question on this topic, I would like to know if it is possible to import a PDF file with transparent background (only vector lines).

Share this post


Link to post
Share on other sites

Hi achilles177,

That's happening because you're embedding the PDF document in your project - dragging it to the canvas from the Finder or using the Place Image Tool. To do what MattP suggested open the file directly using File ▹ Open from the menu, and copy/paste its contents to your document, or double click the embedded file in your project to open it in a new tab where you can again copy/paste its contents to the original document.

There's currently no way to make/turn the embedded document into an editable one directly.

Share this post


Link to post
Share on other sites

Hi rickastleyjr2,

Welcome to Affinity Forums :)

If i understood you correctly you want to export a file from Illustrator to DWG (to open in a Cad software maybe?) but the conversion from PDF to DWG doesn't keep the correct line thickness. 

As far as i know Illustrator is able to export to DWG (and DXF) files. Why don't you  export to these formats directly? Am i missing something?

 

Where are you using Affinity software in this process? Affinity Designer isn't able to export to DWG (or DXF) so there's isn't much you can do with the PDF here. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.